n8n-expression-syntax

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

Updated Aug 3, 2026
One-click install
npx skills add https://github.com/alvarocubacc/n8n-workflow-builder --skill n8n-expression-syntax-alvarocubacc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/alvarocubacc/n8n-workflow-builder/tree/main/n8n-skills/skills/n8n-expression-syntax
Command: npx skills add https://github.com/alvarocubacc/n8n-workflow-builder --skill n8n-expression-syntax-alvarocubacc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing n8n expressions often leads to silent failures: missing curly braces, wrong webhook data paths, 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 resolve to actual values instead of literal text or undefined. ## Core Features & Use Cases - Syntax Validation Rules: Covers the {{ }} format, core variables ($json, $node, $now, $env), bracket notation for names with spaces, and case-sensitive node references. - Webhook Data Gotcha: Documents the critical rule that webhook payloads live under $json.body, the single most common source of undefined values. - Error Catalog & Examples: Includes COMMON_MISTAKES.md with 15 diagnosed errors and EXAMPLES.md with 10 working scenarios (webhook to Slack, HTTP to database, date formatting, array operations). - Use Case: When a Slack node shows "{{$json.name}}" as literal text or returns undefined from a webhook, use this Skill to identify the missing braces or the missing .body path and correct the expression. ## Quick Start Ask the AI to check why your n8n expression returns undefined or literal text, and have it rewrite the expression using correct {{ }} syntax and webhook .body paths.

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, for example {{$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 does my n8n expression show as literal text instead of a value?

The expression is missing double curly braces. n8n only evaluates content wrapped in {{ }}, so $json.email renders as plain text while {{$json.email}} resolves to the actual value.

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; wrapping values in {{ }} inside a Code node produces literal strings.

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

Use {{$node["Node Name"].json.field}} with the node name in quotes and matching the exact case from the workflow. Node names with spaces require bracket notation, and the .json property is mandatory before accessing fields.

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

Use bracket notation such as {{$json['first name']}} instead of dot notation. Spaces break dot syntax because JavaScript treats the space as the end of the property name, causing syntax errors or undefined values.