Overview
The Code node allows users to dynamically execute a Python code snippet within their workflows. The Python process will have access to all inputs and must output a single expression.Configuration Parameters
To set up the Code node, you need to configure the following parameter:- Python Code: The Python code you want to execute. This code will be executed in an isolated Jupyter Kernel environment as a single notebook cell.
Expected Inputs and Outputs
-
Inputs:
Any inputs to the Code node will be passed into the Python environment as the dictionary
inputs
, with the input node display IDs mapped to their respective outputs. Example: -
Outputs:
The output will be evaluated as the last expression within the block. The output string will be automatically trimmed and handled to ensure clean results.
Example: