Documentation Index
Fetch the complete documentation index at: https://mintlify.com/czlonkowski/n8n-skills/llms.txt
Use this file to discover all available pages before exploring further.
n8n Expression Syntax
All dynamic content in n8n uses double curly braces:Core Variables
$json — Current Node Output
Access data from the current node in the workflow:
$node — Reference Other Nodes
Access data from any previous node by name:
Node names must be in quotes inside brackets. Node names are case-sensitive and must match the exact name in your workflow.
$now — Current Timestamp
Access and format the current date/time using Luxon:
$env — Environment Variables
Access n8n environment variables:
Webhook Data Structure
The webhook node wraps all incoming request data:Common Patterns
Nested Fields
Combining Variables
Multi-Node Data Flow
When NOT to Use Expressions
- Code Nodes
- Webhook Paths
- Credential Fields
Data Type Handling
- Arrays
- Objects
- Strings
- Numbers
Advanced Patterns
Conditional Content
Date Manipulation
String Manipulation
Common Mistakes Quick Reference
| Mistake | Fix |
|---|---|
$json.field | {{$json.field}} |
{{$json.field name}} | {{$json['field name']}} |
{{$node.HTTP Request}} | {{$node["HTTP Request"]}} |
{{{$json.field}}} | {{$json.field}} |
{{$json.name}} (from webhook) | {{$json.body.name}} |
'={{$json.email}}' (in Code node) | $json.email |
{{$json.items.0.name}} | {{$json.items[0].name}} |
`Hello ${$json.name}` (template literal) | Hello {{$json.name}} |
{{$node["HTTP Request"].data}} | {{$node["HTTP Request"].json.data}} |
Complete Error Catalog
Missing curly braces
Missing curly braces
Symptom: Field shows literal text like
$json.email instead of the actual value.Webhook body access
Webhook body access
Symptom: Undefined values when accessing webhook data even though the data is being sent.
Spaces in field names
Spaces in field names
Symptom: Syntax error or undefined when the field definitely exists.
Spaces in node names
Spaces in node names
Symptom: Error like
"Cannot read property 'Request' of undefined".Wrong node name case
Wrong node name case
Symptom: Undefined value even though the node exists and has data.
Double wrapping
Double wrapping
Symptom: Output shows
{{value}} instead of the actual value.Array access with dots
Array access with dots
Symptom: Syntax error or undefined.
Using = prefix outside JSON mode
Using = prefix outside JSON mode
Symptom: Output shows
=john@example.com instead of john@example.com.Missing .json in $node reference
Missing .json in $node reference
Symptom: Undefined value when you know the node has data.
Debugging Expressions
Open the expression editor
Click the field containing the expression, then click the fx icon to open the expression editor.
Check the live preview
The expression editor shows a live preview of the result. Check for values appearing as
undefined or error messages highlighted in red.Common error messages
- “Cannot read property ‘X’ of undefined” → Parent object doesn’t exist; check your data path
- “X is not a function” → Calling a method on the wrong type; check the variable type
- Expression shows as literal text → Missing
{{ }}; add curly braces
Expression Helper Reference
| Type | Available Methods |
|---|---|
| String | .toLowerCase(), .toUpperCase(), .trim(), .replace(), .substring(), .split(), .includes() |
| Array | .length, .map(), .filter(), .find(), .join(), .slice(), .reduce() |
| DateTime (Luxon) | .toFormat(), .toISO(), .toLocal(), .plus(), .minus(), .set() |
| Number | .toFixed(), .toString(), +, -, *, /, % |
Best Practices
Do
- Always use
{{ }}for dynamic content - Use bracket notation for field names with spaces
- Access webhook data from
.body - Use
$nodeto reference data from earlier nodes - Test expressions in the expression editor
Don't
- Use
{{ }}inside Code nodes - Forget quotes around node names with spaces
- Double-wrap with extra
{{ }} - Assume webhook data is at the root
- Use expressions in webhook paths or credential fields