Help Centre › Building Processes
Execute a shell command and capture its output.
Add it to a process
In the process designer, open the Add step tab. Find Run shell command under Process, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| Command | Yes | The shell command to run (CMD on Windows, Terminal on Mac). Supports variables. |
| Output variable | No | Name of the variable where the result will be stored |
| Exit-code variable | No | Variable to store the exit code, for branching on success |
| Full-result variable | No | Variable to store the full result object (stdout, stderr, exit code, duration) |
| Timeout (seconds) | No | Seconds to wait before the command is stopped (default 60, 0 for no limit) |
| Standard input | No | Text piped to the command's standard input |
| Working directory | No | Working directory to run the command in |
| Environment variables | No | Extra environment variables for the command |
| Window style | No | Console window style (Windows only) Choices: Normal, Hidden, Minimized, Maximized. |
| Fail on non-zero exit | No | Fail the step when the command exits non-zero (default true) Default: on. |
| Inherit environment | No | Pass the bot's own environment to the command (default true) |
| Run as Administrator | No | Run the command elevated. Windows only, and needs a human at the UAC prompt |
What it gives back
{variable}– The command's output{exit_code_variable}– The command's exit code{result_variable}– {command, stdout, stderr, exit code, pid, timed out, duration, succeeded}
See all Process steps.
Errors
| Error | Description |
|---|---|
| Command failed | The shell command returned an error |
Tips
- Executes a shell/command line command on the bot
- Use for system-level operations