n8n-expression-syntax

Validate and teach n8n expression syntax for variables like $json and $node.

1|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/arroschaves/brandaocontador-site --skill n8n-expression-syntax-arroschaves
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/arroschaves/brandaocontador-site/tree/main/.agent/skills/n8n-expression-syntax
Command: npx skills add https://github.com/arroschaves/brandaocontador-site --skill n8n-expression-syntax-arroschaves

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write correct n8n expressions by explaining syntax rules, common pitfalls, and providing practical examples, preventing workflow errors and ensuring data flows correctly.

Core Features & Use Cases

  • Syntax Validation: Understand the correct usage of {{}}, $json, $node, $now, and $env variables.
  • Error Prevention: Learn to avoid common mistakes like incorrect webhook data access (.body), issues with spaces in field/node names, and misuse in Code nodes.
  • Use Case: When building an n8n workflow that receives data from a webhook, this Skill ensures you correctly access the incoming data using {{$json.body.fieldName}} instead of the incorrect {{$json.fieldName}}, preventing "undefined" errors.

Quick Start

Use the n8n-expression-syntax skill to learn how to correctly reference data from a previous webhook node in your current node.

Frequently Asked Questions about n8n-expression-syntax

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

FAQPage Schema
How do I access webhook data in n8n expressions without getting undefined errors?

Access webhook data in n8n expressions using `{{$json.body.fieldName}}` instead of `{{$json.fieldName}}` to prevent undefined errors. This ensures accurate data manipulation within your workflow.

Why does my n8n expression syntax fail when referencing previous node data?

n8n expression syntax fails when referencing previous node data if you misuse `{{}}`, encounter spaces in field/node names, or use expression syntax instead of direct access in Code nodes. Validate your syntax rules for correct data mapping.

What is the correct syntax for using variables like $json, $now, and $env in n8n?

The correct syntax for using variables like $json, $now, and $env in n8n requires wrapping them in double curly braces `{{}}`. This syntax validates data access and ensures accurate workflow automation without common errors.

Can I use n8n expression syntax directly inside a Code node?

Do not use n8n expression syntax inside a Code node. Code nodes require direct JavaScript access to variables rather than the `{{}}` expression syntax used in regular nodes, preventing execution errors.

How do I troubleshoot common n8n workflow automation errors related to expressions?

Troubleshoot n8n workflow expression errors by checking variable usage like `$json` and `$node`, verifying webhook data access via `.body`, and ensuring proper `{{}}` syntax wrapping to resolve data manipulation issues.