Using Variables
Variables let you pass data from one node to another. Every node outputs data that subsequent nodes can access.
Variable Basics
How Variables Work
- Each node produces output data
- Subsequent nodes can reference that data
- Use double curly braces:
{{node.field}}
Variable Syntax
{{nodeName.path.to.field}}
Examples:
{{trigger.email}}- Email from form submission{{http_request.response.body.id}}- ID from API response{{loop.item.name}}- Current item in a loop
The Variable Picker
Click the button in any text field to open the variable picker.
Using the Picker
- Click a text input field
- Click the icon
- Browse available variables by node
- Click to insert
The picker shows:
- All upstream nodes
- Their output structure
- Data types
Variable Sources
Trigger Data
The trigger node is always available as the first data source.
Form Submission:
{{trigger.fields.name}}
{{trigger.fields.email}}
{{trigger.submittedAt}}
Webhook:
{{trigger.body.userId}}
{{trigger.headers.authorization}}
{{trigger.query.page}}
Schedule:
{{trigger.scheduledTime}}
{{trigger.executionId}}
Previous Node Data
Access data from any node that runs before the current one.
{{http_request_1.response.body}}
{{send_email.messageId}}
{{database_query.rows}}
Loop Variables
Inside a loop, access the current item:
{{loop.item}} // Current item
{{loop.index}} // Current index (0-based)
{{loop.isFirst}} // Boolean
{{loop.isLast}} // Boolean
Expressions
Use JavaScript expressions for transformations.
Basic Expressions
{{trigger.amount * 1.1}} // Math
{{trigger.name.toUpperCase()}} // String methods
{{trigger.items.length}} // Array length
Conditional Expressions
{{trigger.status === 'active' ? 'Yes' : 'No'}}
{{trigger.count > 0 ? trigger.count : 'None'}}
Date Formatting
{{new Date(trigger.createdAt).toLocaleDateString()}}
{{new Date().toISOString()}}
Common Patterns
Building URLs
https://api.example.com/users/{{http_request.response.body.id}}
Composing Messages
Hello {{trigger.fields.name}},
Thanks for your {{trigger.fields.type}} submission.
Your reference number is {{database_insert.id}}.
Array Operations
{{trigger.items.map(i => i.name).join(', ')}}
{{trigger.items.filter(i => i.active).length}}
Debugging Variables
View Node Output
- Run your workflow in test mode
- Click any completed node
- View the Output tab
- See the exact data structure
Common Issues
Variable not found:
- Check spelling and case sensitivity
- Ensure the node runs before the current one
- Verify the path matches the data structure
Undefined value:
- The field may not exist in all cases
- Use optional chaining:
{{trigger.user?.name}} - Provide defaults:
{{trigger.name || 'Guest'}}
Best Practices
- Use descriptive node names - Makes variables easier to understand
- Test with real data - Ensure variables resolve correctly
- Handle missing data - Use defaults for optional fields
- Keep expressions simple - Complex logic belongs in Code nodes
Next Steps
- Conditional Logic - Branch based on data
- Node Types Explained - All node types
- Debugging Errors - Troubleshooting