
Code Node Configuration Interface
Configuration
Define Input Variables to access data from other nodes in your workflow, then reference these variables in your code. Your function must return a dictionary containing the Output Variables you’ve declared.Language Support
Choose between Python and JavaScript based on your needs and familiarity. Both languages run in secure sandboxes with access to common libraries for data processing.- Python
- JavaScript
Python includes standard libraries like
json, math, datetime, and re. Ideal for data analysis, mathematical operations, and text processing.Error Handling and Retries
Configure automatic retry behavior for failed code executions and define fallback strategies when code encounters errors.
Error Handling Configuration Options

Retry Configuration Interface
Output Limits
Before an output passes to the next node, Dify checks that it isn’t too large:- Strings: up to 400,000 characters.
- Numbers: whole numbers up to 19 digits, and decimals up to 20 places.
- Objects and arrays: nested up to five levels deep.