[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AG2X5NRTASK1ZJQDSX0YG3":3,"skill-same:01M6AG2X5NRTASK1ZJQDSX0YG3":81},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M6AG2X5NRTASK1ZJQDSX0YG3","n8n-expression-syntax",null,"Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json\u002F$node variables, troubleshooting expression errors, or working with webhook data in workflows.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"n8n expression syntax","expression","n8n","syntax","when","writing","errors","Variables","with","webhook","use","fix","node","common","troubleshooting","json","data","validate","workflows","2026-11-10 10:12:30",false,"---\nname: n8n-expression-syntax\ndescription: Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json\u002F$node variables, troubleshooting expression errors, or working with webhook data in workflows.\n---\n\n# n8n Expression Syntax\n\nExpert guide for writing correct n8n expressions in workflows.\n\n---\n\n## Expression Format\n\nAll dynamic content in n8n uses **double curly braces**:\n\n```\n{{expression}}\n```\n\n**Examples**:\n```\n✅ {{$json.email}}\n✅ {{$json.body.name}}\n✅ {{$node[\"HTTP Request\"].json.data}}\n❌ $json.email  (no braces - treated as literal text)\n❌ {$json.email}  (single braces - invalid)\n```\n\n---\n\n## Core Variables\n\n### $json - Current Node Output\n\nAccess data from the current node:\n\n```javascript\n{{$json.fieldName}}\n{{$json['field with spaces']}}\n{{$json.nested.property}}\n{{$json.items[0].name}}\n```\n\n### $node - Reference Other Nodes\n\nAccess data from any previous node:\n\n```javascript\n{{$node[\"Node Name\"].json.fieldName}}\n{{$node[\"HTTP Request\"].json.data}}\n{{$node[\"Webhook\"].json.body.email}}\n```\n\n**Important**:\n- Node names **must** be in quotes\n- Node names are **case-sensitive**\n- Must match exact node name from workflow\n\n### $now - Current Timestamp\n\nAccess current date\u002Ftime:\n\n```javascript\n{{$now}}\n{{$now.toFormat('yyyy-MM-dd')}}\n{{$now.toFormat('HH:mm:ss')}}\n{{$now.plus({days: 7})}}\n```\n\n### $env - Environment Variables\n\nAccess environment variables:\n\n```javascript\n{{$env.API_KEY}}\n{{$env.DATABASE_URL}}\n```\n\n---\n\n## ? CRITICAL: Webhook Data Structure\n\n**Most Common Mistake**: Webhook data is **NOT** at the root!\n\n### Webhook Node Output Structure\n\n```javascript\n{\n  \"headers\": {...},\n  \"params\": {...},\n  \"query\": {...},\n  \"body\": {           \u002F\u002F ⚠️ USER DATA IS HERE!\n    \"name\": \"John\",\n    \"email\": \"john@example.com\",\n    \"message\": \"Hello\"\n  }\n}\n```\n\n### Correct Webhook Data Access\n\n```javascript\n❌ WRONG: {{$json.name}}\n❌ WRONG: {{$json.email}}\n\n✅ CORRECT: {{$json.body.name}}\n✅ CORRECT: {{$json.body.email}}\n✅ CORRECT: {{$json.body.message}}\n```\n\n**Why**: Webhook node wraps incoming data under `.body` property to preserve headers, params, and query parameters.\n\n---\n\n## Common Patterns\n\n### Access Nested Fields\n\n```javascript\n\u002F\u002F Simple nesting\n{{$json.user.email}}\n\n\u002F\u002F Array access\n{{$json.data[0].name}}\n{{$json.items[0].id}}\n\n\u002F\u002F Bracket notation for spaces\n{{$json['field name']}}\n{{$json['user data']['first name']}}\n```\n\n### Reference Other Nodes\n\n```javascript\n\u002F\u002F Node without spaces\n{{$node[\"Set\"].json.value}}\n\n\u002F\u002F Node with spaces (common!)\n{{$node[\"HTTP Request\"].json.data}}\n{{$node[\"Respond to Webhook\"].json.message}}\n\n\u002F\u002F Webhook node\n{{$node[\"Webhook\"].json.body.email}}\n```\n\n### Combine Variables\n\n```javascript\n\u002F\u002F Concatenation (automatic)\nHello {{$json.body.name}}!\n\n\u002F\u002F In URLs\nhttps:\u002F\u002Fapi.example.com\u002Fusers\u002F{{$json.body.user_id}}\n\n\u002F\u002F In object properties\n{\n  \"name\": \"={{$json.body.name}}\",\n  \"email\": \"={{$json.body.email}}\"\n}\n```\n\n---\n\n## When NOT to Use Expressions\n\n### ❌ Code Nodes\n\nCode nodes use **direct JavaScript access**, NOT expressions!\n\n```javascript\n\u002F\u002F ❌ WRONG in Code node\nconst email = '={{$json.email}}';\nconst name = '{{$json.body.name}}';\n\n\u002F\u002F ✅ CORRECT in Code node\nconst email = $json.email;\nconst name = $json.body.name;\n\n\u002F\u002F Or using Code node API\nconst email = $input.item.json.email;\nconst allItems = $input.all();\n```\n\n### ❌ Webhook Paths\n\n```javascript\n\u002F\u002F ❌ WRONG\npath: \"{{$json.user_id}}\u002Fwebhook\"\n\n\u002F\u002F ✅ CORRECT\npath: \"user-webhook\"  \u002F\u002F Static paths only\n```\n\n### ❌ Credential Fields\n\n```javascript\n\u002F\u002F ❌ WRONG\napiKey: \"={{$env.API_KEY}}\"\n\n\u002F\u002F ✅ CORRECT\nUse n8n credential system, not expressions\n```\n\n---\n\n## Validation Rules\n\n### 1. Always Use {{}}\n\nExpressions **must** be wrapped in double curly braces.\n\n```javascript\n❌ $json.field\n✅ {{$json.field}}\n```\n\n### 2. Use Quotes for Spaces\n\nField or node names with spaces require **bracket notation**:\n\n```javascript\n❌ {{$json.field name}}\n✅ {{$json['field name']}}\n\n❌ {{$node.HTTP Request.json}}\n✅ {{$node[\"HTTP Request\"].json}}\n```\n\n### 3. Match Exact Node Names\n\nNode references are **case-sensitive**:\n\n```javascript\n❌ {{$node[\"http request\"].json}}  \u002F\u002F lowercase\n❌ {{$node[\"Http Request\"].json}}  \u002F\u002F wrong case\n✅ {{$node[\"HTTP Request\"].json}}  \u002F\u002F exact match\n```\n\n### 4. No Nested {{}}\n\nDon't double-wrap expressions:\n\n```javascript\n❌ {{{$json.field}}}\n✅ {{$json.field}}\n```\n\n---\n\n## Common Mistakes\n\nFor complete error catalog with fixes, see [COMMON_MISTAKES.md](COMMON_MISTAKES.md)\n\n### Quick Fixes\n\n| Mistake | Fix |\n|---------|-----|\n| `$json.field` | `{{$json.field}}` |\n| `{{$json.field name}}` | `{{$json['field name']}}` |\n| `{{$node.HTTP Request}}` | `{{$node[\"HTTP Request\"]}}` |\n| `{{{$json.field}}}` | `{{$json.field}}` |\n| `{{$json.name}}` (webhook) | `{{$json.body.name}}` |\n| `'={{$json.email}}'` (Code node) | `$json.email` |\n\n---\n\n## Working Examples\n\nFor real workflow examples, see [EXAMPLES.md](EXAMPLES.md)\n\n### Example 1: Webhook to Slack\n\n**Webhook receives**:\n```json\n{\n  \"body\": {\n    \"name\": \"John Doe\",\n    \"email\": \"john@example.com\",\n    \"message\": \"Hello!\"\n  }\n}\n```\n\n**In Slack node text field**:\n```\nNew form submission!\n\nName: {{$json.body.name}}\nEmail: {{$json.body.email}}\nMessage: {{$json.body.message}}\n```\n\n### Example 2: HTTP Request to Email\n\n**HTTP Request returns**:\n```json\n{\n  \"data\": {\n    \"items\": [\n      {\"name\": \"Product 1\", \"price\": 29.99}\n    ]\n  }\n}\n```\n\n**In Email node** (reference HTTP Request):\n```\nProduct: {{$node[\"HTTP Request\"].json.data.items[0].name}}\nPrice: ${{$node[\"HTTP Request\"].json.data.items[0].price}}\n```\n\n### Example 3: Format Timestamp\n\n```javascript\n\u002F\u002F Current date\n{{$now.toFormat('yyyy-MM-dd')}}\n\u002F\u002F Result: 2025-10-20\n\n\u002F\u002F Time\n{{$now.toFormat('HH:mm:ss')}}\n\u002F\u002F Result: 14:30:45\n\n\u002F\u002F Full datetime\n{{$now.toFormat('yyyy-MM-dd HH:mm')}}\n\u002F\u002F Result: 2025-10-20 14:30\n```\n\n---\n\n## Data Type Handling\n\n### Arrays\n\n```javascript\n\u002F\u002F First item\n{{$json.users[0].email}}\n\n\u002F\u002F Array length\n{{$json.users.length}}\n\n\u002F\u002F Last item\n{{$json.users[$json.users.length - 1].name}}\n```\n\n### Objects\n\n```javascript\n\u002F\u002F Dot notation (no spaces)\n{{$json.user.email}}\n\n\u002F\u002F Bracket notation (with spaces or dynamic)\n{{$json['user data'].email}}\n```\n\n### Strings\n\n```javascript\n\u002F\u002F Concatenation (automatic)\nHello {{$json.name}}!\n\n\u002F\u002F String methods\n{{$json.email.toLowerCase()}}\n{{$json.name.toUpperCase()}}\n```\n\n### Numbers\n\n```javascript\n\u002F\u002F Direct use\n{{$json.price}}\n\n\u002F\u002F Math operations\n{{$json.price * 1.1}}  \u002F\u002F Add 10%\n{{$json.quantity + 5}}\n```\n\n---\n\n## Advanced Patterns\n\n### Conditional Content\n\n```javascript\n\u002F\u002F Ternary operator\n{{$json.status === 'active' ? 'Active User' : 'Inactive User'}}\n\n\u002F\u002F Default values\n{{$json.email || 'no-email@example.com'}}\n```\n\n### Date Manipulation\n\n```javascript\n\u002F\u002F Add days\n{{$now.plus({days: 7}).toFormat('yyyy-MM-dd')}}\n\n\u002F\u002F Subtract hours\n{{$now.minus({hours: 24}).toISO()}}\n\n\u002F\u002F Set specific date\n{{DateTime.fromISO('2025-12-25').toFormat('MMMM dd, yyyy')}}\n```\n\n### String Manipulation\n\n```javascript\n\u002F\u002F Substring\n{{$json.email.substring(0, 5)}}\n\n\u002F\u002F Replace\n{{$json.message.replace('old', 'new')}}\n\n\u002F\u002F Split and join\n{{$json.tags.split(',').join(', ')}}\n```\n\n---\n\n## Debugging Expressions\n\n### Test in Expression Editor\n\n1. Click field with expression\n2. Open expression editor (click \"fx\" icon)\n3. See live preview of result\n4. Check for errors highlighted in red\n\n### Common Error Messages\n\n**\"Cannot read property 'X' of undefined\"**\n→ Parent object doesn't exist\n→ Check your data path\n\n**\"X is not a function\"**\n→ Trying to call method on non-function\n→ Check variable type\n\n**Expression shows as literal text**\n→ Missing {{ }}\n→ Add curly braces\n\n---\n\n## Expression Helpers\n\n### Available Methods\n\n**String**:\n- `.toLowerCase()`, `.toUpperCase()`\n- `.trim()`, `.replace()`, `.substring()`\n- `.split()`, `.includes()`\n\n**Array**:\n- `.length`, `.map()`, `.filter()`\n- `.find()`, `.join()`, `.slice()`\n\n**DateTime** (Luxon):\n- `.toFormat()`, `.toISO()`, `.toLocal()`\n- `.plus()`, `.minus()`, `.set()`\n\n**Number**:\n- `.toFixed()`, `.toString()`\n- Math operations: `+`, `-`, `*`, `\u002F`, `%`\n\n---\n\n## Best Practices\n\n### ✅ Do\n\n- Always use {{ }} for dynamic content\n- Use bracket notation for field names with spaces\n- Reference webhook data from `.body`\n- Use $node for data from other nodes\n- Test expressions in expression editor\n\n### ❌ Don't\n\n- Don't use expressions in Code nodes\n- Don't forget quotes around node names with spaces\n- Don't double-wrap with extra {{ }}\n- Don't assume webhook data is at root (it's under .body!)\n- Don't use expressions in webhook paths or credentials\n\n---\n\n## Related Skills\n\n- **n8n MCP Tools Expert**: Learn how to validate expressions using MCP tools\n- **n8n Workflow Patterns**: See expressions in real workflow examples\n- **n8n Node Configuration**: Understand when expressions are needed\n\n---\n\n## Summary\n\n**Essential Rules**:\n1. Wrap expressions in {{ }}\n2. Webhook data is under `.body`\n3. No {{ }} in Code nodes\n4. Quote node names with spaces\n5. Node names are case-sensitive\n\n**Most Common Mistakes**:\n- Missing {{ }} → Add braces\n- `{{$json.name}}` in webhooks → Use `{{$json.body.name}}`\n- `{{$json.email}}` in Code → Use `$json.email`\n- `{{$node.HTTP Request}}` → Use `{{$node[\"HTTP Request\"]}}`\n\nFor more details, see:\n- [COMMON_MISTAKES.md](COMMON_MISTAKES.md) - Complete error catalog\n- [EXAMPLES.md](EXAMPLES.md) - Real workflow examples\n\n---\n\n**Need Help?** Reference the n8n expression documentation or use n8n-mcp validation tools to check your expressions.\n","# n8n Expression Syntax\n\nExpert guide for writing correct n8n expressions in workflows.\n\n---\n\n## Expression Format\n\nAll dynamic content in n8n uses **double curly braces**:\n\n```\n{{expression}}\n```\n\n**Examples**:\n```\n✅ {{$json.email}}\n✅ {{$json.body.name}}\n✅ {{$node[\"HTTP Request\"].json.data}}\n❌ $json.email  (no braces - treated as literal text)\n❌ {$json.email}  (single braces - invalid)\n```\n\n---\n\n## Core Variables\n\n### $json - Current Node Output\n\nAccess data from the current node:\n\n```javascript\n{{$json.fieldName}}\n{{$json['field with spaces']}}\n{{$json.nested.property}}\n{{$json.items[0].name}}\n```\n\n### $node - Reference Other Nodes\n\nAccess data from any previous node:\n\n```javascript\n{{$node[\"Node Name\"].json.fieldName}}\n{{$node[\"HTTP Request\"].json.data}}\n{{$node[\"Webhook\"].json.body.email}}\n```\n\n**Important**:\n- Node names **must** be in quotes\n- Node names are **case-sensitive**\n- Must match exact node name from workflow\n\n### $now - Current Timestamp\n\nAccess current date\u002Ftime:\n\n```javascript\n{{$now}}\n{{$now.toFormat('yyyy-MM-dd')}}\n{{$now.toFormat('HH:mm:ss')}}\n{{$now.plus({days: 7})}}\n```\n\n### $env - Environment Variables\n\nAccess environment variables:\n\n```javascript\n{{$env.API_KEY}}\n{{$env.DATABASE_URL}}\n```\n\n---\n\n## ? CRITICAL: Webhook Data Structure\n\n**Most Common Mistake**: Webhook data is **NOT** at the root!\n\n### Webhook Node Output Structure\n\n```javascript\n{\n  \"headers\": {...},\n  \"params\": {...},\n  \"query\": {...},\n  \"body\": {           \u002F\u002F ⚠️ USER DATA IS HERE!\n    \"name\": \"John\",\n    \"email\": \"john@example.com\",\n    \"message\": \"Hello\"\n  }\n}\n```\n\n### Correct Webhook Data Access\n\n```javascript\n❌ WRONG: {{$json.name}}\n❌ WRONG: {{$json.email}}\n\n✅ CORRECT: {{$json.body.name}}\n✅ CORRECT: {{$json.body.email}}\n✅ CORRECT: {{$json.body.message}}\n```\n\n**Why**: Webhook node wraps incoming data under `.body` property to preserve headers, params, and query parameters.\n\n---\n\n## Common Patterns\n\n### Access Nested Fields\n\n```javascript\n\u002F\u002F Simple nesting\n{{$json.user.email}}\n\n\u002F\u002F Array access\n{{$json.data[0].name}}\n{{$json.items[0].id}}\n\n\u002F\u002F Bracket notation for spaces\n{{$json['field name']}}\n{{$json['user data']['first name']}}\n```\n\n### Reference Other Nodes\n\n```javascript\n\u002F\u002F Node without spaces\n{{$node[\"Set\"].json.value}}\n\n\u002F\u002F Node with spaces (common!)\n{{$node[\"HTTP Request\"].json.data}}\n{{$node[\"Respond to Webhook\"].json.message}}\n\n\u002F\u002F Webhook node\n{{$node[\"Webhook\"].json.body.email}}\n```\n\n### Combine Variables\n\n```javascript\n\u002F\u002F Concatenation (automatic)\nHello {{$json.body.name}}!\n\n\u002F\u002F In URLs\nhttps:\u002F\u002Fapi.example.com\u002Fusers\u002F{{$json.body.user_id}}\n\n\u002F\u002F In object properties\n{\n  \"name\": \"={{$json.body.name}}\",\n  \"email\": \"={{$json.body.email}}\"\n}\n```\n\n---\n\n## When NOT to Use Expressions\n\n### ❌ Code Nodes\n\nCode nodes use **direct JavaScript access**, NOT expressions!\n\n```javascript\n\u002F\u002F ❌ WRONG in Code node\nconst email = '={{$json.email}}';\nconst name = '{{$json.body.name}}';\n\n\u002F\u002F ✅ CORRECT in Code node\nconst email = $json.email;\nconst name = $json.body.name;\n\n\u002F\u002F Or using Code node API\nconst email = $input.item.json.email;\nconst allItems = $input.all();\n```\n\n### ❌ Webhook Paths\n\n```javascript\n\u002F\u002F ❌ WRONG\npath: \"{{$json.user_id}}\u002Fwebhook\"\n\n\u002F\u002F ✅ CORRECT\npath: \"user-webhook\"  \u002F\u002F Static paths only\n```\n\n### ❌ Credential Fields\n\n```javascript\n\u002F\u002F ❌ WRONG\napiKey: \"={{$env.API_KEY}}\"\n\n\u002F\u002F ✅ CORRECT\nUse n8n credential system, not expressions\n```\n\n---\n\n## Validation Rules\n\n### 1. Always Use {{}}\n\nExpressions **must** be wrapped in double curly braces.\n\n```javascript\n❌ $json.field\n✅ {{$json.field}}\n```\n\n### 2. Use Quotes for Spaces\n\nField or node names with spaces require **bracket notation**:\n\n```javascript\n❌ {{$json.field name}}\n✅ {{$json['field name']}}\n\n❌ {{$node.HTTP Request.json}}\n✅ {{$node[\"HTTP Request\"].json}}\n```\n\n### 3. Match Exact Node Names\n\nNode references are **case-sensitive**:\n\n```javascript\n❌ {{$node[\"http request\"].json}}  \u002F\u002F lowercase\n❌ {{$node[\"Http Request\"].json}}  \u002F\u002F wrong case\n✅ {{$node[\"HTTP Request\"].json}}  \u002F\u002F exact match\n```\n\n### 4. No Nested {{}}\n\nDon't double-wrap expressions:\n\n```javascript\n❌ {{{$json.field}}}\n✅ {{$json.field}}\n```\n\n---\n\n## Common Mistakes\n\nFor complete error catalog with fixes, see [COMMON_MISTAKES.md](COMMON_MISTAKES.md)\n\n### Quick Fixes\n\n| Mistake | Fix |\n|---------|-----|\n| `$json.field` | `{{$json.field}}` |\n| `{{$json.field name}}` | `{{$json['field name']}}` |\n| `{{$node.HTTP Request}}` | `{{$node[\"HTTP Request\"]}}` |\n| `{{{$json.field}}}` | `{{$json.field}}` |\n| `{{$json.name}}` (webhook) | `{{$json.body.name}}` |\n| `'={{$json.email}}'` (Code node) | `$json.email` |\n\n---\n\n## Working Examples\n\nFor real workflow examples, see [EXAMPLES.md](EXAMPLES.md)\n\n### Example 1: Webhook to Slack\n\n**Webhook receives**:\n```json\n{\n  \"body\": {\n    \"name\": \"John Doe\",\n    \"email\": \"john@example.com\",\n    \"message\": \"Hello!\"\n  }\n}\n```\n\n**In Slack node text field**:\n```\nNew form submission!\n\nName: {{$json.body.name}}\nEmail: {{$json.body.email}}\nMessage: {{$json.body.message}}\n```\n\n### Example 2: HTTP Request to Email\n\n**HTTP Request returns**:\n```json\n{\n  \"data\": {\n    \"items\": [\n      {\"name\": \"Product 1\", \"price\": 29.99}\n    ]\n  }\n}\n```\n\n**In Email node** (reference HTTP Request):\n```\nProduct: {{$node[\"HTTP Request\"].json.data.items[0].name}}\nPrice: ${{$node[\"HTTP Request\"].json.data.items[0].price}}\n```\n\n### Example 3: Format Timestamp\n\n```javascript\n\u002F\u002F Current date\n{{$now.toFormat('yyyy-MM-dd')}}\n\u002F\u002F Result: 2025-10-20\n\n\u002F\u002F Time\n{{$now.toFormat('HH:mm:ss')}}\n\u002F\u002F Result: 14:30:45\n\n\u002F\u002F Full datetime\n{{$now.toFormat('yyyy-MM-dd HH:mm')}}\n\u002F\u002F Result: 2025-10-20 14:30\n```\n\n---\n\n## Data Type Handling\n\n### Arrays\n\n```javascript\n\u002F\u002F First item\n{{$json.users[0].email}}\n\n\u002F\u002F Array length\n{{$json.users.length}}\n\n\u002F\u002F Last item\n{{$json.users[$json.users.length - 1].name}}\n```\n\n### Objects\n\n```javascript\n\u002F\u002F Dot notation (no spaces)\n{{$json.user.email}}\n\n\u002F\u002F Bracket notation (with spaces or dynamic)\n{{$json['user data'].email}}\n```\n\n### Strings\n\n```javascript\n\u002F\u002F Concatenation (automatic)\nHello {{$json.name}}!\n\n\u002F\u002F String methods\n{{$json.email.toLowerCase()}}\n{{$json.name.toUpperCase()}}\n```\n\n### Numbers\n\n```javascript\n\u002F\u002F Direct use\n{{$json.price}}\n\n\u002F\u002F Math operations\n{{$json.price * 1.1}}  \u002F\u002F Add 10%\n{{$json.quantity + 5}}\n```\n\n---\n\n## Advanced Patterns\n\n### Conditional Content\n\n```javascript\n\u002F\u002F Ternary operator\n{{$json.status === 'active' ? 'Active User' : 'Inactive User'}}\n\n\u002F\u002F Default values\n{{$json.email || 'no-email@example.com'}}\n```\n\n### Date Manipulation\n\n```javascript\n\u002F\u002F Add days\n{{$now.plus({days: 7}).toFormat('yyyy-MM-dd')}}\n\n\u002F\u002F Subtract hours\n{{$now.minus({hours: 24}).toISO()}}\n\n\u002F\u002F Set specific date\n{{DateTime.fromISO('2025-12-25').toFormat('MMMM dd, yyyy')}}\n```\n\n### String Manipulation\n\n```javascript\n\u002F\u002F Substring\n{{$json.email.substring(0, 5)}}\n\n\u002F\u002F Replace\n{{$json.message.replace('old', 'new')}}\n\n\u002F\u002F Split and join\n{{$json.tags.split(',').join(', ')}}\n```\n\n---\n\n## Debugging Expressions\n\n### Test in Expression Editor\n\n1. Click field with expression\n2. Open expression editor (click \"fx\" icon)\n3. See live preview of result\n4. Check for errors highlighted in red\n\n### Common Error Messages\n\n**\"Cannot read property 'X' of undefined\"**\n→ Parent object doesn't exist\n→ Check your data path\n\n**\"X is not a function\"**\n→ Trying to call method on non-function\n→ Check variable type\n\n**Expression shows as literal text**\n→ Missing {{ }}\n→ Add curly braces\n\n---\n\n## Expression Helpers\n\n### Available Methods\n\n**String**:\n- `.toLowerCase()`, `.toUpperCase()`\n- `.trim()`, `.replace()`, `.substring()`\n- `.split()`, `.includes()`\n\n**Array**:\n- `.length`, `.map()`, `.filter()`\n- `.find()`, `.join()`, `.slice()`\n\n**DateTime** (Luxon):\n- `.toFormat()`, `.toISO()`, `.toLocal()`\n- `.plus()`, `.minus()`, `.set()`\n\n**Number**:\n- `.toFixed()`, `.toString()`\n- Math operations: `+`, `-`, `*`, `\u002F`, `%`\n\n---\n\n## Best Practices\n\n### ✅ Do\n\n- Always use {{ }} for dynamic content\n- Use bracket notation for field names with spaces\n- Reference webhook data from `.body`\n- Use $node for data from other nodes\n- Test expressions in expression editor\n\n### ❌ Don't\n\n- Don't use expressions in Code nodes\n- Don't forget quotes around node names with spaces\n- Don't double-wrap with extra {{ }}\n- Don't assume webhook data is at root (it's under .body!)\n- Don't use expressions in webhook paths or credentials\n\n---\n\n## Related Skills\n\n- **n8n MCP Tools Expert**: Learn how to validate expressions using MCP tools\n- **n8n Workflow Patterns**: See expressions in real workflow examples\n- **n8n Node Configuration**: Understand when expressions are needed\n\n---\n\n## Summary\n\n**Essential Rules**:\n1. Wrap expressions in {{ }}\n2. Webhook data is under `.body`\n3. No {{ }} in Code nodes\n4. Quote node names with spaces\n5. Node names are case-sensitive\n\n**Most Common Mistakes**:\n- Missing {{ }} → Add braces\n- `{{$json.name}}` in webhooks → Use `{{$json.body.name}}`\n- `{{$json.email}}` in Code → Use `$json.email`\n- `{{$node.HTTP Request}}` → Use `{{$node[\"HTTP Request\"]}}`\n\nFor more details, see:\n- [COMMON_MISTAKES.md](COMMON_MISTAKES.md) - Complete error catalog\n- [EXAMPLES.md](EXAMPLES.md) - Real workflow examples\n\n---\n\n**Need Help?** Reference the n8n expression documentation or use n8n-mcp validation tools to check your expressions.\n",{"name":5,"description":7},"main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add davila7\u002Fclaude-code-templates --skill n8n-expression-syntax",{"tool":59,"command":60},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill n8n-expression-syntax",{"tool":62,"command":63},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill n8n-expression-syntax","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FSKILL.md",true,[67,73,77],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"COMMON_MISTAKES.md","REFERENCE","参考文档",8658,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FCOMMON_MISTAKES.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"EXAMPLES.md",8303,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FEXAMPLES.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"README.md",2323,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FREADME.md",[82,111,138,171,206,230],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":93,"publishedAt":38},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[88],{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[94,95,96,97,98,99,100,101,29,23,102,27,103,104,105,106,107,108,109,110],"scoring","pool","wealthville pool scoring","liquidity","which","for","exit","now","reduce","record","track","verdict","evm","solana","how","public","look",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":118,"publishedAt":38},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[117],{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},[119,120,121,122,123,124,125,126,127,128,129,23,130,131,132,133,134,135,136,137],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":153,"publishedAt":38},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[144,147,148],{"categoryNo":145,"categoryName":146,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},{"categoryNo":149,"categoryName":150,"taxonomyType":151,"taxonomyTypeDesc":152},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[154,155,156,157,158,159,160,99,161,162,163,164,165,166,167,29,168,169,23,170],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":175,"licenseFileUrl":176,"sourceHtmlUrl":177,"categories":178,"keywords":182,"publishedAt":38},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[179],{"categoryNo":180,"categoryName":181,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000009","前端开发",[183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,99,205],"artifacts builder","web","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":175,"licenseFileUrl":210,"sourceHtmlUrl":211,"categories":212,"keywords":217,"publishedAt":38},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[213,216],{"categoryNo":214,"categoryName":215,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":180,"categoryName":181,"taxonomyType":91,"taxonomyTypeDesc":92},[218,219,220,221,222,184,223,193,194,224,225,226,227,99,228,27,229],"webapp testing","testing","webapp","browser","playwright","applications","debugging","toolkit","logs","screenshots","local","behavior",{"skillNo":231,"name":232,"nameZh":6,"description":233,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":175,"licenseFileUrl":234,"sourceHtmlUrl":235,"categories":236,"keywords":244,"publishedAt":38},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[237,240,241],{"categoryNo":238,"categoryName":239,"taxonomyType":91,"taxonomyTypeDesc":92},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":89,"categoryName":90,"taxonomyType":91,"taxonomyTypeDesc":92},{"categoryNo":242,"categoryName":243,"taxonomyType":151,"taxonomyTypeDesc":152},"01JBSEEDCAT000000000000036","内容创作者",[245,246,247,248,249,250,35,24,186,251,196,130,252,253,254,255,256,166,257,23,258,259,260,261,262,108,263],"discernment nudge","nudge","interpretation","help","run","reasoning","lookup","content","review","conversation","short","up","invoke","you","analysis","claims","argument","assemble","recommendations"]