When to Use It
- Complex data transformations that go beyond what Transform can do
- Parsing unstructured text (CSV, XML, regex extraction)
- Mathematical computations or aggregations
- Building dynamic objects with loops and conditionals
- Encoding/decoding data (Base64, URL encoding, hashing)
- Any logic that’s simpler to write in code than to wire with nodes
Configuration
Write your Python code directly in the node’s code editor. Your code has access to the data from previous nodes and must return a result.Input
Data from previous nodes is available through the input variable — a dictionary containing the output of every upstream node:Output
Your code must return a value using theoutput variable. This becomes the Python node’s output that downstream nodes can reference:
Examples
Filter and transform a list
Filter and transform a list
Parse a CSV string
Parse a CSV string
Aggregate and compute
Aggregate and compute
Build a dynamic payload
Build a dynamic payload
String parsing with regex
String parsing with regex
Date and time operations
Date and time operations
Available Libraries
The Python node runs in a sandboxed environment with access to Python’s standard library, including:json— JSON parsing and serializationre— Regular expressionsdatetime— Date and time operationsmath— Mathematical functionscsv— CSV reading and writingio— String I/Ohashlib— Hashing (MD5, SHA256, etc.)base64— Base64 encoding/decodingurllib.parse— URL encoding/decodingcollections— Useful data structures