n8n-expression-syntax

Write correct n8n expressions and diagnose common workflow mistakes.

71|14|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/ProfSynapse/PACT-Plugin --skill n8n-expression-syntax-profsynapse
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n8n-expression-syntax
Source: https://github.com/ProfSynapse/PACT-Plugin/tree/main/pact-plugin/skills/n8n-expression-syntax
Command: npx skills add https://github.com/ProfSynapse/PACT-Plugin --skill n8n-expression-syntax-profsynapse

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps users write correct n8n expressions and diagnose common mistakes, enabling reliable data extraction and node references in workflows.

Core Features & Use Cases

  • Guided syntax rules: Understand correct usage of {{ }} expressions, and when to use $json, $node, $now, and $env.
  • Webhook data gotcha: Learn that webhook data lives under .body and how to access it safely.
  • Reference patterns: How to reference data from other nodes and navigate spaces in field names with bracket notation.
  • Common mistakes: A catalog of typical errors with fixes to speed up debugging in real workflows.
  • Use case example: Validate a webhook payload and build a dynamic API call using expressions.

Quick Start

Start by reading through the Quick Start guide to validate a sample webhook payload. Then try writing expressions like {{$json.body.name}}, {{$node["HTTP Request"].json.data}}, and {{$now.toFormat('yyyy-MM-dd')}} in a test workflow.

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?

Incoming webhook data in n8n is accessed via the {{$json.body}} syntax, because webhook payloads live under the body property. This ensures you extract the correct data structure from your webhook node.

Why is my n8n expression not working when referencing fields with spaces?

n8n expressions fail with spaced field names when using dot notation. Use bracket notation like {{$json["my field"]}} to navigate spaces in field names safely and resolve the reference error.

How do I reference data from previous nodes in an n8n workflow expression?

Reference data from previous nodes using the {{$node["Node Name"].json}} syntax. This pattern allows you to extract specific data outputs from any named node within your n8n workflow expressions.

How do I format the current date in n8n expressions?

Format the current date in n8n using the {{$now.toFormat('yyyy-MM-dd')}} expression. This leverages the built-in $now variable to generate dynamic date strings within your workflow nodes.

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

Common n8n expression mistakes include missing double curly braces {{ }} and incorrect variable references. Fix these by ensuring proper syntax and using the correct $json or $node variables for data extraction.