CODE Execute custom PYTHON code function

The CODE Execute custom PYTHON code function in RPA.

Help CentreBuilding 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:

  1. Navigate to the process where you would like to add the CODE Execute custom PYTHON code function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the CODE Execute custom PYTHON code option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
FileYesText-The path to the Python file
FunctionYesText-The function name to call
Key / Element pairsNoTable-Parameters to pass to the function

Output variables

This action does not produce output variables.


Errors

ErrorDescription
File not foundThe Python file does not exist
Function not foundThe function does not exist in the file
Python errorThe Python code raised an exception

Tips

  • Executes a specific function from a Python file
  • Parameters are passed as key-value pairs

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.