Process: Run shell command

Execute a shell command and capture its output.

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

FieldRequiredWhat it does
CommandYesThe shell command to run (CMD on Windows, Terminal on Mac). Supports variables.
Output variableNoName of the variable where the result will be stored
Exit-code variableNoVariable to store the exit code, for branching on success
Full-result variableNoVariable to store the full result object (stdout, stderr, exit code, duration)
Timeout (seconds)NoSeconds to wait before the command is stopped (default 60, 0 for no limit)
Standard inputNoText piped to the command's standard input
Working directoryNoWorking directory to run the command in
Environment variablesNoExtra environment variables for the command
Window styleNoConsole window style (Windows only) Choices: Normal, Hidden, Minimized, Maximized.
Fail on non-zero exitNoFail the step when the command exits non-zero (default true) Default: on.
Inherit environmentNoPass the bot's own environment to the command (default true)
Run as AdministratorNoRun 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

ErrorDescription
Command failedThe shell command returned an error

Tips

  • Executes a shell/command line command on the bot
  • Use for system-level operations

Related functions

Get started

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or have your first automation working in 7 days.