- Home
- Skills
- Czlonkowski
- N8n Skills
- N8n Expression Syntax
n8n-expression-syntax_skill
- Shell
2.2k
GitHub Stars
4
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill czlonkowski/n8n-skills --skill n8n-expression-syntax- COMMON_MISTAKES.md8.5 KB
- EXAMPLES.md8.1 KB
- README.md2.3 KB
- SKILL.md9.4 KB
Overview
This skill validates n8n expression syntax and repairs common expression errors to keep workflows running reliably. It focuses on correct use of {{}} expressions, correct access to $json, $node, $now and $env variables, and common webhook pitfalls. The goal is fast, actionable fixes and clear examples you can apply in the editor.
How this skill works
It inspects expressions for missing or extra curly braces, incorrect node or field access (including case and quoting issues), and improper usage contexts such as Code nodes, webhook paths, or credential fields. It flags webhook data access mistakes (data lives under .body), suggests bracket notation for spaces, and offers corrections and working alternatives you can paste back into n8n. Live expression editor testing steps and common error message explanations are included for debugging.
When to use it
- While authoring or reviewing expression fields that use {{...}}
- When referencing data from other nodes via $node or current output via $json
- When troubleshooting expression errors like undefined properties or literal text
- When handling webhook payloads to ensure you access .body correctly
- Before moving expressions into Code nodes, webhook paths, or credentials
Best practices
- Always wrap dynamic content in double curly braces: {{$json.field}}
- Use {{$node["Node Name"].json.field}} and quote node names with spaces
- Access webhook payloads under {{$json.body.<field>}} rather than root
- Do not use {{}} expressions inside Code nodes—use direct JavaScript variables
- Test expressions in the expression editor and fix red-highlighted errors
Example use cases
- Formatting webhook form submissions for Slack: use {{$json.body.name}} and {{$json.body.message}}
- Pulling API response data from an HTTP Request node: {{$node["HTTP Request"].json.data.items[0].name}}
- Creating date-based filenames with {{$now.toFormat('yyyy-MM-dd')}}
- Applying conditional content: {{$json.status === 'active' ? 'Active' : 'Inactive'}}
- Safely accessing fields with spaces: {{$json['user data']['first name']}}
FAQ
Most likely you forgot the double curly braces. Wrap the expression like {{$json.field}} to evaluate it.
How do I access webhook payload values?
Webhook user data is under the .body property, so use {{$json.body.field}} rather than {{$json.field}}.