n8n-expression-syntax

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

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

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 broken node references. This Skill teaches correct {{ }} expression syntax and catalogs the 15 most common mistakes with fixes, including the critical webhook .body data structure gotcha. ## Core Features & Use Cases - Syntax Validation Rules: Covers the core variables ($json, $node, $now, $env), bracket notation for names with spaces, and case-sensitive node references. - Error Catalog: 15 documented mistakes with wrong/correct examples, a quick-reference fix table, and a step-by-step debugging process. - Real Workflow Examples: 10 working examples including webhook-to-Slack, HTTP-to-database, date formatting, array operations, and conditional logic. - Use Case: A user builds a webhook-to-Slack workflow but sees "undefined" for submitted form fields; the Skill identifies that webhook data lives under $json.body and provides the corrected expression. ## Quick Start Ask the AI to check why your n8n expression {{$json.name}} returns undefined in a webhook workflow and show 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, 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}} returns the actual value.

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 data always sits under the .json property.

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 handle field names with spaces in n8n expressions?

Use bracket notation with quotes, such as {{$json['first name']}} or {{$json['user data'].email}}. Dot notation breaks on spaces 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 the n8n credential system rather than environment variable expressions.