
Execute Code configuration — pick Python or JavaScript and write the snippet. Inputs from earlier nodes are available as variables.
When to Use
- Changing data formats - Rearrange, filter, or combine data
- Calculations - Math, percentages, date calculations
- Text processing - Find and replace, split text, format names
- Connecting to special services - Talk to services not in the app list
- Creating files - Make CSV files, JSON files, etc.
- Custom rules - Anything specific to your business
Accessing Input Data
All previous node outputs are available in theinput object:
Python
JavaScript
Returning Data
Return a JSON-compatible value to pass data to subsequent nodes:Python
JavaScript
Example: Data Transformation
Transform API response data into a specific format:Example: CSV Generation
Create a CSV file from data:Example: Regex Extraction
Extract patterns from text:Example: API Call
Make HTTP requests to external services:Python
JavaScript
Example: Date/Time Calculations
Calculate business days, deadlines, etc:Let AI Write the Code For You
Click the “Generate with AI” button and describe what you want in plain English: Example: “Find all phone numbers and email addresses in the text” Example: “Calculate the total of all the prices and add 10% tax” Example: “Turn this list of items into a CSV format” The AI will write the code for you based on what’s available from previous nodes.Available Libraries
Python
Pre-installed packages include:requests- HTTP clientjson- JSON parsing (built-in)re- Regular expressions (built-in)datetime- Date/time handling (built-in)csv- CSV processing (built-in)pandas- Data analysisnumpy- Numerical computing
JavaScript
Node.js built-ins plus:fetch- HTTP client (built-in)lodash- Utility functionsmoment- Date handlingcsv-parse- CSV processing
Need a package that’s not available? Contact support to request additions.
Error Handling
Use try-catch to handle errors gracefully:Python
JavaScript
Security
This sandboxing protects your workflows and prevents accidental damage.Tips
Settings
What to call this node (shown on the canvas).
A short code to reference this node’s result.
Which coding language to use:
- python - Good for data work, popular and readable
- javascript - Good for web stuff
Your code. You can access data from previous nodes using
input["node_name"]["value"].How long to let the code run before stopping it (in milliseconds). 30000 = 30 seconds.
Outputs
Whatever your code sends back (using
return).Anything you printed (using
print() in Python or console.log() in JavaScript).Error messages if something went wrong.
0 if everything worked, something else if it didn’t.
True if the code ran without crashing.
How long it took to run (in milliseconds).
Any files your code created.
Related Nodes
Ask AI
For text understanding tasks, Ask AI may be more appropriate than code.
HTTP Request
For simple API calls, HTTP Request node is easier than code.
