n8n-expression-syntax

Validate n8n expression syntax for workflows and webhook data handling.

1|1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/alexadark/shorts-generator --skill n8n-expression-syntax
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/alexadark/shorts-generator/tree/main/.claude/skills/n8n-expression-syntax
Command: npx skills add https://github.com/alexadark/shorts-generator --skill n8n-expression-syntax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill teaches correct n8n expression syntax, highlights common gotchas (including webhook data structure), and helps you build reliable automations by avoiding typical mistakes.

Core Features & Use Cases

  • Expression basics: Correct usage of {{ }}, $json, $node, $now, and $env.
  • Webhook data access: Webhook data is under $json.body; root $json contains headers, params, query, and body.
  • Common mistakes and fixes: Access to 15 common mistakes with quick fixes.
  • Node references: Proper syntax for referencing other nodes with quotes.
  • Code vs expression: When to use code nodes vs expressions.

Quick Start

Practice with a few sample expressions: wrap values with {{ }}, refer to webhook body correctly, and test in the expression editor.

Frequently Asked Questions about n8n-expression-syntax

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

FAQPage Schema
How do I write correct n8n expression syntax in workflows?

n8n expressions require double curly braces {{ }} to wrap values. Access webhook data via $json.body, reference other nodes with quoted names like $node["Node Name"].json, and use $now for timestamps and $env for environment variables. Test syntax in the expression editor before running workflows.

Why isn't my webhook data accessible in n8n expressions?

Webhook payload arrives under $json.body; root $json contains headers, params, and query separately. Reference body fields as $json.body.fieldName, not $json.fieldName directly. Verify the webhook node name in node references and check data structure in the debugger.

What are common n8n expression mistakes and how do I fix them?

Common errors include missing or mismatched {{ }}, incorrect $json variable paths, unquoted node names with spaces, nested braces, and case-sensitivity mistakes. The Skill covers 15 frequent mistakes with quick fixes and explains when to use code nodes instead of expressions for complex logic.

How do I reference other nodes and handle nested fields in n8n?

Reference node output with $node["Node Name"].json for exact names including spaces and case. Access nested fields using dot notation: $json.level1.level2 or bracket notation for dynamic keys. Arrays use index access: $json.array[0].property.

When should I use code nodes instead of n8n expressions?

Use expressions for simple variable substitution, field mapping, and date formatting. Switch to code nodes for complex logic, loops, conditional transformations, or when expressions become unreadable. Code nodes support full JavaScript but require manual error handling.

Does n8n expression syntax support arrays and string operations?

Yes. n8n expressions support array indexing, iteration in code nodes, string methods via JavaScript, and date formatting with $now. The Skill covers typical patterns for arrays, spaces in values, and common string operations within expression syntax constraints.