n8n-expression-syntax

Validate and fix n8n expression syntax for $json, $node, $now, and $env.

1|Updated Feb 3, 2026
One-click install
npx skills add https://github.com/JulioBorges/ag-n8n-skills --skill n8n-expression-syntax-julioborges
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/JulioBorges/ag-n8n-skills/tree/main/.agent/.skills/n8n-automation/n8n-expression-syntax
Command: npx skills add https://github.com/JulioBorges/ag-n8n-skills --skill n8n-expression-syntax-julioborges

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing correct n8n expressions is error-prone. This Skill helps users validate and fix common mistakes, ensuring that dynamic content is properly wrapped in {{}} and that webhook data is accessed from the correct path.

Core Features & Use Cases

  • Clear rules for using {{}} with core variables ($json, $node, $now, $env) and proper data access patterns.
  • Guidance for referencing other nodes, handling nested fields, arrays, and spaces (including bracket notation for names with spaces).
  • Troubleshooting tips, including the critical Webhook .body access pattern and common pitfalls in code nodes.

Quick Start

  • Test expressions in the n8n expression editor to see live results.
  • Use the included examples in EXAMPLES.md to practice correct usage (e.g., {{$json.body.name}}, {{$node["HTTP Request"].json.data}}).
  • Review COMMON_MISTAKES.md for typical mistakes and fixes.

Frequently Asked Questions about n8n-expression-syntax

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

FAQPage Schema
How do I fix n8n webhook expression syntax not returning data?

n8n webhook expression syntax errors often occur because payload data is not accessed from the correct path. You must extract incoming request data using the .body property, such as {{$json.body.name}}, to ensure the webhook payload is properly evaluated.

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

Referencing another node in n8n expressions requires correct bracket notation for names with spaces. You must use the syntax {{$node["HTTP Request"].json.data}} to access outputs from previous nodes, ensuring the node name string is exact and properly quoted.

Why does my n8n expression show as plain text instead of dynamic content?

n8n expressions show as plain text when dynamic variables are not properly wrapped in curly braces. You must enclose variables like $json, $node, $now, and $env within {{}} so the n8n expression editor evaluates them as dynamic content instead of literal strings.

What is the correct syntax for accessing environment variables in n8n?

Accessing environment variables in n8n syntax uses the $env variable within curly braces. You must format your n8n expression as {{$env.VARIABLE_NAME}} to securely inject environment configurations into your workflow nodes without exposing them in plain text.

How do I handle spaces in node names when writing n8n expressions?

Handling spaces in node names within n8n expressions requires bracket notation. You must use square brackets and quotes around the node name, like {{$node["My Custom Node"].json.field}}, to ensure the expression parser correctly targets the intended workflow node.

Does this n8n expression validation cover code node mistakes?

Yes, n8n expression validation covers common pitfalls in code nodes by enforcing best practices for data access. It provides troubleshooting tips to prevent syntax mistakes when handling $json arrays and nested fields within your custom workflow logic.