Guide

Build

Run programs & scripts on your machines

1 min readOpen in Neblex

Flows can run real programs (Python, PowerShell, batch files, shell scripts, even native libraries) on machines you own.

Over SSH (no On-Prem Worker)

  1. Create an SSH connection to the host (password or key).
  2. Add an SSH step and choose the operation: run (one command) or a script: script_bash, script_sh, script_python, script_powershell, script_cmd.
  3. Write the script in the statement editor; it is passed to the interpreter on the host. Use :field placeholders to insert values from the record; each value is quoted for where it appears so it stays data, and a placement where a value could not stay data is refused.
  4. Use the output. Each record returns {stdout, stderr, exitCode}; branch on exitCode.

Windows Server 2019+ and Windows 10+ include OpenSSH Server (Optional Features), so PowerShell and batch scripts run the same way.

On an On-Prem Worker

When a Worker runs on the machine itself, flows that run on that Worker can execute local work directly:

  • Local Process: Run a program, Run Python, Run JavaScript (Node), Run PowerShell, Run batch/cmd. Give a script file path or inline code, arguments, working directory, input and environment values. The output is {stdout, stderr, exitCode, success, json}.
  • Native Library: call an exported function of a .dll, .so or .dylib with a string-in/string-out JSON contract.

Off until you allow it. Local execution is refused by default. The administrator of the Worker's host must explicitly approve the exact programs, working folders and library functions on that host before flows can use them, and the flow must run on that Worker. The cloud never runs local programs. Programs run with the rights of the Worker's service account, so give that account only what the jobs need.