n8n-expression-syntax

Validate and teach n8n expression syntax with variables and webhook data.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/royhenengel/Claude-Customizations --skill n8n-expression-syntax-royhenengel
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/royhenengel/Claude-Customizations/tree/main/skills/Platform/n8n/references/n8n-expression-syntax
Command: npx skills add https://github.com/royhenengel/Claude-Customizations --skill n8n-expression-syntax-royhenengel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write correct n8n expressions, preventing common errors like incorrect webhook data access or syntax mistakes, ensuring workflows function as intended.

Core Features & Use Cases

  • Syntax Validation: Understand and apply the correct {{ }} syntax for dynamic content.
  • Variable Usage: Learn to use $json, $node, $now, and $env variables accurately.
  • Webhook Data Handling: Correctly access data sent via webhooks, which is nested under .body.
  • Use Case: When building an n8n workflow that receives data from a webhook and needs to use the sender's email address in a subsequent node, this Skill ensures you correctly reference it as {{$json.body.email}} instead of the common mistake {{$json.email}}.

Quick Start

Use the n8n-expression-syntax skill to correctly reference the 'user_id' field from a webhook request.

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?

To access webhook data in n8n expressions, reference fields under the `body` object, such as `{{$json.body.email}}`. A common mistake is using `{{$json.email}}`, which fails because webhook payloads are nested under `body`.

What is the correct syntax for dynamic variables in n8n workflows?

The correct syntax for dynamic variables in n8n workflows is wrapping expressions in double curly braces `{{ }}`. This allows you to inject dynamic content and reference variables like `$json`, `$node`, and `$now` accurately within your nodes.

Why does my n8n expression error when referencing previous node data?

Your n8n expression errors when referencing previous node data due to incorrect variable usage. Use `$json` for the current node's data or `$node` to reference outputs from specific upstream nodes, ensuring your syntax is valid.

How do I use environment variables in n8n expressions?

To use environment variables in n8n expressions, wrap the `$env` variable in the `{{ }}` syntax. This allows your workflow to securely access external configuration values without hardcoding them directly into the workflow logic.

Can I generate dynamic timestamps using n8n expressions?

You can generate dynamic timestamps in n8n expressions by using the `$now` variable inside `{{ }}` syntax. This injects the current date and time into your workflow, which is useful for logging and scheduling tasks.

What are common pitfalls when writing n8n expressions?

Common pitfalls when writing n8n expressions include incorrect webhook data access, missing `{{ }}` wrapping, and misusing `$json` or `$node` for cross-node data referencing. Validating your syntax prevents these workflow errors.