Script operator

Prev Next

The Script operator allows a workflow to execute custom code written in a supported scripting Language, such as Python. This operator facilitates complex data processing, calculations, or advanced logic that is not available through standard workflow operators.

Perform these steps to configure the Script operator in your workflow:

  1. Drag and drop the Script operator onto the workflow canvas.

  2. Click the operator to open the properties pane.

  3. In the Name field, enter a descriptive name for the script operator.

  4. In the (Optional) Description field, add details about the script's purpose and logic.

  5. In the Language drop-down, select the scripting language to be used (e.g., Python).

  6. In the Timeout field, define the execution timeout in minutes and seconds.

  7. To add Environment Variables, click + Variable and specify the required name and value for each.

  8. To define script inputs, click + Input under (Optional) Inputs and specify the name and data type for each expected input.

  9. In the Python Script code block, provide the script content.

    Note

    Ensure the script defines a function (e.g., script_handler) that processes the input and context and returns an output.

  10. To specify external dependencies, enter the requirements (e.g., requests==2.32.3) under (Optional) Requirements.

  11. To define expected outputs, click + Output under Outputs and specify the name and data type for each expected output.

  12. Click Save.