Help Centre › Building Processes
Execute custom Python code.
Add it to a process
In the process designer, open the Add step tab. Find Run Python code under Process, or type its name in the search box, and drag it onto the canvas.
Fields
| Field | Required | What it does |
|---|---|---|
| Code | Yes | The Python to run. Set `result` to return one value, or name several in Values to read back. |
| Values to read back | No | Names the code sets, one per line or comma separated. Each becomes a variable of the same name. |
| Result variable | No | The variable that gets what the code put in `result`. |
| Inputs | No | Each row gives the code a value under a name. With no rows the code can read every process variable. |
| Run in its own process | No | Runs the code in a separate process, so a crash or an endless loop cannot stop the bot. Values cross as plain data, not as live objects. Default: off. |
| Timeout (seconds) | No | Only when run in its own process: stop the code after this many seconds. 0 means no limit. Default 60. |
What it gives back
{variable}– Whatever the snippet assigned to `result`
See all Process steps.
Errors
| Error | Description |
|---|---|
| File not found | The Python file does not exist |
| Function not found | The function does not exist in the file |
| Python error | The Python code raised an exception |
Tips
- Executes a specific function from a Python file
- Parameters are passed as key-value pairs