n8n-expression-syntax – Writing & Content skill for AI agents
Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.
Install the n8n-expression-syntax skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/n8n-expression-syntax-1020c.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /n8n-expression-syntax – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/n8n-expression-syntax-1020c.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $n8n-expression-syntax – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/n8n-expression-syntax-1020c.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /n8n-expression-syntax – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/n8n-expression-syntax-1020c.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /n8n-expression-syntax – then describe the task you want done.
SKILL.md content
n8n Expression Syntax
Expert guide for writing correct n8n expressions in workflows.
Execution and data scope
EXAMPLES.md and COMMON_MISTAKES.md referenced below/in the guide are not bundled. $json in expression parameters represents the current input item, not a completed current node output; inspect actual execution data and item linking before referencing another node. Code-node APIs differ between per-item and all-items modes. Use credentials for secrets: the guide's $env examples can expose values and may be disabled. Avoid putting secrets/personal webhook data into messages or logs. Encode URL path/query components, guard missing arrays/objects and validate untrusted values before downstream actions. Test expressions with synthetic input; preview success is not authorization to send Slack/email messages.
Detailed Guide
Read [the detailed guide](references/detailed-guide.md) before executing this skill. It retains the complete procedure and reference material. Treat its safety, prerequisites, and validation requirements as mandatory. For focused work, load the relevant sections; for end-to-end work, read the guide completely.
When to Use
- You need to write or debug n8n expressions using
{{ ... }}syntax. - The task involves
$json,$node, webhook payloads, or expression-related workflow errors. - You want syntax-correct dynamic values inside n8n nodes and parameters.
---
When NOT to Use Expressions
❌ Code Nodes
Code nodes use direct JavaScript access, NOT expressions!
// ❌ WRONG in Code node
const email = '={{$json.email}}';
const name = '{{$json.body.name}}';
// ✅ CORRECT in Code node
const email = $json.email;
const name = $json.body.name;
// Or using Code node API
const email = $input.item.json.email;
const allItems = $input.all();❌ Webhook Paths
// ❌ WRONG
path: "{{$json.user_id}}/webhook"
// ✅ CORRECT
path: "user-webhook" // Static paths only❌ Credential Fields
// ❌ WRONG
apiKey: "={{$env.API_KEY}}"
// ✅ CORRECT
Use n8n credential system, not expressions---
Working Examples
For real workflow examples, see EXAMPLES.md
Example 1: Webhook to Slack
Webhook receives:
{
"body": {
"name": "John Doe",
"email": "[email protected]",
"message": "Hello!"
}
}In Slack node text field:
New form submission!
Name: {{$json.body.name}}
Email: {{$json.body.email}}
Message: {{$json.body.message}}Example 2: HTTP Request to Email
HTTP Request returns:
{
"data": {
"items": [
{"name": "Product 1", "price": 29.99}
]
}
}In Email node (reference HTTP Request):
Product: {{$node["HTTP Request"].json.data.items[0].name}}
Price: ${{$node["HTTP Request"].json.data.items[0].price}}Example 3: Format Timestamp
// Current date
{{$now.toFormat('yyyy-MM-dd')}}
// Result: 2025-10-20
// Time
{{$now.toFormat('HH:mm:ss')}}
// Result: 14:30:45
// Full datetime
{{$now.toFormat('yyyy-MM-dd HH:mm')}}
// Result: 2025-10-20 14:30---
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Related skills
- n8n-multi-instance – Select, verify, and safely switch n8n MCP instances across production, staging, teams…
- neon-postgres-branches – Choose and create the right Neon branch type for testing and development. Use when users…
- neon-postgres-egress-optimizer – Diagnose and fix excessive Postgres egress (network data transfer) in a codebase.
- obsidian-bases – Create and edit Obsidian Bases (.base files) with views, filters, formulas, and…
- obsidian-clipper-template-creator – Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a…
- odoo-orm-expert – Master Odoo ORM patterns: search, browse, create, write, domain filters, computed…
- odoo-performance-tuner – Expert guide for diagnosing and fixing Odoo performance issues: slow queries, worker…
- odoo-upgrade-advisor – Step-by-step Odoo version upgrade advisor: pre-upgrade checklist, community vs…