Loading...
Loading...
Master the ExecuteScript executor for Automation Pilot commands. Covers script execution parameters, Base64 encoding, timeout/exit code handling, stdin/parameters/environment patterns, and language-specific commands (Python, Node.js, PowerShell). Use when building commands that execute shell scripts or custom code.
npx skill4agent add sap/automation-pilot-agent-skills automation-pilot-executor-executescriptExecuteScript| Command | ID | Use for |
|---|---|---|
| | Bash (legacy, Base64 script) |
| | Bash (recommended, plain text) |
| | Python scripts |
| | Node.js scripts |
| | PowerShell scripts |
Sensitive*SensitiveExecutePythonScript:1scripts-sapcp:ExecuteScript:1scriptstdinscripts-sapcp:ExecuteScript:2| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | ✅ | - | V1: Base64 encoded / V2: Plain text |
| string | ❌ | - | Sensitive. V1: Base64 / V2: Plain text. Multiple values: |
| array | ❌ | | Passed as |
| object | ❌ | | Available as shell environment variables |
| number | ❌ | | Range: 15–600s |
| array | ❌ | | Use |
exitCoderesult{
"execute": "scripts-sapcp:ExecuteScript:2",
"input": {
"script": "echo \"$1 $2\"",
"parameters": "[\"Hello\", \"World\"]",
"timeout": "30"
},
"alias": "runScript",
"description": null,
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": null,
"autoRetry": null,
"repeat": null,
"errorMessages": [],
"dryRun": null
}{
"execute": "scripts-sapcp:ExecuteScript:2",
"input": {
"script": "read password; echo \"Received ${#password} chars\"",
"stdin": "$(.execution.input.password)",
"timeout": "30"
},
"alias": "processPassword",
"description": null,
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": null,
"autoRetry": null,
"repeat": null,
"errorMessages": [],
"dryRun": null
}scripts-sapcp:ExecutePythonScript:1script| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | ✅ | - | Plain Python source code |
| array | ❌ | | pip packages installed before execution |
| array | ❌ | | Passed as positional args to the script |
| string | ❌ | - | Sensitive. Passed to script's standard input |
| object | ❌ | | Environment variables |
| number | ❌ | | Range: 15–600s |
| array | ❌ | |
exitCoderesult{
"execute": "scripts-sapcp:ExecutePythonScript:1",
"input": {
"script": "import requests\nprint(requests.__version__)",
"packages": "[\"requests\"]",
"timeout": "60"
},
"alias": "runPython",
"description": null,
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": null,
"autoRetry": null,
"repeat": null,
"errorMessages": [],
"dryRun": null
}scripts-sapcp:ExecuteNodeJsScript:1script| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | ✅ | - | Plain JavaScript source code |
| array | ❌ | | npm packages installed before execution |
| string | ❌ | - | Sensitive. |
| array | ❌ | | Passed as positional args to the script |
| string | ❌ | - | Sensitive. Passed to script's standard input |
| object | ❌ | | Environment variables |
| number | ❌ | | Range: 15–600s |
| array | ❌ | |
exitCoderesult{
"execute": "scripts-sapcp:ExecuteNodeJsScript:1",
"input": {
"script": "const axios = require('axios');\nconsole.log(axios.VERSION);",
"packages": "[\"axios\"]",
"timeout": "30"
},
"alias": "runNode",
"description": null,
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": null,
"autoRetry": null,
"repeat": null,
"errorMessages": [],
"dryRun": null
}scripts-sapcp:ExecutePowerShellScript:1script| Parameter | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | ✅ | - | Plain PowerShell source code |
| array | ❌ | | PowerShell modules installed before execution |
| array | ❌ | | Passed as positional args to the script |
| string | ❌ | - | Sensitive. Passed to script's standard input |
| object | ❌ | | Environment variables |
| number | ❌ | | Range: 15–600s |
| array | ❌ | |
exitCoderesult{
"execute": "scripts-sapcp:ExecutePowerShellScript:1",
"input": {
"script": "Write-Output 'Hello from PowerShell'",
"timeout": "60"
},
"alias": "runPowerShell",
"description": null,
"progressMessage": null,
"initialDelay": null,
"pause": null,
"when": null,
"validate": null,
"autoRetry": null,
"repeat": null,
"errorMessages": [],
"dryRun": null
}Sensitive*result| Standard | Sensitive variant |
|---|---|
| |
| |
| |
| |
| Code | Meaning |
|---|---|
| Success (default) |
| Insufficient resources/quota |
| Killed by system (SIGKILL) |
| Custom | Use |
ExecuteScript124| ❌ Wrong | ✅ Correct |
|---|---|
Using | Use |
Using | Use |
V1: plain text | V1: hardcode literal Base64, or encode at runtime: |
V2: | V2: |
| |
| |
Using | Use |
| Standard command when output contains secrets | Use the |