n8n-expression-syntax

Validate and fix n8n expression syntax in workflow fields.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers and data automation professionals correctly use n8n expression syntax, reducing errors and debugging time when building workflows that rely on dynamic data.

Core Features & Use Cases

  • Clear rules for wrapping expressions in {{ }} and how to access $json, $node, $now, and $env.
  • Guidance on common pitfalls: referencing the wrong node, webhook data under .body, and when to avoid expressions in Code nodes.
  • Real-world usage examples to validate and compose expressions in Slack-like messages, HTTP requests, and data transformations.

Quick Start

Start with reading the guide, then practice placing expressions such as {{$json.body.name}} or {{$node["HTTP Request"].json.data}} in workflow fields and verify results 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 n8n expressions to access webhook data correctly?

To access webhook data in n8n expressions, use the {{$json.body}} pattern. Webhook payloads reside under the .body property, so referencing {{$json.body.fieldName}} ensures your workflow retrieves the correct data from incoming requests.

What is the correct syntax for n8n expressions when referencing other nodes?

The correct syntax for cross-node references in n8n expressions is {{$node["Node Name"].json.field}}. You must wrap the node name in brackets and quotes, and always wrap the entire expression in double curly braces.

Why does my n8n expression fail inside a Code node?

n8n expressions fail inside Code nodes because Code nodes execute JavaScript directly, not n8n expression syntax. You should write standard JavaScript code to manipulate data instead of using {{}} templates in Code nodes.

How do I validate n8n expression syntax for dynamic workflow fields?

You validate n8n expression syntax by testing dynamic fields in the Expression Editor. Ensure expressions use proper {{}} wrapping and correct $json or $node access patterns to prevent workflow automation errors during data transformation.

Can I use $now and $env variables in n8n workflow expressions?

Yes, you can use $now and $env variables in n8n workflow expressions by wrapping them in {{}} syntax. These variables allow you to dynamically inject current timestamps and environment variables into your workflow node configurations.

What are common mistakes when building n8n expressions for HTTP requests?

Common mistakes building n8n expressions for HTTP requests include referencing the wrong node name, failing to use the .body property for webhook data, and forgetting the double curly braces. Validate your syntax in the Expression Editor to avoid these errors.