n8n-expression-syntax

Validates n8n expression syntax and fixes common {{}} errors in workflows.

2|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/mdc159/cbass --skill n8n-expression-syntax-mdc159
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/mdc159/cbass/tree/main/.claude/skills/n8n-expression-syntax-v1.0.0
Command: npx skills add https://github.com/mdc159/cbass --skill n8n-expression-syntax-mdc159

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing n8n expressions often leads to silent failures: missing curly braces, undefined webhook data, broken node references, and expressions mistakenly used inside Code nodes. This Skill provides the correct syntax rules, a catalog of 15 common mistakes with fixes, and real workflow examples so expressions evaluate correctly the first time. ## Core Features & Use Cases - Syntax Validation Rules: Covers the {{ }} expression format and core variables ($json, $node, $now, $env) with correct usage patterns. - Webhook Data Gotcha: Explains the critical detail that webhook payloads live under $json.body, the single most common source of undefined values. - Error Catalog & Examples: 15 documented mistakes with wrong/correct comparisons plus 10 real workflow examples (webhook to Slack, HTTP to database, date formatting, array operations). - Use Case: A user building a webhook-to-Slack workflow sees "undefined" in their message. The Skill identifies that {{$json.name}} must be {{$json.body.name}} and provides the corrected expression. ## Quick Start Ask the AI to check why your n8n expression {{$json.email}} returns undefined in a webhook workflow and provide the corrected 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 the .body property, like {{$json.body.email}}. The webhook node wraps incoming payloads under body to preserve headers, params, and query, so {{$json.email}} at the root returns undefined.

Why is my n8n expression showing as literal text?▼

Expressions without double curly braces are treated as literal strings. Wrap the expression in {{ }}, for example {{$json.email}} instead of $json.email, and avoid double-wrapping like {{{$json.field}}}.

How do I reference another node's data in n8n?▼

Use {{$node["Node Name"].json.field}} with the node name in quotes and matching exact case. Node names with spaces require bracket notation, such as {{$node["HTTP Request"].json.data}}.

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

No, Code nodes use direct JavaScript access instead of expression syntax. Write const email = $json.email or use $input.item.json.email rather than '{{$json.email}}', which would be treated as a literal string.

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 because JavaScript interprets the space as the end of the property name.

When should n8n expressions not be used?▼

Avoid expressions in Code nodes, webhook paths, and credential fields. Webhook paths must be static or use URL parameters like :userId, and credentials should use n8n's credential system rather than {{$env.VAR}} references.