[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BKTMVRT75AA8ES7VHC1QNG":3,"skill-same:01M7BKTMVRT75AA8ES7VHC1QNG":61},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7BKTMVRT75AA8ES7VHC1QNG","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.","YYC-Cube\u002FYYC3-Knowledge-Base","YYC-Cube","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F235006543?v=4","01M79J2PH4SWD2X0825X6PN748","yyc3","01M79J2PHVK3F6ZBYT8K2SCZCW",1,"MIT","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FSKILL.md",[],[],"2026-11-15 14:19:17",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","87afe6ce96220accf50a345dea46784c8c9f210e","YYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax",0,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base","https:\u002F\u002Fkb.yyc3.top\u002F","https:\u002F\u002Fgithub.com\u002FYYC-Cube","万象归元于云枢 | 深栈智启新纪元","2026-11-10 10:37:32",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill n8n-expression-syntax",{"tool":39,"command":40},"bunx","bunx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill n8n-expression-syntax",{"tool":42,"command":43},"pnpm","pnpm dlx skills add YYC-Cube\u002FYYC3-Knowledge-Base --skill n8n-expression-syntax","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FSKILL.md",true,[47,53,57],{"path":48,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":51,"sourceHtmlUrl":52},"COMMON_MISTAKES.md","REFERENCE","参考文档",8658,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FCOMMON_MISTAKES.md",{"path":54,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":55,"sourceHtmlUrl":56},"EXAMPLES.md",8303,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FEXAMPLES.md",{"path":58,"resourceType":49,"resourceTypeDesc":50,"sizeBytes":59,"sourceHtmlUrl":60},"README.md",2323,"https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-AI-应用工具\u002FYYC3-AI-应用工具-claude-code-templates-main\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fworkflow-automation\u002Fn8n\u002Fn8n-expression-syntax\u002FREADME.md",[62,69,76,83,90,97],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CTDWHERCXPQCP0K03A86AS","vercel-sandbox","Run agent-browser + Chrome inside Vercel Sandbox microVMs for browser automation from any Vercel-deployed app. Use when the user needs browser automation in a Vercel app (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.), wants to run headless Chrome without binary size limits, needs persistent browser sessions across commands, or wants ephemeral isolated browser environments. Triggers include \"Vercel Sandbox browser\", \"microVM Chrome\", \"agent-browser in sandbox\", \"browser automation on Vercel\", or any task requiring Chrome in a Vercel Sandbox.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fvercel-sandbox\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M7CTD8D2BNJY54S65M47HEJA","slack","Interact with Slack workspaces using browser automation. Use when the user needs to check unread channels, navigate Slack, send messages, extract data, find information, search conversations, or automate any Slack task. Triggers include \"check my Slack\", \"what channels have unreads\", \"send a message to\", \"search Slack for\", \"extract from Slack\", \"find who said\", or any task requiring programmatic Slack interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fslack\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7CTCSSB8ZP3Q58C3YZDZK1W","electron","Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include \"automate Slack app\", \"control VS Code\", \"interact with Discord app\", \"test this Electron app\", \"connect to desktop app\", or any task requiring automation of a native Electron application.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Felectron\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7CTCBJY76688V4DCZGWFHGQ","dogfood","Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to \"dogfood\", \"QA\", \"exploratory test\", \"find issues\", \"bug hunt\", \"test this app\u002Fsite\u002Fplatform\", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fdogfood\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7CTC4H0FFGVEAQR9PA4GA1A","agent-browser","Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to \"open a website\", \"fill out a form\", \"click a button\", \"take a screenshot\", \"scrape data from a page\", \"test this web app\", \"login to a site\", \"automate browser actions\", or any task requiring programmatic web interaction.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-WebSpec-Web标准\u002FYYC3-WebSpec-Web标准-standards\u002Fbrowser-agent\u002Fskills\u002Fagent-browser\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7CTBKVFYBG78FDSABSDJTTQ","shadcn","Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI, including chat interfaces. Provides project context, component docs, and usage examples. Applies when working with shadcn\u002Fui, component registries, presets, --preset codes, or any project with a components.json file. Also triggers for \"shadcn init\", \"create an app with --preset\", \"switch to --preset\", and for building a design system or applying a DESIGN.md or brand spec to shadcn\u002Fui.","https:\u002F\u002Fgithub.com\u002FYYC-Cube\u002FYYC3-Knowledge-Base\u002Fblob\u002Fmain\u002FYYC3-UI-界面组件\u002FYYC3-UI-界面组件-ui\u002Fskills\u002Fshadcn\u002FSKILL.md",[],[]]