Agent skill

N8n Expression Syntax

by davila7 in davila7/claude-code-templates

Validate n8n expression syntax and fix common errors. An agent skill from davila7/claude-code-templates.

MITAuto-check passedProductivity & Automation

Install N8n Expression Syntax

skills CLI
$ npx skills add davila7/claude-code-templates --skill n8n-expression-syntax -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates n8n-expression-syntax --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/workflow-automation/n8n/n8n-expression-syntax .claude/skills/n8n-expression-syntax && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
n8n-expression-syntax
GitHub stars
32k
Used in
4 other repos
Token cost
~2.4k tokens
SKILL.md length
554 words
Files
4
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Validate n8n expression syntax and fix common errors. An agent skill from davila7/claude-code-templates.

  • Works in 4 steps: Always Use {{}} → Use Quotes for Spaces → Match Exact Node Names → …
  • Writing n8n expressions
  • SKILL.md covers Expression Format, Core Variables, 🚨 CRITICAL: Webhook Data… and Common Patterns, plus 5 more sections
  • Needs API_KEY

What it does

N8n Expression Syntax is an agent skill from davila7/claude-code-templates. 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.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `COMMON_MISTAKES.md`, `EXAMPLES.md` and `README.md`).

It sits in Productivity & Automation, covering Workflow automation and Webhooks. It works with n8n. The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

When your agent uses it

  • Writing n8n expressions
  • Using {{}} syntax
  • Accessing $json/$node variables
  • Troubleshooting expression errors

Example prompts

  • “/n8n-expression-syntax”

Requirements

  • A credential in API_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Always Use {{}}
  2. Use Quotes for Spaces
  3. Match Exact Node Names
  4. No Nested {{}}

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

N8n Expression Syntax loads about 2.4k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 554 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 554 words, ~2,378 tokens.

Download SKILL.mdSave it as .claude/skills/n8n-expression-syntax/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
n8n-expression-syntax
description
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.

n8n Expression Syntax

Expert guide for writing correct n8n expressions in workflows.


Expression Format

All dynamic content in n8n uses double curly braces:

{{expression}}

Examples:

✅ {{$json.email}}
✅ {{$json.body.name}}
✅ {{$node["HTTP Request"].json.data}}
❌ $json.email  (no braces - treated as literal text)
❌ {$json.email}  (single braces - invalid)

Core Variables

$json - Current Node Output

Access data from the current node:

javascript
{{$json.fieldName}}
{{$json['field with spaces']}}
{{$json.nested.property}}
{{$json.items[0].name}}
$node - Reference Other Nodes

Access data from any previous node:

javascript
{{$node["Node Name"].json.fieldName}}
{{$node["HTTP Request"].json.data}}
{{$node["Webhook"].json.body.email}}

Important:

  • Node names must be in quotes
  • Node names are case-sensitive
  • Must match exact node name from workflow
$now - Current Timestamp

Access current date/time:

javascript
{{$now}}
{{$now.toFormat('yyyy-MM-dd')}}
{{$now.toFormat('HH:mm:ss')}}
{{$now.plus({days: 7})}}
$env - Environment Variables

Access environment variables:

javascript
{{$env.API_KEY}}
{{$env.DATABASE_URL}}

🚨 CRITICAL: Webhook Data Structure

Most Common Mistake: Webhook data is NOT at the root!

Webhook Node Output Structure
javascript
{
  "headers": {...},
  "params": {...},
  "query": {...},
  "body": {           // ⚠️ USER DATA IS HERE!
    "name": "John",
    "email": "john@example.com",
    "message": "Hello"
  }
}
Correct Webhook Data Access
javascript
❌ WRONG: {{$json.name}}
❌ WRONG: {{$json.email}}

✅ CORRECT: {{$json.body.name}}
✅ CORRECT: {{$json.body.email}}
✅ CORRECT: {{$json.body.message}}

Why: Webhook node wraps incoming data under .body property to preserve headers, params, and query parameters.


Common Patterns

Access Nested Fields
javascript
// Simple nesting
{{$json.user.email}}

// Array access
{{$json.data[0].name}}
{{$json.items[0].id}}

// Bracket notation for spaces
{{$json['field name']}}
{{$json['user data']['first name']}}
Reference Other Nodes
javascript
// Node without spaces
{{$node["Set"].json.value}}

// Node with spaces (common!)
{{$node["HTTP Request"].json.data}}
{{$node["Respond to Webhook"].json.message}}

// Webhook node
{{$node["Webhook"].json.body.email}}
Combine Variables
javascript
// Concatenation (automatic)
Hello {{$json.body.name}}!

// In URLs
https://api.example.com/users/{{$json.body.user_id}}

// In object properties
{
  "name": "={{$json.body.name}}",
  "email": "={{$json.body.email}}"
}

When NOT to Use Expressions

❌ Code Nodes

Code nodes use direct JavaScript access, NOT expressions!

javascript
// ❌ 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
javascript
// ❌ WRONG
path: "{{$json.user_id}}/webhook"

// ✅ CORRECT
path: "user-webhook"  // Static paths only
❌ Credential Fields
javascript
// ❌ WRONG
apiKey: "={{$env.API_KEY}}"

// ✅ CORRECT
Use n8n credential system, not expressions

Validation Rules

1. Always Use {{}}

Expressions must be wrapped in double curly braces.

javascript
❌ $json.field
✅ {{$json.field}}
2. Use Quotes for Spaces

Field or node names with spaces require bracket notation:

javascript
❌ {{$json.field name}}
✅ {{$json['field name']}}

❌ {{$node.HTTP Request.json}}
✅ {{$node["HTTP Request"].json}}
3. Match Exact Node Names

Node references are case-sensitive:

javascript
❌ {{$node["http request"].json}}  // lowercase
❌ {{$node["Http Request"].json}}  // wrong case
✅ {{$node["HTTP Request"].json}}  // exact match
4. No Nested {{}}

Don't double-wrap expressions:

javascript
❌ {{{$json.field}}}
✅ {{$json.field}}

Common Mistakes

For complete error catalog with fixes, see COMMON_MISTAKES.md

Quick Fixes
MistakeFix
$json.field{{$json.field}}
{{$json.field name}}{{$json['field name']}}
{{$node.HTTP Request}}{{$node["HTTP Request"]}}
{{{$json.field}}}{{$json.field}}
{{$json.name}} (webhook){{$json.body.name}}
'={{$json.email}}' (Code node)$json.email

Working Examples

For real workflow examples, see EXAMPLES.md

Example 1: Webhook to Slack

Webhook receives:

json
{
  "body": {
    "name": "John Doe",
    "email": "john@example.com",
    "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:

json
{
  "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
javascript
// 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

Data Type Handling

Arrays
javascript
// First item
{{$json.users[0].email}}

// Array length
{{$json.users.length}}

// Last item
{{$json.users[$json.users.length - 1].name}}
Objects
javascript
// Dot notation (no spaces)
{{$json.user.email}}

// Bracket notation (with spaces or dynamic)
{{$json['user data'].email}}
Strings
javascript
// Concatenation (automatic)
Hello {{$json.name}}!

// String methods
{{$json.email.toLowerCase()}}
{{$json.name.toUpperCase()}}
Numbers
javascript
// Direct use
{{$json.price}}

// Math operations
{{$json.price * 1.1}}  // Add 10%
{{$json.quantity + 5}}

Advanced Patterns

Conditional Content
javascript
// Ternary operator
{{$json.status === 'active' ? 'Active User' : 'Inactive User'}}

// Default values
{{$json.email || 'no-email@example.com'}}
Date Manipulation
javascript
// Add days
{{$now.plus({days: 7}).toFormat('yyyy-MM-dd')}}

// Subtract hours
{{$now.minus({hours: 24}).toISO()}}

// Set specific date
{{DateTime.fromISO('2025-12-25').toFormat('MMMM dd, yyyy')}}
String Manipulation
javascript
// Substring
{{$json.email.substring(0, 5)}}

// Replace
{{$json.message.replace('old', 'new')}}

// Split and join
{{$json.tags.split(',').join(', ')}}

Debugging Expressions

Test in Expression Editor
  1. Click field with expression
  2. Open expression editor (click "fx" icon)
  3. See live preview of result
  4. Check for errors highlighted in red
Common Error Messages

"Cannot read property 'X' of undefined" → Parent object doesn't exist → Check your data path

"X is not a function" → Trying to call method on non-function → Check variable type

Expression shows as literal text → Missing {{ }} → Add curly braces


Show full SKILL.md (211 more words)Show less

Expression Helpers

Available Methods

String:

  • .toLowerCase(), .toUpperCase()
  • .trim(), .replace(), .substring()
  • .split(), .includes()

Array:

  • .length, .map(), .filter()
  • .find(), .join(), .slice()

DateTime (Luxon):

  • .toFormat(), .toISO(), .toLocal()
  • .plus(), .minus(), .set()

Number:

  • .toFixed(), .toString()
  • Math operations: +, -, *, /, %

Best Practices

✅ Do
  • Always use {{ }} for dynamic content
  • Use bracket notation for field names with spaces
  • Reference webhook data from .body
  • Use $node for data from other nodes
  • Test expressions in expression editor
❌ Don't
  • Don't use expressions in Code nodes
  • Don't forget quotes around node names with spaces
  • Don't double-wrap with extra {{ }}
  • Don't assume webhook data is at root (it's under .body!)
  • Don't use expressions in webhook paths or credentials

  • n8n MCP Tools Expert: Learn how to validate expressions using MCP tools
  • n8n Workflow Patterns: See expressions in real workflow examples
  • n8n Node Configuration: Understand when expressions are needed

Summary

Essential Rules:

  1. Wrap expressions in {{ }}
  2. Webhook data is under .body
  3. No {{ }} in Code nodes
  4. Quote node names with spaces
  5. Node names are case-sensitive

Most Common Mistakes:

  • Missing {{ }} → Add braces
  • {{$json.name}} in webhooks → Use {{$json.body.name}}
  • {{$json.email}} in Code → Use $json.email
  • {{$node.HTTP Request}} → Use {{$node["HTTP Request"]}}

For more details, see:


Need Help? Reference the n8n expression documentation or use n8n-mcp validation tools to check your expressions.

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in cli-tool/components/skills/workflow-automation/n8n/n8n-expression-syntax of davila7/claude-code-templates.

  • SKILL.md
  • COMMON_MISTAKES.md
  • EXAMPLES.md
  • README.md

Open the folder on GitHubat commit 14680ec

Used in 4 other repositories

We found 13 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

N8n Expression Syntax next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

N8n Expression Syntax compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
N8n Expression Syntax this skilldavila7/claude-code-templates32k4 repos~2.4kAutomated safety check: PassMIT
n8n Expression Syntaxczlonkowski/n8n-skills6.4k—~5.2kAutomated safety check: PassMIT
N8n Workflowsvibeeval/vibecosystem531—~3.3kAutomated safety check: PassMIT
Openclaw N8n OrchestratorLeoYeAI/openclaw-master-skills2.2k—~4.1kAutomated safety check: NotesMIT
Automation Flowsericrisco/rsc-harness167—~2.9kAutomated safety check: PassMIT
N8n Trigger Testing Strategiesproffesor-for-testing/agentic-qe494—~3.7kAutomated safety check: PassMIT

Similar skills

  • n8n Expression Syntax

    czlonkowski/n8n-skills

    Validates and fixes n8n's double-curly-brace expressions, covering $json, $node, and the webhook body-wrapping mistake.

    6.4k GitHub stars~5.2k tokensUpdated 22 days ago
    Productivity & AutomationAuto-check passed
  • N8n Workflows

    vibeeval/vibecosystem

    n8n otomasyon workflow'lari. An agent skill from vibeeval/vibecosystem.

    531 GitHub stars~3.3k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed
  • Openclaw N8n Orchestrator

    LeoYeAI/openclaw-master-skills

    When the user wants to connect an OpenClaw agent to n8n workflows, create n8n webhook skills for OpenClaw, route agent API calls through n8n for credential isolation, build bidirectional…

    2.2k GitHub stars~4.1k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check: notes
  • Automation Flows

    ericrisco/rsc-harness

    A skill your agent uses when building or fixing a no-code automation on n8n, Make, or Zapier — trigger to multi-app steps with data mapping, dedup, retries and an error path — or picking the…

    167 GitHub stars~2.9k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • N8n Trigger Testing Strategies

    proffesor-for-testing/agentic-qe

    Webhook testing, schedule validation, event-driven triggers, and polling mechanism testing for n8n workflows.

    494 GitHub stars~3.7k tokensUpdated 4 days ago
    Productivity & AutomationAuto-check passed
  • n8n Error Handling

    czlonkowski/n8n-skills

    Wires n8n workflows so failures are visible and recoverable: per-node error outputs, retries, error workflows and correct 4xx and 5xx webhook responses.

    6.4k GitHub stars~5.1k tokensUpdated 22 days ago
    Productivity & AutomationAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Works with

Questions about N8n Expression Syntax

What does N8n Expression Syntax do?

Validate n8n expression syntax and fix common errors. An agent skill from davila7/claude-code-templates. N8n Expression Syntax is an agent skill from davila7/claude-code-templates. Validate n8n expression syntax and fix common errors.

When should I use N8n Expression Syntax?

N8n Expression Syntax fits situations like: writing n8n expressions; using {{}} syntax; accessing $json/$node variables; troubleshooting expression errors.

How do I install N8n Expression Syntax in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill n8n-expression-syntax -a claude-code`. Or copy the skill folder (cli-tool/components/skills/workflow-automation/n8n/n8n-expression-syntax in davila7/claude-code-templates) into .claude/skills/n8n-expression-syntax in your project. Claude Code loads it when a task matches its description.

How do I install N8n Expression Syntax in Codex?

Run `npx skills add davila7/claude-code-templates --skill n8n-expression-syntax -a codex`. Or copy the skill folder (cli-tool/components/skills/workflow-automation/n8n/n8n-expression-syntax in davila7/claude-code-templates) into .agents/skills/n8n-expression-syntax in your project. Codex loads it when a task matches its description.

Can I use N8n Expression Syntax in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill n8n-expression-syntax -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/n8n-expression-syntax, .gemini/skills/n8n-expression-syntax, .github/skills/n8n-expression-syntax and .opencode/skills/n8n-expression-syntax in your project.

What does N8n Expression Syntax need to run?

Going by SKILL.md and its folder, N8n Expression Syntax needs credentials named API_KEY. Our summary lists: A credential in API_KEY.

Does N8n Expression Syntax access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is N8n Expression Syntax safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does N8n Expression Syntax use?

N8n Expression Syntax is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does N8n Expression Syntax use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to N8n Expression Syntax?

Skills that share tags, products or a category with N8n Expression Syntax: n8n Expression Syntax (czlonkowski/n8n-skills, 6.4k stars), N8n Workflows (vibeeval/vibecosystem, 531 stars), Openclaw N8n Orchestrator (LeoYeAI/openclaw-master-skills, 2.2k stars) and Automation Flows (ericrisco/rsc-harness, 167 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains N8n Expression Syntax?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.