n8n-expression-syntax

Explain n8n expression syntax for variables like $json and $node.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/MaizeCobra/agentic-setup --skill n8n-expression-syntax-maizecobra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/MaizeCobra/agentic-setup/tree/main/.opencode/skills/n8n-expression-syntax
Command: npx skills add https://github.com/MaizeCobra/agentic-setup --skill n8n-expression-syntax-maizecobra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill helps users write correct n8n expressions by understanding the syntax, common pitfalls, and how to troubleshoot errors, especially when dealing with webhook data.

Core Features & Use Cases

  • Syntax Validation: Learn the correct format for n8n expressions (e.g., {{ $json.body.field }}).
  • Error Correction: Identify and fix common mistakes like missing braces, incorrect node referencing, and webhook data access issues.
  • Use Case: When building an n8n workflow that receives data from a webhook, you need to correctly access fields like {{ $json.body.customer_name }} to use that data in subsequent nodes, like sending a personalized email.

Quick Start

Use the n8n-expression-syntax skill to understand how to access webhook data using the correct syntax.

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?

Access webhook data in n8n expressions by targeting the nested payload structure using syntax like {{ $json.body.customer_name }}. This correctly extracts values from incoming webhook requests for downstream nodes.

Why does my n8n expression return an error when referencing a previous node?

n8n expression errors frequently stem from missing braces or incorrect node referencing. Validating the syntax structure and correcting these common mistakes restores accurate dynamic data manipulation.

What are the core variables available in n8n expression syntax?

Core n8n expression variables include $json for incoming data, $node for previous node outputs, $now for timestamps, and $env for environment variables. These enable dynamic data manipulation within workflows.

What is the correct format for writing n8n expressions?

The correct n8n expression format requires wrapping dynamic variables in double curly braces, such as {{ $json.body.field }}. Following this syntax structure ensures accurate data access within n8n workflows.

How do I troubleshoot common n8n expression syntax mistakes?

Troubleshoot n8n expression syntax by checking for missing braces, verifying node references, and validating webhook data structures. Correcting these common pitfalls resolves data manipulation errors and restores workflow execution.

Can I use environment variables in n8n workflow expressions?

Yes, you can use environment variables in n8n expressions via the $env core variable. This allows you to securely reference external configuration data within your dynamic workflow expressions.