n8n-expression-syntax

Validate n8n expression syntax and fix common {{}} errors in workflows.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/stefanomartiradonna/claude-skills --skill n8n-expression-syntax-stefanomartiradonna
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/stefanomartiradonna/claude-skills/tree/main/n8n-expression-syntax
Command: npx skills add https://github.com/stefanomartiradonna/claude-skills --skill n8n-expression-syntax-stefanomartiradonna

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing n8n expressions often leads to silent failures: literal text instead of values, undefined webhook fields, and syntax errors from spaces in node names. This Skill encodes the correct {{ }} syntax rules and the 15 most common mistakes so expressions work the first time. ## Core Features & Use Cases - Syntax Validation Rules: Enforces double curly braces, bracket notation for fields with spaces, quoted case-sensitive node names, and correct $json/$node/$now/$env variable usage. - Webhook Data Gotcha: Teaches the critical rule that webhook payloads live under $json.body, the single most common source of undefined values. - Error Catalog & Examples: Provides 15 documented mistakes with fixes plus 10 real workflow examples covering webhooks, HTTP requests, dates, arrays, and string manipulation. - Use Case: When a Slack node shows "{{$json.name}}" as literal text or returns undefined from a webhook, use this Skill to diagnose the missing braces or missing .body path and correct the expression. ## Quick Start Ask the AI to check why your n8n expression {{$json.email}} returns undefined in a webhook workflow and fix the syntax.

Frequently Asked Questions about n8n-expression-syntax

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I access webhook data in n8n expressions?▼

Access webhook data through {{$json.body.fieldName}} because the Webhook node wraps incoming payloads under the .body property. Using {{$json.fieldName}} returns undefined since the root contains headers, params, and query instead.

Why does my n8n expression show as literal text?▼

Expressions appear as literal text when they are not wrapped in double curly braces. Change $json.email to {{$json.email}} so n8n evaluates it instead of treating it as a plain string.

How do I reference another node in n8n expressions?▼

Use {{$node["Node Name"].json.field}} with the node name in quotes inside brackets. Node names are case-sensitive and must match the workflow exactly, and the .json property is required before accessing fields.

Can I use {{ }} expressions inside n8n Code nodes?▼

No, Code nodes use direct JavaScript access without curly braces. Write const email = $json.email or use $input.item.json.email instead of the {{ }} expression syntax, which only works in expression fields of other nodes.

How do I handle field names with spaces in n8n expressions?▼

Use bracket notation with quotes for fields containing spaces, such as {{$json['first name']}} or {{$json['user data'].email}}. Dot notation fails with spaces because JavaScript interprets the space as the end of the property name.