Safe Execute Command

Executes a command on the host (Community version of deprecated ExecuteCommand)

Safe Execute Command

AI-generated

Summary

Execute a shell command either once or for each input item and output the command's exit code, stdout, and stderr for each execution.

Inputs

  • Execute Once — Whether to execute the command only once (true) or once per each input item (false). Defaults to true.
  • Command (required) — The shell command to execute. Can be a multi-line string.

Output shape

a list of JSON objects, each corresponding to one executed command, containing 'exitCode' (number), 'stdout' (string), and 'stderr' (string). On error, an 'error' message is included instead.

If 'Execute Once' is true, only the first input item triggers command execution; if false, the command runs for each input item. Errors throw unless 'Continue on Fail' is enabled, in which case error messages are output as JSON for the respective item.

Links

Discussion