Help Centre › Building Processes
This article describes the RPA Code functionality to execute custom PYTHON code.
For a full list of available functions, please read CODE functions.
Description
The CODE Execute custom PYTHON code function allows you to execute custom PYTHON code.
Setting it up
To use the CODE Execute custom PYTHON code function, follow these instructions:
{{popups:rpas/add:action=python-code}}
Once on a process map:
- Navigate to the process where you would like to add the CODE Execute custom PYTHON code function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the CODE Execute custom PYTHON code option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File | Yes | Text | - | The path to the Python file |
| Function | Yes | Text | - | The function name to call |
| Key / Element pairs | No | Table | - | Parameters to pass to the function |
Output variables
This action does not produce output variables.
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