n8n-expression-syntax

Identify and fix n8n expression syntax errors in {{}} with $json and $node.

1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/rafavital/agile-trends-n8n --skill n8n-expression-syntax-rafavital
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/rafavital/agile-trends-n8n/tree/main/.gemini/skills/n8n-expression-syntax
Command: npx skills add https://github.com/rafavital/agile-trends-n8n --skill n8n-expression-syntax-rafavital

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers and automation engineers ensure their n8n expressions are correct, preventing runtime errors and data leakage by teaching proper usage of {{}} syntax, and highlighting the critical Webhook data structure under .body.

Core Features & Use Cases

  • Clear rules for wrapping expressions with {{}} and correctly referencing $json and $node.
  • Guidance on Webhook data access via $json.body and best practices for node references and array access.
  • Troubleshooting patterns, common mistakes, and quick references that speed up debugging in real workflows.

Quick Start

Review the examples and practice correcting expressions in your own n8n workflows.

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 expression syntax errors when extracting json data?

To fix n8n expression syntax errors, ensure you correctly wrap variables with {{}} and reference $json or $node accurately. Proper syntax prevents runtime errors and ensures correct data extraction from your workflow nodes.

What is the correct way to reference another node's data in n8n expressions?

The correct way to reference node data in n8n expressions is using the $node syntax wrapped in {{}}. This ensures safe node references and accurate data extraction, preventing data leakage and broken workflow logic.

Why does my n8n expression return undefined when accessing webhook payload data?

Your n8n expression returns undefined because webhook payload data is nested under the .body property. You must access it via $json.body instead of referencing the root $json object directly to extract the correct values.

What are common mistakes to avoid when writing n8n expressions for automation workflows?

Common n8n expression mistakes include forgetting the {{}} wrapper, incorrectly referencing $json for webhook body data, and unsafe node references. Following strict syntax rules and debugging patterns prevents these runtime errors.