The Execute function action in the Python Script for API Task package executes a function within the Python script defined in the Open action.

Settings

The following settings are available in the Execute function action:

Python session
The session name defined in the Open action. The session name fetches the Python script from the Open action for execution.
Enter name of function to be executed
The name of the function in the Python script that must be executed. The name must match the function that is available in the script.
Arguments to the function
The arguments required for the function. This field supports Boolean, dictionary, list, number, or string variables.
Note: The interface allows you to select only one argument. Use a list variable to concatenate multiple arguments into one variable.
Throw an exception if the Python script fails
The check box for error handling. When enabled, the automation displays an error when the Python script execution fails.
Assign the output to variable
The output variable to capture the output of the script.