n8n-expression-syntax

Validate and correct n8n expression syntax for node fields and webhook payloads.

84|23|Updated May 6, 2026
One-click install
npx skills add https://github.com/MorrisLu-Taipei/TigerAI-n8n-Skill-Pack --skill n8n-expression-syntax-morrislu-taipei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/MorrisLu-Taipei/TigerAI-n8n-Skill-Pack/tree/main/skills/_vendor/n8n-expression-syntax
Command: npx skills add https://github.com/MorrisLu-Taipei/TigerAI-n8n-Skill-Pack --skill n8n-expression-syntax-morrislu-taipei

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

n8n workflows frequently fail because expressions are written with incorrect syntax or reference the wrong data shape, especially for webhook payloads that are not stored at the root.

Core Features & Use Cases

  • Correct expression syntax & variables: Ensures you use the proper {{ }} format and understand how to access $json, $node, $now, and $env.
  • Webhook payload correctness: Prevents the critical mistake of reading webhook values from $json directly instead of using $json.body.*.
  • Reliable troubleshooting patterns: Covers common errors like missing braces, wrong node name quoting/casing, double-wrapping, array indexing, and incorrect use of expressions in Code nodes, with fixes and examples.

Quick Start

Tell the AI: "Given this n8n node field value and the workflow context (webhook vs other nodes), rewrite the expression to correctly access the intended data and explain the mistake you corrected."

Frequently Asked Questions about n8n-expression-syntax

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

FAQPage Schema
Why does my n8n webhook payload expression fail when I use $json directly?

n8n webhook payloads are not stored at the root, so reading $json directly fails. You must access webhook values using $json.body.* to correctly map the incoming payload data in your expression syntax.

How do I correctly reference data from another node in an n8n expression?

To reference data from another node in n8n expressions, use $node with correct quoting and exact casing for the node name, ensuring proper double-curly {{ }} wrapping to prevent workflow debugging errors.

Can I use double curly braces {{ }} inside n8n Code nodes?

No, you should not use double curly braces {{ }} inside n8n Code nodes. Code nodes execute standard JavaScript, so wrapping variables in expression syntax is disallowed and will cause syntax validation failures.

What is the correct syntax for accessing array elements and spaces in n8n variables?

Access n8n array elements using bracket index notation like [0], and use bracket notation for field names containing spaces. This ensures correct data mapping and prevents expression syntax errors during workflow debugging.

How do I fix missing braces or wrong variable paths in n8n expressions?

Fix n8n expression errors by ensuring proper double-curly wrapping, verifying correct .json/.body paths, and checking for missing braces or double-wrapping. Use $json, $node, $now, and $env variables accurately to stop workflows from breaking.