[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-n8n-n8n-code-nodes-official":3,"mdc-ay35t1-key":32,"related-org-n8n-n8n-code-nodes-official":4240,"related-repo-n8n-n8n-code-nodes-official":4400},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":22,"repoUrl":23,"updatedAt":24,"license":25,"forks":26,"topics":27,"repo":28,"sourceUrl":30,"mdContent":31},"n8n-code-nodes-official","write custom logic in n8n","Use when the user reaches for a Code node, mentions writing JavaScript or Python in n8n, or any custom logic comes up in workflow design. Triggers on \"Code node\", \"Code\", \"JavaScript\", \"Python\", \"custom logic\", \"transform data\", \"$input\", \"$json transformation\", \"loop in code\", \"write a function\", or any time the obvious answer seems to be \"just put it in code.\"",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},"n8n","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fn8n.png","n8n-io",[12,16,19],{"name":13,"slug":14,"type":15},"JavaScript","javascript","tag",{"name":17,"slug":18,"type":15},"Python","python",{"name":20,"slug":21,"type":15},"Engineering","engineering",319,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills","2026-07-08T05:44:49.656127",null,30,[],{"repoUrl":23,"stars":22,"forks":26,"topics":29,"description":25},[],"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fn8n-code-nodes-official","---\nname: n8n-code-nodes-official\ndescription: Use when the user reaches for a Code node, mentions writing JavaScript or Python in n8n, or any custom logic comes up in workflow design. Triggers on \"Code node\", \"Code\", \"JavaScript\", \"Python\", \"custom logic\", \"transform data\", \"$input\", \"$json transformation\", \"loop in code\", \"write a function\", or any time the obvious answer seems to be \"just put it in code.\"\n---\n\n# n8n Code Nodes\n\nThe Code node is powerful and often the wrong tool. The n8n equivalent of dropping into raw SQL when an ORM would do: real cases exist, but the moment a Code node handles logic an expression could, the workflow is harder to read, debug, and maintain. There's also a real perf gap: Code runs in a sandboxed JS runtime, expressions and Edit Fields run in-process, and the per-invocation overhead can be hundreds of times higher in Code (anecdotally ~2ms vs ~600ms for equivalent logic). For hot paths and large item counts, that compounds.\n\n## Strong defaults\n\n1. **Code node is a last resort.** Decision order: expression (`{{...}}`) → arrow function inside Edit Fields → Code node. The first two paths cover most \"transform this data\" tasks. Code earns its place for multi-source aggregation, external libraries, and a few specific patterns documented below.\n\n2. **Default to JavaScript.** Write JS unless the user explicitly asked for Python (\"use Python here,\" \"I'm a Python shop,\" pasted Python code). Everywhere else in n8n (expressions, Edit Fields) is JS, JS has a curated library allowlist (`lodash`, `crypto`, `luxon`).\n\n## Decision tree\n\n```\nNeed custom logic?\n├── Is it a transformation of one or two fields?\n│   └── Expression: {{ $json.foo.toUpperCase() }} or {{ $json.items.map(item => item.name).join(', ') }}\n│       Most \"just transform this\" cases land here.\n│\n├── Is it multi-line, but pure data shaping (map, filter, reduce, conditional)?\n│   └── Edit Fields with arrow function expression. See references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md\n│\n├── Does it need full statements, multiple data sources, or external libs?\n│   ├── Are you SURE the above two don't work?\n│   │   └── Re-read the parent. The bar is high.\n│   └── Yes, genuinely needs it\n│       └── Code node. See references\u002FJAVASCRIPT_PATTERNS.md\n│\n└── Is it actually two separate transformations stitched together?\n    └── Use two nodes (Edit Fields → Edit Fields, or Edit Fields → IF). Composability beats one big Code block.\n```\n\nFor the full decision logic with examples for each branch, see `references\u002FDECISION_TREE.md`.\n\n## What expressions can do that people forget\n\nCommon reaches-for-Code-node that should be expressions:\n\n```ts\n\u002F\u002F ❌ Code node\nreturn { name: $input.first().json.name.toUpperCase() }\n\n\u002F\u002F ✅ Expression in Edit Fields, \"name\" field\n{{ $json.name.toUpperCase() }}\n```\n\n```ts\n\u002F\u002F ❌ Code node\nconst items = $input.first().json.items\nreturn { tags: items.map(item => item.tag).filter(tag => tag).join(', ') }\n\n\u002F\u002F ✅ Expression\n{{ $json.items.map(item => item.tag).filter(tag => tag).join(', ') }}\n```\n\n```ts\n\u002F\u002F ❌ Code node\nconst date = new Date($input.first().json.created_at)\nreturn { formatted: date.toISOString().slice(0, 10) }\n\n\u002F\u002F ✅ Expression with n8n's date extension\n{{ $json.created_at.toDateTime().format('yyyy-MM-dd') }}\n```\n\nFor more on what expressions can express, see the `n8n-expressions-official` skill.\n\n## What arrow-functions-in-Edit-Fields can do\n\nEdit Fields assigns field values via expression. Inline arrow functions get you most multi-line logic without the Code node:\n\n```ts\n\u002F\u002F In Edit Fields, \"summary\" field:\n{{ (() => {\n    const items = $json.items\n    const total = items.reduce((sum, item) => sum + item.price, 0)\n    const tax = total * 0.08\n    return `Total: $${(total + tax).toFixed(2)}`\n})() }}\n```\n\nRight tool for \"logic slightly too gnarly for a one-liner.\" See `references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md` for patterns and formatting.\n\n## When the Code node IS the right answer\n\nReal uses exist. Bar is high, not \"never.\" The cases below are **legitimate**. Build with code without apologizing.\n\n### Multi-source aggregation across the whole dataset\n\nWhen a node needs to:\n\n- Read from **multiple upstream nodes simultaneously** (e.g., `$('Source A').all()`, `$('Source B').all()`, `$('Source C').first().json`).\n- Compute statistics or transformations **across all items at once** (not per-item).\n- Apply multi-step logic with intermediate data structures (lookup maps, accumulators, ratios).\n\nMost common valid case. Examples:\n\n- Analytics rollups: per-group averages, percentile scoring, normalization across categories.\n- Building lookup tables from one source and joining against rows from another.\n- Computing offsets\u002Fratios across two reference datasets, then applying to a third.\n\n```ts\n\u002F\u002F Real-world shape: aggregate test results from one source,\n\u002F\u002F model metadata from another, category mapping from a third,\n\u002F\u002F and produce per-model-per-category averages.\n\nconst testResults = $('Get Test Results').all().map(item => item.json)\nconst models = $('Get Models').all().map(item => item.json)\nconst categoryMap = $('Get Category Map').first().json.testCategoryMap\n\nconst categoryByTestId = Object.fromEntries(\n    categoryMap.map(mapping => [mapping.testId, mapping.category])\n)\n\nconst result = models.map(model => {\n    const modelTests = testResults.filter(test => test.modelId === model.id)\n    const stats = modelTests.reduce((acc, test) => {\n        const cat = categoryByTestId[test.testId]\n        if (!cat) return acc\n        acc[cat] ??= { scored: 0, available: 0, count: 0 }\n        acc[cat].scored += test.pointsScored ?? 0\n        acc[cat].available += test.pointsAvailable ?? 0\n        acc[cat].count += 1\n        return acc\n    }, {})\n\n    const averages = Object.fromEntries(\n        Object.entries(stats).map(([category, stat]) => [\n            category,\n            { avg: stat.available > 0 ? stat.scored \u002F stat.available : 0, n: stat.count }\n        ])\n    )\n\n    return { modelId: model.id, modelName: model.modelName, ...averages }\n})\n\nreturn result.map(json => ({ json }))\n```\n\nTechnically expressions can reach across items via `$('Node Name').all()` and reduce inline, but for anything with this much shape (joins, group-bys, nested aggregation) the result is a one-line megaexpression that's hard to read and impossible to debug. Use Code.\n\n### External libraries\n\nJS Code can `require` from a curated allowlist (lodash, etc.), but expressions can't. \n\n**Always check for a native node first.** n8n has more native nodes than people realize. Dropping into Code for something with a native node is a recurring mistake. The next two subsections cover the specific traps.\n\n### Cryptographic operations: use the Crypto node, not Code\n\nHMAC, signing, hashing, encryption: **n8n has a native Crypto node (`n8n-nodes-base.crypto`).** Use it. It handles SHA256, MD5, HMAC, encrypt\u002Fdecrypt, and random generation, all without writing JavaScript.\n\n```ts\n\u002F\u002F WRONG (recurring AI slip):\nconst crypto = require('crypto')\nconst hash = crypto.createHash('sha256').update(buf).digest('hex').slice(0, 12)\n\n\u002F\u002F RIGHT: configure the Crypto node with operation: 'hash', type: 'SHA256'\n\u002F\u002F   then read $('Hash').item.json.\u003Coutput> downstream.\n```\n\nThe Code-with-`require('crypto')` pattern is one of the most common false positives for \"this needs a Code node.\" It doesn't. The Crypto node covers it.\n\n#### Hashing binary, not strings\n\nDon't reach for Code just because you need to hash *binary* (a PDF, an image, a file buffer). The Crypto node has a `binaryPropertyName` parameter. Point it at the binary slot key and it hashes the buffer directly. You don't need `this.helpers.getBinaryDataBuffer(...)` in user code.\n\n```ts\n\u002F\u002F WRONG (recurring AI slip with binary):\nconst crypto = require('crypto')\nconst buf = await this.helpers.getBinaryDataBuffer($itemIndex, 'data')\nconst hash = crypto.createHash('sha256').update(buf).digest('hex')\n\n\u002F\u002F RIGHT: Crypto node configured to hash binaryPropertyName='data', SHA256.\n\u002F\u002F   Then $('Crypto').item.json.\u003Coutput> has the hash; chain a Set node for any field shaping.\n```\n\nThe remaining valid Code-for-crypto case: a non-standard signing scheme that the Crypto node doesn't expose (e.g., a custom AWS-style signature), AND `httpCustomAuth` credential doesn't fit either. Rare. Justify explicitly.\n\n### XML \u002F SOAP \u002F RSS parsing: use the XML node, not Code\n\n**n8n has a native XML node (`n8n-nodes-base.xml`)** with parse and stringify operations. It already converts XML to JSON. Once it has, the result is plain JSON and Edit Fields with arrow function expressions handles all the field extraction, array normalization (`Array.isArray(...) ? ... : ...`), and link-finding (`.find()`) you'd reach for Code to do.\n\n```ts\n\u002F\u002F WRONG (recurring AI slip):\n\u002F\u002F XML node already parsed → another Code node to extract a few fields:\nconst entry = $('Parse XML').item.json.feed.entry\nconst firstEntry = Array.isArray(entry) ? entry[0] : entry\nreturn { json: { title: firstEntry.title, url: firstEntry.link.find(link => link.type === 'pdf').href } }\n\n\u002F\u002F RIGHT: Edit Fields with arrow function expressions:\n\u002F\u002F   title:  ={{ (() => { const entry = $('Parse XML').item.json.feed.entry; return Array.isArray(entry) ? entry[0].title : entry.title; })() }}\n\u002F\u002F   pdfUrl: ={{ $('Parse XML').item.json.feed.entry.link.find(link => link.type === 'pdf')?.href }}\n```\n\nIf the field-extraction logic is genuinely too gnarly for inline expressions even with multi-line arrow functions, the next stop is Edit Fields with a single multi-line arrow function, NOT a Code node. See `references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md`.\n\n### What these have in common\n\nValid cases are about **scope**: whole-dataset, multiple sources, or stateful constructs single-item tools can't reach. Invalid cases: Code doing what an expression could, OR what a native node already does.\n\nQuick tests:\n\n- **\"Could I describe this Code node's job as 'take this one item and...'?\"** If yes, wrong tool.\n- **\"Is there a native node for this?\"** Search via `search_nodes` first. Crypto, XML, JSON parsing, date math (Luxon), HTTP calls, file I\u002FO, regex matching: all have native nodes or expression-level support.\n\n## JavaScript Code node specifics\n\nTwo modes:\n\n- **Run Once for All Items (default, use this):** runs once with `$input.all()`. If you need per-item logic, just `for (const item of $input.all())` inside. This is the standard shape and almost always what you want.\n- **Run Once for Each Item:** runs once per item with `$input.first()` (or `$input.item`). \n\nCommon shape:\n\n```ts\n\u002F\u002F Run Once for All Items\nconst items = $input.all()\nconst totals = items.map(item => ({\n  ...item.json,\n  total: item.json.qty * item.json.price,\n}))\nreturn totals.map(json => ({ json }))\n```\n\nThe return must be an array of `{ json: ... }` objects (or `{ json: ..., binary: ... }`), not raw JSON.\n\nFor binary handling, error patterns, and Code-node-only bugs, see `references\u002FJAVASCRIPT_PATTERNS.md`.\n\n\n## Reference files\n\n| File | Read when |\n|---|---|\n| `references\u002FDECISION_TREE.md` | You're tempted to use a Code node and want to verify the simpler paths really don't work |\n| `references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md` | The transformation is multi-line but pure data shaping |\n| `references\u002FJAVASCRIPT_PATTERNS.md` | Code node is genuinely needed and JS is the language |\n\n## Anti-patterns\n\n| Anti-pattern | What goes wrong | Fix |\n|---|---|---|\n| Code node doing `return { x: $input.first().json.x.toUpperCase() }` | Whole node for one expression | Replace with an Edit Fields expression |\n| Code node building HTML strings for an email body | The Email node's body field accepts expressions | Inline the expression into the email node |\n| Code node using `new Date()` for date formatting | Loses to Luxon's clarity | Use Luxon in expression. See `n8n-expressions-official` |\n| Set node + Code node combo (Set builds inputs, Code transforms) | Two nodes for what should be one Edit Fields | Collapse into one Edit Fields with arrow function |\n| Pasting credentials\u002Ftokens into Code node text | Same leak as text fields | Use credentials, not Code node |\n\n",{"data":33,"body":34},{"name":4,"description":6},{"type":35,"children":36},"root",[37,46,52,59,117,123,135,148,154,159,323,649,880,893,899,904,1181,1194,1200,1212,1219,1224,1278,1283,1301,2658,2671,2677,2690,2700,2706,2725,2928,2941,2948,2977,3208,3221,3227,3260,3597,3608,3614,3626,3631,3662,3668,3673,3727,3732,3977,3998,4010,4016,4092,4098,4234],{"type":38,"tag":39,"props":40,"children":42},"element","h1",{"id":41},"n8n-code-nodes",[43],{"type":44,"value":45},"text","n8n Code Nodes",{"type":38,"tag":47,"props":48,"children":49},"p",{},[50],{"type":44,"value":51},"The Code node is powerful and often the wrong tool. The n8n equivalent of dropping into raw SQL when an ORM would do: real cases exist, but the moment a Code node handles logic an expression could, the workflow is harder to read, debug, and maintain. There's also a real perf gap: Code runs in a sandboxed JS runtime, expressions and Edit Fields run in-process, and the per-invocation overhead can be hundreds of times higher in Code (anecdotally ~2ms vs ~600ms for equivalent logic). For hot paths and large item counts, that compounds.",{"type":38,"tag":53,"props":54,"children":56},"h2",{"id":55},"strong-defaults",[57],{"type":44,"value":58},"Strong defaults",{"type":38,"tag":60,"props":61,"children":62},"ol",{},[63,84],{"type":38,"tag":64,"props":65,"children":66},"li",{},[67,73,75,82],{"type":38,"tag":68,"props":69,"children":70},"strong",{},[71],{"type":44,"value":72},"Code node is a last resort.",{"type":44,"value":74}," Decision order: expression (",{"type":38,"tag":76,"props":77,"children":79},"code",{"className":78},[],[80],{"type":44,"value":81},"{{...}}",{"type":44,"value":83},") → arrow function inside Edit Fields → Code node. The first two paths cover most \"transform this data\" tasks. Code earns its place for multi-source aggregation, external libraries, and a few specific patterns documented below.",{"type":38,"tag":64,"props":85,"children":86},{},[87,92,94,100,102,108,109,115],{"type":38,"tag":68,"props":88,"children":89},{},[90],{"type":44,"value":91},"Default to JavaScript.",{"type":44,"value":93}," Write JS unless the user explicitly asked for Python (\"use Python here,\" \"I'm a Python shop,\" pasted Python code). Everywhere else in n8n (expressions, Edit Fields) is JS, JS has a curated library allowlist (",{"type":38,"tag":76,"props":95,"children":97},{"className":96},[],[98],{"type":44,"value":99},"lodash",{"type":44,"value":101},", ",{"type":38,"tag":76,"props":103,"children":105},{"className":104},[],[106],{"type":44,"value":107},"crypto",{"type":44,"value":101},{"type":38,"tag":76,"props":110,"children":112},{"className":111},[],[113],{"type":44,"value":114},"luxon",{"type":44,"value":116},").",{"type":38,"tag":53,"props":118,"children":120},{"id":119},"decision-tree",[121],{"type":44,"value":122},"Decision tree",{"type":38,"tag":124,"props":125,"children":129},"pre",{"className":126,"code":128,"language":44},[127],"language-text","Need custom logic?\n├── Is it a transformation of one or two fields?\n│   └── Expression: {{ $json.foo.toUpperCase() }} or {{ $json.items.map(item => item.name).join(', ') }}\n│       Most \"just transform this\" cases land here.\n│\n├── Is it multi-line, but pure data shaping (map, filter, reduce, conditional)?\n│   └── Edit Fields with arrow function expression. See references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md\n│\n├── Does it need full statements, multiple data sources, or external libs?\n│   ├── Are you SURE the above two don't work?\n│   │   └── Re-read the parent. The bar is high.\n│   └── Yes, genuinely needs it\n│       └── Code node. See references\u002FJAVASCRIPT_PATTERNS.md\n│\n└── Is it actually two separate transformations stitched together?\n    └── Use two nodes (Edit Fields → Edit Fields, or Edit Fields → IF). Composability beats one big Code block.\n",[130],{"type":38,"tag":76,"props":131,"children":133},{"__ignoreMap":132},"",[134],{"type":44,"value":128},{"type":38,"tag":47,"props":136,"children":137},{},[138,140,146],{"type":44,"value":139},"For the full decision logic with examples for each branch, see ",{"type":38,"tag":76,"props":141,"children":143},{"className":142},[],[144],{"type":44,"value":145},"references\u002FDECISION_TREE.md",{"type":44,"value":147},".",{"type":38,"tag":53,"props":149,"children":151},{"id":150},"what-expressions-can-do-that-people-forget",[152],{"type":44,"value":153},"What expressions can do that people forget",{"type":38,"tag":47,"props":155,"children":156},{},[157],{"type":44,"value":158},"Common reaches-for-Code-node that should be expressions:",{"type":38,"tag":124,"props":160,"children":164},{"className":161,"code":162,"language":163,"meta":132,"style":132},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F ❌ Code node\nreturn { name: $input.first().json.name.toUpperCase() }\n\n\u002F\u002F ✅ Expression in Edit Fields, \"name\" field\n{{ $json.name.toUpperCase() }}\n","ts",[165],{"type":38,"tag":76,"props":166,"children":167},{"__ignoreMap":132},[168,180,265,275,284],{"type":38,"tag":169,"props":170,"children":173},"span",{"class":171,"line":172},"line",1,[174],{"type":38,"tag":169,"props":175,"children":177},{"style":176},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[178],{"type":44,"value":179},"\u002F\u002F ❌ Code node\n",{"type":38,"tag":169,"props":181,"children":183},{"class":171,"line":182},2,[184,190,196,202,207,213,217,223,228,232,237,241,246,250,255,260],{"type":38,"tag":169,"props":185,"children":187},{"style":186},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[188],{"type":44,"value":189},"return",{"type":38,"tag":169,"props":191,"children":193},{"style":192},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[194],{"type":44,"value":195}," {",{"type":38,"tag":169,"props":197,"children":199},{"style":198},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[200],{"type":44,"value":201}," name",{"type":38,"tag":169,"props":203,"children":204},{"style":192},[205],{"type":44,"value":206},":",{"type":38,"tag":169,"props":208,"children":210},{"style":209},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[211],{"type":44,"value":212}," $input",{"type":38,"tag":169,"props":214,"children":215},{"style":192},[216],{"type":44,"value":147},{"type":38,"tag":169,"props":218,"children":220},{"style":219},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[221],{"type":44,"value":222},"first",{"type":38,"tag":169,"props":224,"children":225},{"style":209},[226],{"type":44,"value":227},"()",{"type":38,"tag":169,"props":229,"children":230},{"style":192},[231],{"type":44,"value":147},{"type":38,"tag":169,"props":233,"children":234},{"style":209},[235],{"type":44,"value":236},"json",{"type":38,"tag":169,"props":238,"children":239},{"style":192},[240],{"type":44,"value":147},{"type":38,"tag":169,"props":242,"children":243},{"style":209},[244],{"type":44,"value":245},"name",{"type":38,"tag":169,"props":247,"children":248},{"style":192},[249],{"type":44,"value":147},{"type":38,"tag":169,"props":251,"children":252},{"style":219},[253],{"type":44,"value":254},"toUpperCase",{"type":38,"tag":169,"props":256,"children":257},{"style":209},[258],{"type":44,"value":259},"() ",{"type":38,"tag":169,"props":261,"children":262},{"style":192},[263],{"type":44,"value":264},"}\n",{"type":38,"tag":169,"props":266,"children":268},{"class":171,"line":267},3,[269],{"type":38,"tag":169,"props":270,"children":272},{"emptyLinePlaceholder":271},true,[273],{"type":44,"value":274},"\n",{"type":38,"tag":169,"props":276,"children":278},{"class":171,"line":277},4,[279],{"type":38,"tag":169,"props":280,"children":281},{"style":176},[282],{"type":44,"value":283},"\u002F\u002F ✅ Expression in Edit Fields, \"name\" field\n",{"type":38,"tag":169,"props":285,"children":287},{"class":171,"line":286},5,[288,293,298,302,306,310,314,318],{"type":38,"tag":169,"props":289,"children":290},{"style":192},[291],{"type":44,"value":292},"{{",{"type":38,"tag":169,"props":294,"children":295},{"style":209},[296],{"type":44,"value":297}," $json",{"type":38,"tag":169,"props":299,"children":300},{"style":192},[301],{"type":44,"value":147},{"type":38,"tag":169,"props":303,"children":304},{"style":209},[305],{"type":44,"value":245},{"type":38,"tag":169,"props":307,"children":308},{"style":192},[309],{"type":44,"value":147},{"type":38,"tag":169,"props":311,"children":312},{"style":219},[313],{"type":44,"value":254},{"type":38,"tag":169,"props":315,"children":316},{"style":198},[317],{"type":44,"value":259},{"type":38,"tag":169,"props":319,"children":320},{"style":192},[321],{"type":44,"value":322},"}}\n",{"type":38,"tag":124,"props":324,"children":326},{"className":161,"code":325,"language":163,"meta":132,"style":132},"\u002F\u002F ❌ Code node\nconst items = $input.first().json.items\nreturn { tags: items.map(item => item.tag).filter(tag => tag).join(', ') }\n\n\u002F\u002F ✅ Expression\n{{ $json.items.map(item => item.tag).filter(tag => tag).join(', ') }}\n",[327],{"type":38,"tag":76,"props":328,"children":329},{"__ignoreMap":132},[330,337,389,515,522,530],{"type":38,"tag":169,"props":331,"children":332},{"class":171,"line":172},[333],{"type":38,"tag":169,"props":334,"children":335},{"style":176},[336],{"type":44,"value":179},{"type":38,"tag":169,"props":338,"children":339},{"class":171,"line":182},[340,346,351,356,360,364,368,372,376,380,384],{"type":38,"tag":169,"props":341,"children":343},{"style":342},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[344],{"type":44,"value":345},"const",{"type":38,"tag":169,"props":347,"children":348},{"style":209},[349],{"type":44,"value":350}," items ",{"type":38,"tag":169,"props":352,"children":353},{"style":192},[354],{"type":44,"value":355},"=",{"type":38,"tag":169,"props":357,"children":358},{"style":209},[359],{"type":44,"value":212},{"type":38,"tag":169,"props":361,"children":362},{"style":192},[363],{"type":44,"value":147},{"type":38,"tag":169,"props":365,"children":366},{"style":219},[367],{"type":44,"value":222},{"type":38,"tag":169,"props":369,"children":370},{"style":209},[371],{"type":44,"value":227},{"type":38,"tag":169,"props":373,"children":374},{"style":192},[375],{"type":44,"value":147},{"type":38,"tag":169,"props":377,"children":378},{"style":209},[379],{"type":44,"value":236},{"type":38,"tag":169,"props":381,"children":382},{"style":192},[383],{"type":44,"value":147},{"type":38,"tag":169,"props":385,"children":386},{"style":209},[387],{"type":44,"value":388},"items\n",{"type":38,"tag":169,"props":390,"children":391},{"class":171,"line":267},[392,396,400,405,409,414,418,423,428,434,439,444,448,453,457,462,466,470,474,479,483,488,492,497,502,506,511],{"type":38,"tag":169,"props":393,"children":394},{"style":186},[395],{"type":44,"value":189},{"type":38,"tag":169,"props":397,"children":398},{"style":192},[399],{"type":44,"value":195},{"type":38,"tag":169,"props":401,"children":402},{"style":198},[403],{"type":44,"value":404}," tags",{"type":38,"tag":169,"props":406,"children":407},{"style":192},[408],{"type":44,"value":206},{"type":38,"tag":169,"props":410,"children":411},{"style":209},[412],{"type":44,"value":413}," items",{"type":38,"tag":169,"props":415,"children":416},{"style":192},[417],{"type":44,"value":147},{"type":38,"tag":169,"props":419,"children":420},{"style":219},[421],{"type":44,"value":422},"map",{"type":38,"tag":169,"props":424,"children":425},{"style":209},[426],{"type":44,"value":427},"(",{"type":38,"tag":169,"props":429,"children":431},{"style":430},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[432],{"type":44,"value":433},"item",{"type":38,"tag":169,"props":435,"children":436},{"style":342},[437],{"type":44,"value":438}," =>",{"type":38,"tag":169,"props":440,"children":441},{"style":209},[442],{"type":44,"value":443}," item",{"type":38,"tag":169,"props":445,"children":446},{"style":192},[447],{"type":44,"value":147},{"type":38,"tag":169,"props":449,"children":450},{"style":209},[451],{"type":44,"value":452},"tag)",{"type":38,"tag":169,"props":454,"children":455},{"style":192},[456],{"type":44,"value":147},{"type":38,"tag":169,"props":458,"children":459},{"style":219},[460],{"type":44,"value":461},"filter",{"type":38,"tag":169,"props":463,"children":464},{"style":209},[465],{"type":44,"value":427},{"type":38,"tag":169,"props":467,"children":468},{"style":430},[469],{"type":44,"value":15},{"type":38,"tag":169,"props":471,"children":472},{"style":342},[473],{"type":44,"value":438},{"type":38,"tag":169,"props":475,"children":476},{"style":209},[477],{"type":44,"value":478}," tag)",{"type":38,"tag":169,"props":480,"children":481},{"style":192},[482],{"type":44,"value":147},{"type":38,"tag":169,"props":484,"children":485},{"style":219},[486],{"type":44,"value":487},"join",{"type":38,"tag":169,"props":489,"children":490},{"style":209},[491],{"type":44,"value":427},{"type":38,"tag":169,"props":493,"children":494},{"style":192},[495],{"type":44,"value":496},"'",{"type":38,"tag":169,"props":498,"children":500},{"style":499},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[501],{"type":44,"value":101},{"type":38,"tag":169,"props":503,"children":504},{"style":192},[505],{"type":44,"value":496},{"type":38,"tag":169,"props":507,"children":508},{"style":209},[509],{"type":44,"value":510},") ",{"type":38,"tag":169,"props":512,"children":513},{"style":192},[514],{"type":44,"value":264},{"type":38,"tag":169,"props":516,"children":517},{"class":171,"line":277},[518],{"type":38,"tag":169,"props":519,"children":520},{"emptyLinePlaceholder":271},[521],{"type":44,"value":274},{"type":38,"tag":169,"props":523,"children":524},{"class":171,"line":286},[525],{"type":38,"tag":169,"props":526,"children":527},{"style":176},[528],{"type":44,"value":529},"\u002F\u002F ✅ Expression\n",{"type":38,"tag":169,"props":531,"children":533},{"class":171,"line":532},6,[534,538,542,546,551,555,559,563,567,571,575,579,583,588,592,596,600,604,608,613,617,621,625,629,633,637,641,645],{"type":38,"tag":169,"props":535,"children":536},{"style":192},[537],{"type":44,"value":292},{"type":38,"tag":169,"props":539,"children":540},{"style":209},[541],{"type":44,"value":297},{"type":38,"tag":169,"props":543,"children":544},{"style":192},[545],{"type":44,"value":147},{"type":38,"tag":169,"props":547,"children":548},{"style":209},[549],{"type":44,"value":550},"items",{"type":38,"tag":169,"props":552,"children":553},{"style":192},[554],{"type":44,"value":147},{"type":38,"tag":169,"props":556,"children":557},{"style":219},[558],{"type":44,"value":422},{"type":38,"tag":169,"props":560,"children":561},{"style":198},[562],{"type":44,"value":427},{"type":38,"tag":169,"props":564,"children":565},{"style":430},[566],{"type":44,"value":433},{"type":38,"tag":169,"props":568,"children":569},{"style":342},[570],{"type":44,"value":438},{"type":38,"tag":169,"props":572,"children":573},{"style":209},[574],{"type":44,"value":443},{"type":38,"tag":169,"props":576,"children":577},{"style":192},[578],{"type":44,"value":147},{"type":38,"tag":169,"props":580,"children":581},{"style":209},[582],{"type":44,"value":15},{"type":38,"tag":169,"props":584,"children":585},{"style":198},[586],{"type":44,"value":587},")",{"type":38,"tag":169,"props":589,"children":590},{"style":192},[591],{"type":44,"value":147},{"type":38,"tag":169,"props":593,"children":594},{"style":219},[595],{"type":44,"value":461},{"type":38,"tag":169,"props":597,"children":598},{"style":198},[599],{"type":44,"value":427},{"type":38,"tag":169,"props":601,"children":602},{"style":430},[603],{"type":44,"value":15},{"type":38,"tag":169,"props":605,"children":606},{"style":342},[607],{"type":44,"value":438},{"type":38,"tag":169,"props":609,"children":610},{"style":209},[611],{"type":44,"value":612}," tag",{"type":38,"tag":169,"props":614,"children":615},{"style":198},[616],{"type":44,"value":587},{"type":38,"tag":169,"props":618,"children":619},{"style":192},[620],{"type":44,"value":147},{"type":38,"tag":169,"props":622,"children":623},{"style":219},[624],{"type":44,"value":487},{"type":38,"tag":169,"props":626,"children":627},{"style":198},[628],{"type":44,"value":427},{"type":38,"tag":169,"props":630,"children":631},{"style":192},[632],{"type":44,"value":496},{"type":38,"tag":169,"props":634,"children":635},{"style":499},[636],{"type":44,"value":101},{"type":38,"tag":169,"props":638,"children":639},{"style":192},[640],{"type":44,"value":496},{"type":38,"tag":169,"props":642,"children":643},{"style":198},[644],{"type":44,"value":510},{"type":38,"tag":169,"props":646,"children":647},{"style":192},[648],{"type":44,"value":322},{"type":38,"tag":124,"props":650,"children":652},{"className":161,"code":651,"language":163,"meta":132,"style":132},"\u002F\u002F ❌ Code node\nconst date = new Date($input.first().json.created_at)\nreturn { formatted: date.toISOString().slice(0, 10) }\n\n\u002F\u002F ✅ Expression with n8n's date extension\n{{ $json.created_at.toDateTime().format('yyyy-MM-dd') }}\n",[653],{"type":38,"tag":76,"props":654,"children":655},{"__ignoreMap":132},[656,663,723,798,805,813],{"type":38,"tag":169,"props":657,"children":658},{"class":171,"line":172},[659],{"type":38,"tag":169,"props":660,"children":661},{"style":176},[662],{"type":44,"value":179},{"type":38,"tag":169,"props":664,"children":665},{"class":171,"line":182},[666,670,675,679,684,689,694,698,702,706,710,714,718],{"type":38,"tag":169,"props":667,"children":668},{"style":342},[669],{"type":44,"value":345},{"type":38,"tag":169,"props":671,"children":672},{"style":209},[673],{"type":44,"value":674}," date ",{"type":38,"tag":169,"props":676,"children":677},{"style":192},[678],{"type":44,"value":355},{"type":38,"tag":169,"props":680,"children":681},{"style":192},[682],{"type":44,"value":683}," new",{"type":38,"tag":169,"props":685,"children":686},{"style":219},[687],{"type":44,"value":688}," Date",{"type":38,"tag":169,"props":690,"children":691},{"style":209},[692],{"type":44,"value":693},"($input",{"type":38,"tag":169,"props":695,"children":696},{"style":192},[697],{"type":44,"value":147},{"type":38,"tag":169,"props":699,"children":700},{"style":219},[701],{"type":44,"value":222},{"type":38,"tag":169,"props":703,"children":704},{"style":209},[705],{"type":44,"value":227},{"type":38,"tag":169,"props":707,"children":708},{"style":192},[709],{"type":44,"value":147},{"type":38,"tag":169,"props":711,"children":712},{"style":209},[713],{"type":44,"value":236},{"type":38,"tag":169,"props":715,"children":716},{"style":192},[717],{"type":44,"value":147},{"type":38,"tag":169,"props":719,"children":720},{"style":209},[721],{"type":44,"value":722},"created_at)\n",{"type":38,"tag":169,"props":724,"children":725},{"class":171,"line":267},[726,730,734,739,743,748,752,757,761,765,770,774,780,785,790,794],{"type":38,"tag":169,"props":727,"children":728},{"style":186},[729],{"type":44,"value":189},{"type":38,"tag":169,"props":731,"children":732},{"style":192},[733],{"type":44,"value":195},{"type":38,"tag":169,"props":735,"children":736},{"style":198},[737],{"type":44,"value":738}," formatted",{"type":38,"tag":169,"props":740,"children":741},{"style":192},[742],{"type":44,"value":206},{"type":38,"tag":169,"props":744,"children":745},{"style":209},[746],{"type":44,"value":747}," date",{"type":38,"tag":169,"props":749,"children":750},{"style":192},[751],{"type":44,"value":147},{"type":38,"tag":169,"props":753,"children":754},{"style":219},[755],{"type":44,"value":756},"toISOString",{"type":38,"tag":169,"props":758,"children":759},{"style":209},[760],{"type":44,"value":227},{"type":38,"tag":169,"props":762,"children":763},{"style":192},[764],{"type":44,"value":147},{"type":38,"tag":169,"props":766,"children":767},{"style":219},[768],{"type":44,"value":769},"slice",{"type":38,"tag":169,"props":771,"children":772},{"style":209},[773],{"type":44,"value":427},{"type":38,"tag":169,"props":775,"children":777},{"style":776},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[778],{"type":44,"value":779},"0",{"type":38,"tag":169,"props":781,"children":782},{"style":192},[783],{"type":44,"value":784},",",{"type":38,"tag":169,"props":786,"children":787},{"style":776},[788],{"type":44,"value":789}," 10",{"type":38,"tag":169,"props":791,"children":792},{"style":209},[793],{"type":44,"value":510},{"type":38,"tag":169,"props":795,"children":796},{"style":192},[797],{"type":44,"value":264},{"type":38,"tag":169,"props":799,"children":800},{"class":171,"line":277},[801],{"type":38,"tag":169,"props":802,"children":803},{"emptyLinePlaceholder":271},[804],{"type":44,"value":274},{"type":38,"tag":169,"props":806,"children":807},{"class":171,"line":286},[808],{"type":38,"tag":169,"props":809,"children":810},{"style":176},[811],{"type":44,"value":812},"\u002F\u002F ✅ Expression with n8n's date extension\n",{"type":38,"tag":169,"props":814,"children":815},{"class":171,"line":532},[816,820,824,828,833,837,842,846,850,855,859,863,868,872,876],{"type":38,"tag":169,"props":817,"children":818},{"style":192},[819],{"type":44,"value":292},{"type":38,"tag":169,"props":821,"children":822},{"style":209},[823],{"type":44,"value":297},{"type":38,"tag":169,"props":825,"children":826},{"style":192},[827],{"type":44,"value":147},{"type":38,"tag":169,"props":829,"children":830},{"style":209},[831],{"type":44,"value":832},"created_at",{"type":38,"tag":169,"props":834,"children":835},{"style":192},[836],{"type":44,"value":147},{"type":38,"tag":169,"props":838,"children":839},{"style":219},[840],{"type":44,"value":841},"toDateTime",{"type":38,"tag":169,"props":843,"children":844},{"style":198},[845],{"type":44,"value":227},{"type":38,"tag":169,"props":847,"children":848},{"style":192},[849],{"type":44,"value":147},{"type":38,"tag":169,"props":851,"children":852},{"style":219},[853],{"type":44,"value":854},"format",{"type":38,"tag":169,"props":856,"children":857},{"style":198},[858],{"type":44,"value":427},{"type":38,"tag":169,"props":860,"children":861},{"style":192},[862],{"type":44,"value":496},{"type":38,"tag":169,"props":864,"children":865},{"style":499},[866],{"type":44,"value":867},"yyyy-MM-dd",{"type":38,"tag":169,"props":869,"children":870},{"style":192},[871],{"type":44,"value":496},{"type":38,"tag":169,"props":873,"children":874},{"style":198},[875],{"type":44,"value":510},{"type":38,"tag":169,"props":877,"children":878},{"style":192},[879],{"type":44,"value":322},{"type":38,"tag":47,"props":881,"children":882},{},[883,885,891],{"type":44,"value":884},"For more on what expressions can express, see the ",{"type":38,"tag":76,"props":886,"children":888},{"className":887},[],[889],{"type":44,"value":890},"n8n-expressions-official",{"type":44,"value":892}," skill.",{"type":38,"tag":53,"props":894,"children":896},{"id":895},"what-arrow-functions-in-edit-fields-can-do",[897],{"type":44,"value":898},"What arrow-functions-in-Edit-Fields can do",{"type":38,"tag":47,"props":900,"children":901},{},[902],{"type":44,"value":903},"Edit Fields assigns field values via expression. Inline arrow functions get you most multi-line logic without the Code node:",{"type":38,"tag":124,"props":905,"children":907},{"className":161,"code":906,"language":163,"meta":132,"style":132},"\u002F\u002F In Edit Fields, \"summary\" field:\n{{ (() => {\n    const items = $json.items\n    const total = items.reduce((sum, item) => sum + item.price, 0)\n    const tax = total * 0.08\n    return `Total: $${(total + tax).toFixed(2)}`\n})() }}\n",[908],{"type":38,"tag":76,"props":909,"children":910},{"__ignoreMap":132},[911,919,944,973,1068,1098,1163],{"type":38,"tag":169,"props":912,"children":913},{"class":171,"line":172},[914],{"type":38,"tag":169,"props":915,"children":916},{"style":176},[917],{"type":44,"value":918},"\u002F\u002F In Edit Fields, \"summary\" field:\n",{"type":38,"tag":169,"props":920,"children":921},{"class":171,"line":182},[922,926,931,935,939],{"type":38,"tag":169,"props":923,"children":924},{"style":192},[925],{"type":44,"value":292},{"type":38,"tag":169,"props":927,"children":928},{"style":198},[929],{"type":44,"value":930}," (",{"type":38,"tag":169,"props":932,"children":933},{"style":192},[934],{"type":44,"value":227},{"type":38,"tag":169,"props":936,"children":937},{"style":342},[938],{"type":44,"value":438},{"type":38,"tag":169,"props":940,"children":941},{"style":192},[942],{"type":44,"value":943}," {\n",{"type":38,"tag":169,"props":945,"children":946},{"class":171,"line":267},[947,952,956,961,965,969],{"type":38,"tag":169,"props":948,"children":949},{"style":342},[950],{"type":44,"value":951},"    const",{"type":38,"tag":169,"props":953,"children":954},{"style":209},[955],{"type":44,"value":413},{"type":38,"tag":169,"props":957,"children":958},{"style":192},[959],{"type":44,"value":960}," =",{"type":38,"tag":169,"props":962,"children":963},{"style":209},[964],{"type":44,"value":297},{"type":38,"tag":169,"props":966,"children":967},{"style":192},[968],{"type":44,"value":147},{"type":38,"tag":169,"props":970,"children":971},{"style":209},[972],{"type":44,"value":388},{"type":38,"tag":169,"props":974,"children":975},{"class":171,"line":277},[976,980,985,989,993,997,1002,1006,1010,1015,1019,1023,1027,1031,1036,1041,1045,1049,1054,1058,1063],{"type":38,"tag":169,"props":977,"children":978},{"style":342},[979],{"type":44,"value":951},{"type":38,"tag":169,"props":981,"children":982},{"style":209},[983],{"type":44,"value":984}," total",{"type":38,"tag":169,"props":986,"children":987},{"style":192},[988],{"type":44,"value":960},{"type":38,"tag":169,"props":990,"children":991},{"style":209},[992],{"type":44,"value":413},{"type":38,"tag":169,"props":994,"children":995},{"style":192},[996],{"type":44,"value":147},{"type":38,"tag":169,"props":998,"children":999},{"style":219},[1000],{"type":44,"value":1001},"reduce",{"type":38,"tag":169,"props":1003,"children":1004},{"style":198},[1005],{"type":44,"value":427},{"type":38,"tag":169,"props":1007,"children":1008},{"style":192},[1009],{"type":44,"value":427},{"type":38,"tag":169,"props":1011,"children":1012},{"style":430},[1013],{"type":44,"value":1014},"sum",{"type":38,"tag":169,"props":1016,"children":1017},{"style":192},[1018],{"type":44,"value":784},{"type":38,"tag":169,"props":1020,"children":1021},{"style":430},[1022],{"type":44,"value":443},{"type":38,"tag":169,"props":1024,"children":1025},{"style":192},[1026],{"type":44,"value":587},{"type":38,"tag":169,"props":1028,"children":1029},{"style":342},[1030],{"type":44,"value":438},{"type":38,"tag":169,"props":1032,"children":1033},{"style":209},[1034],{"type":44,"value":1035}," sum",{"type":38,"tag":169,"props":1037,"children":1038},{"style":192},[1039],{"type":44,"value":1040}," +",{"type":38,"tag":169,"props":1042,"children":1043},{"style":209},[1044],{"type":44,"value":443},{"type":38,"tag":169,"props":1046,"children":1047},{"style":192},[1048],{"type":44,"value":147},{"type":38,"tag":169,"props":1050,"children":1051},{"style":209},[1052],{"type":44,"value":1053},"price",{"type":38,"tag":169,"props":1055,"children":1056},{"style":192},[1057],{"type":44,"value":784},{"type":38,"tag":169,"props":1059,"children":1060},{"style":776},[1061],{"type":44,"value":1062}," 0",{"type":38,"tag":169,"props":1064,"children":1065},{"style":198},[1066],{"type":44,"value":1067},")\n",{"type":38,"tag":169,"props":1069,"children":1070},{"class":171,"line":286},[1071,1075,1080,1084,1088,1093],{"type":38,"tag":169,"props":1072,"children":1073},{"style":342},[1074],{"type":44,"value":951},{"type":38,"tag":169,"props":1076,"children":1077},{"style":209},[1078],{"type":44,"value":1079}," tax",{"type":38,"tag":169,"props":1081,"children":1082},{"style":192},[1083],{"type":44,"value":960},{"type":38,"tag":169,"props":1085,"children":1086},{"style":209},[1087],{"type":44,"value":984},{"type":38,"tag":169,"props":1089,"children":1090},{"style":192},[1091],{"type":44,"value":1092}," *",{"type":38,"tag":169,"props":1094,"children":1095},{"style":776},[1096],{"type":44,"value":1097}," 0.08\n",{"type":38,"tag":169,"props":1099,"children":1100},{"class":171,"line":532},[1101,1106,1111,1116,1121,1126,1131,1136,1140,1145,1149,1154,1158],{"type":38,"tag":169,"props":1102,"children":1103},{"style":186},[1104],{"type":44,"value":1105},"    return",{"type":38,"tag":169,"props":1107,"children":1108},{"style":192},[1109],{"type":44,"value":1110}," `",{"type":38,"tag":169,"props":1112,"children":1113},{"style":499},[1114],{"type":44,"value":1115},"Total: $",{"type":38,"tag":169,"props":1117,"children":1118},{"style":192},[1119],{"type":44,"value":1120},"${",{"type":38,"tag":169,"props":1122,"children":1123},{"style":209},[1124],{"type":44,"value":1125},"(total ",{"type":38,"tag":169,"props":1127,"children":1128},{"style":192},[1129],{"type":44,"value":1130},"+",{"type":38,"tag":169,"props":1132,"children":1133},{"style":209},[1134],{"type":44,"value":1135}," tax)",{"type":38,"tag":169,"props":1137,"children":1138},{"style":192},[1139],{"type":44,"value":147},{"type":38,"tag":169,"props":1141,"children":1142},{"style":219},[1143],{"type":44,"value":1144},"toFixed",{"type":38,"tag":169,"props":1146,"children":1147},{"style":209},[1148],{"type":44,"value":427},{"type":38,"tag":169,"props":1150,"children":1151},{"style":776},[1152],{"type":44,"value":1153},"2",{"type":38,"tag":169,"props":1155,"children":1156},{"style":209},[1157],{"type":44,"value":587},{"type":38,"tag":169,"props":1159,"children":1160},{"style":192},[1161],{"type":44,"value":1162},"}`\n",{"type":38,"tag":169,"props":1164,"children":1166},{"class":171,"line":1165},7,[1167,1172,1177],{"type":38,"tag":169,"props":1168,"children":1169},{"style":192},[1170],{"type":44,"value":1171},"}",{"type":38,"tag":169,"props":1173,"children":1174},{"style":198},[1175],{"type":44,"value":1176},")() ",{"type":38,"tag":169,"props":1178,"children":1179},{"style":192},[1180],{"type":44,"value":322},{"type":38,"tag":47,"props":1182,"children":1183},{},[1184,1186,1192],{"type":44,"value":1185},"Right tool for \"logic slightly too gnarly for a one-liner.\" See ",{"type":38,"tag":76,"props":1187,"children":1189},{"className":1188},[],[1190],{"type":44,"value":1191},"references\u002FARROW_FUNCTIONS_IN_EDIT_FIELDS.md",{"type":44,"value":1193}," for patterns and formatting.",{"type":38,"tag":53,"props":1195,"children":1197},{"id":1196},"when-the-code-node-is-the-right-answer",[1198],{"type":44,"value":1199},"When the Code node IS the right answer",{"type":38,"tag":47,"props":1201,"children":1202},{},[1203,1205,1210],{"type":44,"value":1204},"Real uses exist. Bar is high, not \"never.\" The cases below are ",{"type":38,"tag":68,"props":1206,"children":1207},{},[1208],{"type":44,"value":1209},"legitimate",{"type":44,"value":1211},". Build with code without apologizing.",{"type":38,"tag":1213,"props":1214,"children":1216},"h3",{"id":1215},"multi-source-aggregation-across-the-whole-dataset",[1217],{"type":44,"value":1218},"Multi-source aggregation across the whole dataset",{"type":38,"tag":47,"props":1220,"children":1221},{},[1222],{"type":44,"value":1223},"When a node needs to:",{"type":38,"tag":1225,"props":1226,"children":1227},"ul",{},[1228,1261,1273],{"type":38,"tag":64,"props":1229,"children":1230},{},[1231,1233,1238,1240,1246,1247,1253,1254,1260],{"type":44,"value":1232},"Read from ",{"type":38,"tag":68,"props":1234,"children":1235},{},[1236],{"type":44,"value":1237},"multiple upstream nodes simultaneously",{"type":44,"value":1239}," (e.g., ",{"type":38,"tag":76,"props":1241,"children":1243},{"className":1242},[],[1244],{"type":44,"value":1245},"$('Source A').all()",{"type":44,"value":101},{"type":38,"tag":76,"props":1248,"children":1250},{"className":1249},[],[1251],{"type":44,"value":1252},"$('Source B').all()",{"type":44,"value":101},{"type":38,"tag":76,"props":1255,"children":1257},{"className":1256},[],[1258],{"type":44,"value":1259},"$('Source C').first().json",{"type":44,"value":116},{"type":38,"tag":64,"props":1262,"children":1263},{},[1264,1266,1271],{"type":44,"value":1265},"Compute statistics or transformations ",{"type":38,"tag":68,"props":1267,"children":1268},{},[1269],{"type":44,"value":1270},"across all items at once",{"type":44,"value":1272}," (not per-item).",{"type":38,"tag":64,"props":1274,"children":1275},{},[1276],{"type":44,"value":1277},"Apply multi-step logic with intermediate data structures (lookup maps, accumulators, ratios).",{"type":38,"tag":47,"props":1279,"children":1280},{},[1281],{"type":44,"value":1282},"Most common valid case. Examples:",{"type":38,"tag":1225,"props":1284,"children":1285},{},[1286,1291,1296],{"type":38,"tag":64,"props":1287,"children":1288},{},[1289],{"type":44,"value":1290},"Analytics rollups: per-group averages, percentile scoring, normalization across categories.",{"type":38,"tag":64,"props":1292,"children":1293},{},[1294],{"type":44,"value":1295},"Building lookup tables from one source and joining against rows from another.",{"type":38,"tag":64,"props":1297,"children":1298},{},[1299],{"type":44,"value":1300},"Computing offsets\u002Fratios across two reference datasets, then applying to a third.",{"type":38,"tag":124,"props":1302,"children":1304},{"className":161,"code":1303,"language":163,"meta":132,"style":132},"\u002F\u002F Real-world shape: aggregate test results from one source,\n\u002F\u002F model metadata from another, category mapping from a third,\n\u002F\u002F and produce per-model-per-category averages.\n\nconst testResults = $('Get Test Results').all().map(item => item.json)\nconst models = $('Get Models').all().map(item => item.json)\nconst categoryMap = $('Get Category Map').first().json.testCategoryMap\n\nconst categoryByTestId = Object.fromEntries(\n    categoryMap.map(mapping => [mapping.testId, mapping.category])\n)\n\nconst result = models.map(model => {\n    const modelTests = testResults.filter(test => test.modelId === model.id)\n    const stats = modelTests.reduce((acc, test) => {\n        const cat = categoryByTestId[test.testId]\n        if (!cat) return acc\n        acc[cat] ??= { scored: 0, available: 0, count: 0 }\n        acc[cat].scored += test.pointsScored ?? 0\n        acc[cat].available += test.pointsAvailable ?? 0\n        acc[cat].count += 1\n        return acc\n    }, {})\n\n    const averages = Object.fromEntries(\n        Object.entries(stats).map(([category, stat]) => [\n            category,\n            { avg: stat.available > 0 ? stat.scored \u002F stat.available : 0, n: stat.count }\n        ])\n    )\n\n    return { modelId: model.id, modelName: model.modelName, ...averages }\n})\n\nreturn result.map(json => ({ json }))\n",[1305],{"type":38,"tag":76,"props":1306,"children":1307},{"__ignoreMap":132},[1308,1316,1324,1332,1339,1427,1512,1582,1590,1626,1688,1696,1704,1751,1831,1893,1938,1974,2057,2115,2169,2207,2220,2238,2246,2279,2355,2369,2480,2489,2497,2505,2582,2594,2602],{"type":38,"tag":169,"props":1309,"children":1310},{"class":171,"line":172},[1311],{"type":38,"tag":169,"props":1312,"children":1313},{"style":176},[1314],{"type":44,"value":1315},"\u002F\u002F Real-world shape: aggregate test results from one source,\n",{"type":38,"tag":169,"props":1317,"children":1318},{"class":171,"line":182},[1319],{"type":38,"tag":169,"props":1320,"children":1321},{"style":176},[1322],{"type":44,"value":1323},"\u002F\u002F model metadata from another, category mapping from a third,\n",{"type":38,"tag":169,"props":1325,"children":1326},{"class":171,"line":267},[1327],{"type":38,"tag":169,"props":1328,"children":1329},{"style":176},[1330],{"type":44,"value":1331},"\u002F\u002F and produce per-model-per-category averages.\n",{"type":38,"tag":169,"props":1333,"children":1334},{"class":171,"line":277},[1335],{"type":38,"tag":169,"props":1336,"children":1337},{"emptyLinePlaceholder":271},[1338],{"type":44,"value":274},{"type":38,"tag":169,"props":1340,"children":1341},{"class":171,"line":286},[1342,1346,1351,1355,1360,1364,1368,1373,1377,1381,1385,1390,1394,1398,1402,1406,1410,1414,1418,1422],{"type":38,"tag":169,"props":1343,"children":1344},{"style":342},[1345],{"type":44,"value":345},{"type":38,"tag":169,"props":1347,"children":1348},{"style":209},[1349],{"type":44,"value":1350}," testResults ",{"type":38,"tag":169,"props":1352,"children":1353},{"style":192},[1354],{"type":44,"value":355},{"type":38,"tag":169,"props":1356,"children":1357},{"style":219},[1358],{"type":44,"value":1359}," $",{"type":38,"tag":169,"props":1361,"children":1362},{"style":209},[1363],{"type":44,"value":427},{"type":38,"tag":169,"props":1365,"children":1366},{"style":192},[1367],{"type":44,"value":496},{"type":38,"tag":169,"props":1369,"children":1370},{"style":499},[1371],{"type":44,"value":1372},"Get Test Results",{"type":38,"tag":169,"props":1374,"children":1375},{"style":192},[1376],{"type":44,"value":496},{"type":38,"tag":169,"props":1378,"children":1379},{"style":209},[1380],{"type":44,"value":587},{"type":38,"tag":169,"props":1382,"children":1383},{"style":192},[1384],{"type":44,"value":147},{"type":38,"tag":169,"props":1386,"children":1387},{"style":219},[1388],{"type":44,"value":1389},"all",{"type":38,"tag":169,"props":1391,"children":1392},{"style":209},[1393],{"type":44,"value":227},{"type":38,"tag":169,"props":1395,"children":1396},{"style":192},[1397],{"type":44,"value":147},{"type":38,"tag":169,"props":1399,"children":1400},{"style":219},[1401],{"type":44,"value":422},{"type":38,"tag":169,"props":1403,"children":1404},{"style":209},[1405],{"type":44,"value":427},{"type":38,"tag":169,"props":1407,"children":1408},{"style":430},[1409],{"type":44,"value":433},{"type":38,"tag":169,"props":1411,"children":1412},{"style":342},[1413],{"type":44,"value":438},{"type":38,"tag":169,"props":1415,"children":1416},{"style":209},[1417],{"type":44,"value":443},{"type":38,"tag":169,"props":1419,"children":1420},{"style":192},[1421],{"type":44,"value":147},{"type":38,"tag":169,"props":1423,"children":1424},{"style":209},[1425],{"type":44,"value":1426},"json)\n",{"type":38,"tag":169,"props":1428,"children":1429},{"class":171,"line":532},[1430,1434,1439,1443,1447,1451,1455,1460,1464,1468,1472,1476,1480,1484,1488,1492,1496,1500,1504,1508],{"type":38,"tag":169,"props":1431,"children":1432},{"style":342},[1433],{"type":44,"value":345},{"type":38,"tag":169,"props":1435,"children":1436},{"style":209},[1437],{"type":44,"value":1438}," models ",{"type":38,"tag":169,"props":1440,"children":1441},{"style":192},[1442],{"type":44,"value":355},{"type":38,"tag":169,"props":1444,"children":1445},{"style":219},[1446],{"type":44,"value":1359},{"type":38,"tag":169,"props":1448,"children":1449},{"style":209},[1450],{"type":44,"value":427},{"type":38,"tag":169,"props":1452,"children":1453},{"style":192},[1454],{"type":44,"value":496},{"type":38,"tag":169,"props":1456,"children":1457},{"style":499},[1458],{"type":44,"value":1459},"Get Models",{"type":38,"tag":169,"props":1461,"children":1462},{"style":192},[1463],{"type":44,"value":496},{"type":38,"tag":169,"props":1465,"children":1466},{"style":209},[1467],{"type":44,"value":587},{"type":38,"tag":169,"props":1469,"children":1470},{"style":192},[1471],{"type":44,"value":147},{"type":38,"tag":169,"props":1473,"children":1474},{"style":219},[1475],{"type":44,"value":1389},{"type":38,"tag":169,"props":1477,"children":1478},{"style":209},[1479],{"type":44,"value":227},{"type":38,"tag":169,"props":1481,"children":1482},{"style":192},[1483],{"type":44,"value":147},{"type":38,"tag":169,"props":1485,"children":1486},{"style":219},[1487],{"type":44,"value":422},{"type":38,"tag":169,"props":1489,"children":1490},{"style":209},[1491],{"type":44,"value":427},{"type":38,"tag":169,"props":1493,"children":1494},{"style":430},[1495],{"type":44,"value":433},{"type":38,"tag":169,"props":1497,"children":1498},{"style":342},[1499],{"type":44,"value":438},{"type":38,"tag":169,"props":1501,"children":1502},{"style":209},[1503],{"type":44,"value":443},{"type":38,"tag":169,"props":1505,"children":1506},{"style":192},[1507],{"type":44,"value":147},{"type":38,"tag":169,"props":1509,"children":1510},{"style":209},[1511],{"type":44,"value":1426},{"type":38,"tag":169,"props":1513,"children":1514},{"class":171,"line":1165},[1515,1519,1524,1528,1532,1536,1540,1545,1549,1553,1557,1561,1565,1569,1573,1577],{"type":38,"tag":169,"props":1516,"children":1517},{"style":342},[1518],{"type":44,"value":345},{"type":38,"tag":169,"props":1520,"children":1521},{"style":209},[1522],{"type":44,"value":1523}," categoryMap ",{"type":38,"tag":169,"props":1525,"children":1526},{"style":192},[1527],{"type":44,"value":355},{"type":38,"tag":169,"props":1529,"children":1530},{"style":219},[1531],{"type":44,"value":1359},{"type":38,"tag":169,"props":1533,"children":1534},{"style":209},[1535],{"type":44,"value":427},{"type":38,"tag":169,"props":1537,"children":1538},{"style":192},[1539],{"type":44,"value":496},{"type":38,"tag":169,"props":1541,"children":1542},{"style":499},[1543],{"type":44,"value":1544},"Get Category Map",{"type":38,"tag":169,"props":1546,"children":1547},{"style":192},[1548],{"type":44,"value":496},{"type":38,"tag":169,"props":1550,"children":1551},{"style":209},[1552],{"type":44,"value":587},{"type":38,"tag":169,"props":1554,"children":1555},{"style":192},[1556],{"type":44,"value":147},{"type":38,"tag":169,"props":1558,"children":1559},{"style":219},[1560],{"type":44,"value":222},{"type":38,"tag":169,"props":1562,"children":1563},{"style":209},[1564],{"type":44,"value":227},{"type":38,"tag":169,"props":1566,"children":1567},{"style":192},[1568],{"type":44,"value":147},{"type":38,"tag":169,"props":1570,"children":1571},{"style":209},[1572],{"type":44,"value":236},{"type":38,"tag":169,"props":1574,"children":1575},{"style":192},[1576],{"type":44,"value":147},{"type":38,"tag":169,"props":1578,"children":1579},{"style":209},[1580],{"type":44,"value":1581},"testCategoryMap\n",{"type":38,"tag":169,"props":1583,"children":1585},{"class":171,"line":1584},8,[1586],{"type":38,"tag":169,"props":1587,"children":1588},{"emptyLinePlaceholder":271},[1589],{"type":44,"value":274},{"type":38,"tag":169,"props":1591,"children":1593},{"class":171,"line":1592},9,[1594,1598,1603,1607,1612,1616,1621],{"type":38,"tag":169,"props":1595,"children":1596},{"style":342},[1597],{"type":44,"value":345},{"type":38,"tag":169,"props":1599,"children":1600},{"style":209},[1601],{"type":44,"value":1602}," categoryByTestId ",{"type":38,"tag":169,"props":1604,"children":1605},{"style":192},[1606],{"type":44,"value":355},{"type":38,"tag":169,"props":1608,"children":1609},{"style":209},[1610],{"type":44,"value":1611}," Object",{"type":38,"tag":169,"props":1613,"children":1614},{"style":192},[1615],{"type":44,"value":147},{"type":38,"tag":169,"props":1617,"children":1618},{"style":219},[1619],{"type":44,"value":1620},"fromEntries",{"type":38,"tag":169,"props":1622,"children":1623},{"style":209},[1624],{"type":44,"value":1625},"(\n",{"type":38,"tag":169,"props":1627,"children":1629},{"class":171,"line":1628},10,[1630,1635,1639,1643,1647,1652,1656,1661,1665,1670,1674,1679,1683],{"type":38,"tag":169,"props":1631,"children":1632},{"style":209},[1633],{"type":44,"value":1634},"    categoryMap",{"type":38,"tag":169,"props":1636,"children":1637},{"style":192},[1638],{"type":44,"value":147},{"type":38,"tag":169,"props":1640,"children":1641},{"style":219},[1642],{"type":44,"value":422},{"type":38,"tag":169,"props":1644,"children":1645},{"style":209},[1646],{"type":44,"value":427},{"type":38,"tag":169,"props":1648,"children":1649},{"style":430},[1650],{"type":44,"value":1651},"mapping",{"type":38,"tag":169,"props":1653,"children":1654},{"style":342},[1655],{"type":44,"value":438},{"type":38,"tag":169,"props":1657,"children":1658},{"style":209},[1659],{"type":44,"value":1660}," [mapping",{"type":38,"tag":169,"props":1662,"children":1663},{"style":192},[1664],{"type":44,"value":147},{"type":38,"tag":169,"props":1666,"children":1667},{"style":209},[1668],{"type":44,"value":1669},"testId",{"type":38,"tag":169,"props":1671,"children":1672},{"style":192},[1673],{"type":44,"value":784},{"type":38,"tag":169,"props":1675,"children":1676},{"style":209},[1677],{"type":44,"value":1678}," mapping",{"type":38,"tag":169,"props":1680,"children":1681},{"style":192},[1682],{"type":44,"value":147},{"type":38,"tag":169,"props":1684,"children":1685},{"style":209},[1686],{"type":44,"value":1687},"category])\n",{"type":38,"tag":169,"props":1689,"children":1691},{"class":171,"line":1690},11,[1692],{"type":38,"tag":169,"props":1693,"children":1694},{"style":209},[1695],{"type":44,"value":1067},{"type":38,"tag":169,"props":1697,"children":1699},{"class":171,"line":1698},12,[1700],{"type":38,"tag":169,"props":1701,"children":1702},{"emptyLinePlaceholder":271},[1703],{"type":44,"value":274},{"type":38,"tag":169,"props":1705,"children":1707},{"class":171,"line":1706},13,[1708,1712,1717,1721,1726,1730,1734,1738,1743,1747],{"type":38,"tag":169,"props":1709,"children":1710},{"style":342},[1711],{"type":44,"value":345},{"type":38,"tag":169,"props":1713,"children":1714},{"style":209},[1715],{"type":44,"value":1716}," result ",{"type":38,"tag":169,"props":1718,"children":1719},{"style":192},[1720],{"type":44,"value":355},{"type":38,"tag":169,"props":1722,"children":1723},{"style":209},[1724],{"type":44,"value":1725}," models",{"type":38,"tag":169,"props":1727,"children":1728},{"style":192},[1729],{"type":44,"value":147},{"type":38,"tag":169,"props":1731,"children":1732},{"style":219},[1733],{"type":44,"value":422},{"type":38,"tag":169,"props":1735,"children":1736},{"style":209},[1737],{"type":44,"value":427},{"type":38,"tag":169,"props":1739,"children":1740},{"style":430},[1741],{"type":44,"value":1742},"model",{"type":38,"tag":169,"props":1744,"children":1745},{"style":342},[1746],{"type":44,"value":438},{"type":38,"tag":169,"props":1748,"children":1749},{"style":192},[1750],{"type":44,"value":943},{"type":38,"tag":169,"props":1752,"children":1754},{"class":171,"line":1753},14,[1755,1759,1764,1768,1773,1777,1781,1785,1790,1794,1799,1803,1808,1813,1818,1822,1827],{"type":38,"tag":169,"props":1756,"children":1757},{"style":342},[1758],{"type":44,"value":951},{"type":38,"tag":169,"props":1760,"children":1761},{"style":209},[1762],{"type":44,"value":1763}," modelTests",{"type":38,"tag":169,"props":1765,"children":1766},{"style":192},[1767],{"type":44,"value":960},{"type":38,"tag":169,"props":1769,"children":1770},{"style":209},[1771],{"type":44,"value":1772}," testResults",{"type":38,"tag":169,"props":1774,"children":1775},{"style":192},[1776],{"type":44,"value":147},{"type":38,"tag":169,"props":1778,"children":1779},{"style":219},[1780],{"type":44,"value":461},{"type":38,"tag":169,"props":1782,"children":1783},{"style":198},[1784],{"type":44,"value":427},{"type":38,"tag":169,"props":1786,"children":1787},{"style":430},[1788],{"type":44,"value":1789},"test",{"type":38,"tag":169,"props":1791,"children":1792},{"style":342},[1793],{"type":44,"value":438},{"type":38,"tag":169,"props":1795,"children":1796},{"style":209},[1797],{"type":44,"value":1798}," test",{"type":38,"tag":169,"props":1800,"children":1801},{"style":192},[1802],{"type":44,"value":147},{"type":38,"tag":169,"props":1804,"children":1805},{"style":209},[1806],{"type":44,"value":1807},"modelId",{"type":38,"tag":169,"props":1809,"children":1810},{"style":192},[1811],{"type":44,"value":1812}," ===",{"type":38,"tag":169,"props":1814,"children":1815},{"style":209},[1816],{"type":44,"value":1817}," model",{"type":38,"tag":169,"props":1819,"children":1820},{"style":192},[1821],{"type":44,"value":147},{"type":38,"tag":169,"props":1823,"children":1824},{"style":209},[1825],{"type":44,"value":1826},"id",{"type":38,"tag":169,"props":1828,"children":1829},{"style":198},[1830],{"type":44,"value":1067},{"type":38,"tag":169,"props":1832,"children":1834},{"class":171,"line":1833},15,[1835,1839,1844,1848,1852,1856,1860,1864,1868,1873,1877,1881,1885,1889],{"type":38,"tag":169,"props":1836,"children":1837},{"style":342},[1838],{"type":44,"value":951},{"type":38,"tag":169,"props":1840,"children":1841},{"style":209},[1842],{"type":44,"value":1843}," stats",{"type":38,"tag":169,"props":1845,"children":1846},{"style":192},[1847],{"type":44,"value":960},{"type":38,"tag":169,"props":1849,"children":1850},{"style":209},[1851],{"type":44,"value":1763},{"type":38,"tag":169,"props":1853,"children":1854},{"style":192},[1855],{"type":44,"value":147},{"type":38,"tag":169,"props":1857,"children":1858},{"style":219},[1859],{"type":44,"value":1001},{"type":38,"tag":169,"props":1861,"children":1862},{"style":198},[1863],{"type":44,"value":427},{"type":38,"tag":169,"props":1865,"children":1866},{"style":192},[1867],{"type":44,"value":427},{"type":38,"tag":169,"props":1869,"children":1870},{"style":430},[1871],{"type":44,"value":1872},"acc",{"type":38,"tag":169,"props":1874,"children":1875},{"style":192},[1876],{"type":44,"value":784},{"type":38,"tag":169,"props":1878,"children":1879},{"style":430},[1880],{"type":44,"value":1798},{"type":38,"tag":169,"props":1882,"children":1883},{"style":192},[1884],{"type":44,"value":587},{"type":38,"tag":169,"props":1886,"children":1887},{"style":342},[1888],{"type":44,"value":438},{"type":38,"tag":169,"props":1890,"children":1891},{"style":192},[1892],{"type":44,"value":943},{"type":38,"tag":169,"props":1894,"children":1896},{"class":171,"line":1895},16,[1897,1902,1907,1911,1916,1921,1925,1929,1933],{"type":38,"tag":169,"props":1898,"children":1899},{"style":342},[1900],{"type":44,"value":1901},"        const",{"type":38,"tag":169,"props":1903,"children":1904},{"style":209},[1905],{"type":44,"value":1906}," cat",{"type":38,"tag":169,"props":1908,"children":1909},{"style":192},[1910],{"type":44,"value":960},{"type":38,"tag":169,"props":1912,"children":1913},{"style":209},[1914],{"type":44,"value":1915}," categoryByTestId",{"type":38,"tag":169,"props":1917,"children":1918},{"style":198},[1919],{"type":44,"value":1920},"[",{"type":38,"tag":169,"props":1922,"children":1923},{"style":209},[1924],{"type":44,"value":1789},{"type":38,"tag":169,"props":1926,"children":1927},{"style":192},[1928],{"type":44,"value":147},{"type":38,"tag":169,"props":1930,"children":1931},{"style":209},[1932],{"type":44,"value":1669},{"type":38,"tag":169,"props":1934,"children":1935},{"style":198},[1936],{"type":44,"value":1937},"]\n",{"type":38,"tag":169,"props":1939,"children":1941},{"class":171,"line":1940},17,[1942,1947,1951,1956,1961,1965,1969],{"type":38,"tag":169,"props":1943,"children":1944},{"style":186},[1945],{"type":44,"value":1946},"        if",{"type":38,"tag":169,"props":1948,"children":1949},{"style":198},[1950],{"type":44,"value":930},{"type":38,"tag":169,"props":1952,"children":1953},{"style":192},[1954],{"type":44,"value":1955},"!",{"type":38,"tag":169,"props":1957,"children":1958},{"style":209},[1959],{"type":44,"value":1960},"cat",{"type":38,"tag":169,"props":1962,"children":1963},{"style":198},[1964],{"type":44,"value":510},{"type":38,"tag":169,"props":1966,"children":1967},{"style":186},[1968],{"type":44,"value":189},{"type":38,"tag":169,"props":1970,"children":1971},{"style":209},[1972],{"type":44,"value":1973}," acc\n",{"type":38,"tag":169,"props":1975,"children":1977},{"class":171,"line":1976},18,[1978,1983,1987,1991,1996,2001,2005,2010,2014,2018,2022,2027,2031,2035,2039,2044,2048,2052],{"type":38,"tag":169,"props":1979,"children":1980},{"style":209},[1981],{"type":44,"value":1982},"        acc",{"type":38,"tag":169,"props":1984,"children":1985},{"style":198},[1986],{"type":44,"value":1920},{"type":38,"tag":169,"props":1988,"children":1989},{"style":209},[1990],{"type":44,"value":1960},{"type":38,"tag":169,"props":1992,"children":1993},{"style":198},[1994],{"type":44,"value":1995},"] ",{"type":38,"tag":169,"props":1997,"children":1998},{"style":192},[1999],{"type":44,"value":2000},"??=",{"type":38,"tag":169,"props":2002,"children":2003},{"style":192},[2004],{"type":44,"value":195},{"type":38,"tag":169,"props":2006,"children":2007},{"style":198},[2008],{"type":44,"value":2009}," scored",{"type":38,"tag":169,"props":2011,"children":2012},{"style":192},[2013],{"type":44,"value":206},{"type":38,"tag":169,"props":2015,"children":2016},{"style":776},[2017],{"type":44,"value":1062},{"type":38,"tag":169,"props":2019,"children":2020},{"style":192},[2021],{"type":44,"value":784},{"type":38,"tag":169,"props":2023,"children":2024},{"style":198},[2025],{"type":44,"value":2026}," available",{"type":38,"tag":169,"props":2028,"children":2029},{"style":192},[2030],{"type":44,"value":206},{"type":38,"tag":169,"props":2032,"children":2033},{"style":776},[2034],{"type":44,"value":1062},{"type":38,"tag":169,"props":2036,"children":2037},{"style":192},[2038],{"type":44,"value":784},{"type":38,"tag":169,"props":2040,"children":2041},{"style":198},[2042],{"type":44,"value":2043}," count",{"type":38,"tag":169,"props":2045,"children":2046},{"style":192},[2047],{"type":44,"value":206},{"type":38,"tag":169,"props":2049,"children":2050},{"style":776},[2051],{"type":44,"value":1062},{"type":38,"tag":169,"props":2053,"children":2054},{"style":192},[2055],{"type":44,"value":2056}," }\n",{"type":38,"tag":169,"props":2058,"children":2060},{"class":171,"line":2059},19,[2061,2065,2069,2073,2078,2082,2087,2092,2096,2100,2105,2110],{"type":38,"tag":169,"props":2062,"children":2063},{"style":209},[2064],{"type":44,"value":1982},{"type":38,"tag":169,"props":2066,"children":2067},{"style":198},[2068],{"type":44,"value":1920},{"type":38,"tag":169,"props":2070,"children":2071},{"style":209},[2072],{"type":44,"value":1960},{"type":38,"tag":169,"props":2074,"children":2075},{"style":198},[2076],{"type":44,"value":2077},"]",{"type":38,"tag":169,"props":2079,"children":2080},{"style":192},[2081],{"type":44,"value":147},{"type":38,"tag":169,"props":2083,"children":2084},{"style":209},[2085],{"type":44,"value":2086},"scored",{"type":38,"tag":169,"props":2088,"children":2089},{"style":192},[2090],{"type":44,"value":2091}," +=",{"type":38,"tag":169,"props":2093,"children":2094},{"style":209},[2095],{"type":44,"value":1798},{"type":38,"tag":169,"props":2097,"children":2098},{"style":192},[2099],{"type":44,"value":147},{"type":38,"tag":169,"props":2101,"children":2102},{"style":209},[2103],{"type":44,"value":2104},"pointsScored",{"type":38,"tag":169,"props":2106,"children":2107},{"style":192},[2108],{"type":44,"value":2109}," ??",{"type":38,"tag":169,"props":2111,"children":2112},{"style":776},[2113],{"type":44,"value":2114}," 0\n",{"type":38,"tag":169,"props":2116,"children":2118},{"class":171,"line":2117},20,[2119,2123,2127,2131,2135,2139,2144,2148,2152,2156,2161,2165],{"type":38,"tag":169,"props":2120,"children":2121},{"style":209},[2122],{"type":44,"value":1982},{"type":38,"tag":169,"props":2124,"children":2125},{"style":198},[2126],{"type":44,"value":1920},{"type":38,"tag":169,"props":2128,"children":2129},{"style":209},[2130],{"type":44,"value":1960},{"type":38,"tag":169,"props":2132,"children":2133},{"style":198},[2134],{"type":44,"value":2077},{"type":38,"tag":169,"props":2136,"children":2137},{"style":192},[2138],{"type":44,"value":147},{"type":38,"tag":169,"props":2140,"children":2141},{"style":209},[2142],{"type":44,"value":2143},"available",{"type":38,"tag":169,"props":2145,"children":2146},{"style":192},[2147],{"type":44,"value":2091},{"type":38,"tag":169,"props":2149,"children":2150},{"style":209},[2151],{"type":44,"value":1798},{"type":38,"tag":169,"props":2153,"children":2154},{"style":192},[2155],{"type":44,"value":147},{"type":38,"tag":169,"props":2157,"children":2158},{"style":209},[2159],{"type":44,"value":2160},"pointsAvailable",{"type":38,"tag":169,"props":2162,"children":2163},{"style":192},[2164],{"type":44,"value":2109},{"type":38,"tag":169,"props":2166,"children":2167},{"style":776},[2168],{"type":44,"value":2114},{"type":38,"tag":169,"props":2170,"children":2172},{"class":171,"line":2171},21,[2173,2177,2181,2185,2189,2193,2198,2202],{"type":38,"tag":169,"props":2174,"children":2175},{"style":209},[2176],{"type":44,"value":1982},{"type":38,"tag":169,"props":2178,"children":2179},{"style":198},[2180],{"type":44,"value":1920},{"type":38,"tag":169,"props":2182,"children":2183},{"style":209},[2184],{"type":44,"value":1960},{"type":38,"tag":169,"props":2186,"children":2187},{"style":198},[2188],{"type":44,"value":2077},{"type":38,"tag":169,"props":2190,"children":2191},{"style":192},[2192],{"type":44,"value":147},{"type":38,"tag":169,"props":2194,"children":2195},{"style":209},[2196],{"type":44,"value":2197},"count",{"type":38,"tag":169,"props":2199,"children":2200},{"style":192},[2201],{"type":44,"value":2091},{"type":38,"tag":169,"props":2203,"children":2204},{"style":776},[2205],{"type":44,"value":2206}," 1\n",{"type":38,"tag":169,"props":2208,"children":2210},{"class":171,"line":2209},22,[2211,2216],{"type":38,"tag":169,"props":2212,"children":2213},{"style":186},[2214],{"type":44,"value":2215},"        return",{"type":38,"tag":169,"props":2217,"children":2218},{"style":209},[2219],{"type":44,"value":1973},{"type":38,"tag":169,"props":2221,"children":2223},{"class":171,"line":2222},23,[2224,2229,2234],{"type":38,"tag":169,"props":2225,"children":2226},{"style":192},[2227],{"type":44,"value":2228},"    },",{"type":38,"tag":169,"props":2230,"children":2231},{"style":192},[2232],{"type":44,"value":2233}," {}",{"type":38,"tag":169,"props":2235,"children":2236},{"style":198},[2237],{"type":44,"value":1067},{"type":38,"tag":169,"props":2239,"children":2241},{"class":171,"line":2240},24,[2242],{"type":38,"tag":169,"props":2243,"children":2244},{"emptyLinePlaceholder":271},[2245],{"type":44,"value":274},{"type":38,"tag":169,"props":2247,"children":2249},{"class":171,"line":2248},25,[2250,2254,2259,2263,2267,2271,2275],{"type":38,"tag":169,"props":2251,"children":2252},{"style":342},[2253],{"type":44,"value":951},{"type":38,"tag":169,"props":2255,"children":2256},{"style":209},[2257],{"type":44,"value":2258}," averages",{"type":38,"tag":169,"props":2260,"children":2261},{"style":192},[2262],{"type":44,"value":960},{"type":38,"tag":169,"props":2264,"children":2265},{"style":209},[2266],{"type":44,"value":1611},{"type":38,"tag":169,"props":2268,"children":2269},{"style":192},[2270],{"type":44,"value":147},{"type":38,"tag":169,"props":2272,"children":2273},{"style":219},[2274],{"type":44,"value":1620},{"type":38,"tag":169,"props":2276,"children":2277},{"style":198},[2278],{"type":44,"value":1625},{"type":38,"tag":169,"props":2280,"children":2282},{"class":171,"line":2281},26,[2283,2288,2292,2297,2301,2306,2310,2314,2318,2322,2327,2332,2336,2341,2346,2350],{"type":38,"tag":169,"props":2284,"children":2285},{"style":209},[2286],{"type":44,"value":2287},"        Object",{"type":38,"tag":169,"props":2289,"children":2290},{"style":192},[2291],{"type":44,"value":147},{"type":38,"tag":169,"props":2293,"children":2294},{"style":219},[2295],{"type":44,"value":2296},"entries",{"type":38,"tag":169,"props":2298,"children":2299},{"style":198},[2300],{"type":44,"value":427},{"type":38,"tag":169,"props":2302,"children":2303},{"style":209},[2304],{"type":44,"value":2305},"stats",{"type":38,"tag":169,"props":2307,"children":2308},{"style":198},[2309],{"type":44,"value":587},{"type":38,"tag":169,"props":2311,"children":2312},{"style":192},[2313],{"type":44,"value":147},{"type":38,"tag":169,"props":2315,"children":2316},{"style":219},[2317],{"type":44,"value":422},{"type":38,"tag":169,"props":2319,"children":2320},{"style":198},[2321],{"type":44,"value":427},{"type":38,"tag":169,"props":2323,"children":2324},{"style":192},[2325],{"type":44,"value":2326},"([",{"type":38,"tag":169,"props":2328,"children":2329},{"style":430},[2330],{"type":44,"value":2331},"category",{"type":38,"tag":169,"props":2333,"children":2334},{"style":192},[2335],{"type":44,"value":784},{"type":38,"tag":169,"props":2337,"children":2338},{"style":430},[2339],{"type":44,"value":2340}," stat",{"type":38,"tag":169,"props":2342,"children":2343},{"style":192},[2344],{"type":44,"value":2345},"])",{"type":38,"tag":169,"props":2347,"children":2348},{"style":342},[2349],{"type":44,"value":438},{"type":38,"tag":169,"props":2351,"children":2352},{"style":198},[2353],{"type":44,"value":2354}," [\n",{"type":38,"tag":169,"props":2356,"children":2358},{"class":171,"line":2357},27,[2359,2364],{"type":38,"tag":169,"props":2360,"children":2361},{"style":209},[2362],{"type":44,"value":2363},"            category",{"type":38,"tag":169,"props":2365,"children":2366},{"style":192},[2367],{"type":44,"value":2368},",\n",{"type":38,"tag":169,"props":2370,"children":2372},{"class":171,"line":2371},28,[2373,2378,2383,2387,2391,2395,2399,2404,2408,2413,2417,2421,2425,2430,2434,2438,2442,2447,2451,2455,2460,2464,2468,2472,2476],{"type":38,"tag":169,"props":2374,"children":2375},{"style":192},[2376],{"type":44,"value":2377},"            {",{"type":38,"tag":169,"props":2379,"children":2380},{"style":198},[2381],{"type":44,"value":2382}," avg",{"type":38,"tag":169,"props":2384,"children":2385},{"style":192},[2386],{"type":44,"value":206},{"type":38,"tag":169,"props":2388,"children":2389},{"style":209},[2390],{"type":44,"value":2340},{"type":38,"tag":169,"props":2392,"children":2393},{"style":192},[2394],{"type":44,"value":147},{"type":38,"tag":169,"props":2396,"children":2397},{"style":209},[2398],{"type":44,"value":2143},{"type":38,"tag":169,"props":2400,"children":2401},{"style":192},[2402],{"type":44,"value":2403}," >",{"type":38,"tag":169,"props":2405,"children":2406},{"style":776},[2407],{"type":44,"value":1062},{"type":38,"tag":169,"props":2409,"children":2410},{"style":192},[2411],{"type":44,"value":2412}," ?",{"type":38,"tag":169,"props":2414,"children":2415},{"style":209},[2416],{"type":44,"value":2340},{"type":38,"tag":169,"props":2418,"children":2419},{"style":192},[2420],{"type":44,"value":147},{"type":38,"tag":169,"props":2422,"children":2423},{"style":209},[2424],{"type":44,"value":2086},{"type":38,"tag":169,"props":2426,"children":2427},{"style":192},[2428],{"type":44,"value":2429}," \u002F",{"type":38,"tag":169,"props":2431,"children":2432},{"style":209},[2433],{"type":44,"value":2340},{"type":38,"tag":169,"props":2435,"children":2436},{"style":192},[2437],{"type":44,"value":147},{"type":38,"tag":169,"props":2439,"children":2440},{"style":209},[2441],{"type":44,"value":2143},{"type":38,"tag":169,"props":2443,"children":2444},{"style":192},[2445],{"type":44,"value":2446}," :",{"type":38,"tag":169,"props":2448,"children":2449},{"style":776},[2450],{"type":44,"value":1062},{"type":38,"tag":169,"props":2452,"children":2453},{"style":192},[2454],{"type":44,"value":784},{"type":38,"tag":169,"props":2456,"children":2457},{"style":198},[2458],{"type":44,"value":2459}," n",{"type":38,"tag":169,"props":2461,"children":2462},{"style":192},[2463],{"type":44,"value":206},{"type":38,"tag":169,"props":2465,"children":2466},{"style":209},[2467],{"type":44,"value":2340},{"type":38,"tag":169,"props":2469,"children":2470},{"style":192},[2471],{"type":44,"value":147},{"type":38,"tag":169,"props":2473,"children":2474},{"style":209},[2475],{"type":44,"value":2197},{"type":38,"tag":169,"props":2477,"children":2478},{"style":192},[2479],{"type":44,"value":2056},{"type":38,"tag":169,"props":2481,"children":2483},{"class":171,"line":2482},29,[2484],{"type":38,"tag":169,"props":2485,"children":2486},{"style":198},[2487],{"type":44,"value":2488},"        ])\n",{"type":38,"tag":169,"props":2490,"children":2491},{"class":171,"line":26},[2492],{"type":38,"tag":169,"props":2493,"children":2494},{"style":198},[2495],{"type":44,"value":2496},"    )\n",{"type":38,"tag":169,"props":2498,"children":2500},{"class":171,"line":2499},31,[2501],{"type":38,"tag":169,"props":2502,"children":2503},{"emptyLinePlaceholder":271},[2504],{"type":44,"value":274},{"type":38,"tag":169,"props":2506,"children":2508},{"class":171,"line":2507},32,[2509,2513,2517,2522,2526,2530,2534,2538,2542,2547,2551,2555,2559,2564,2568,2573,2578],{"type":38,"tag":169,"props":2510,"children":2511},{"style":186},[2512],{"type":44,"value":1105},{"type":38,"tag":169,"props":2514,"children":2515},{"style":192},[2516],{"type":44,"value":195},{"type":38,"tag":169,"props":2518,"children":2519},{"style":198},[2520],{"type":44,"value":2521}," modelId",{"type":38,"tag":169,"props":2523,"children":2524},{"style":192},[2525],{"type":44,"value":206},{"type":38,"tag":169,"props":2527,"children":2528},{"style":209},[2529],{"type":44,"value":1817},{"type":38,"tag":169,"props":2531,"children":2532},{"style":192},[2533],{"type":44,"value":147},{"type":38,"tag":169,"props":2535,"children":2536},{"style":209},[2537],{"type":44,"value":1826},{"type":38,"tag":169,"props":2539,"children":2540},{"style":192},[2541],{"type":44,"value":784},{"type":38,"tag":169,"props":2543,"children":2544},{"style":198},[2545],{"type":44,"value":2546}," modelName",{"type":38,"tag":169,"props":2548,"children":2549},{"style":192},[2550],{"type":44,"value":206},{"type":38,"tag":169,"props":2552,"children":2553},{"style":209},[2554],{"type":44,"value":1817},{"type":38,"tag":169,"props":2556,"children":2557},{"style":192},[2558],{"type":44,"value":147},{"type":38,"tag":169,"props":2560,"children":2561},{"style":209},[2562],{"type":44,"value":2563},"modelName",{"type":38,"tag":169,"props":2565,"children":2566},{"style":192},[2567],{"type":44,"value":784},{"type":38,"tag":169,"props":2569,"children":2570},{"style":192},[2571],{"type":44,"value":2572}," ...",{"type":38,"tag":169,"props":2574,"children":2575},{"style":209},[2576],{"type":44,"value":2577},"averages",{"type":38,"tag":169,"props":2579,"children":2580},{"style":192},[2581],{"type":44,"value":2056},{"type":38,"tag":169,"props":2583,"children":2585},{"class":171,"line":2584},33,[2586,2590],{"type":38,"tag":169,"props":2587,"children":2588},{"style":192},[2589],{"type":44,"value":1171},{"type":38,"tag":169,"props":2591,"children":2592},{"style":209},[2593],{"type":44,"value":1067},{"type":38,"tag":169,"props":2595,"children":2597},{"class":171,"line":2596},34,[2598],{"type":38,"tag":169,"props":2599,"children":2600},{"emptyLinePlaceholder":271},[2601],{"type":44,"value":274},{"type":38,"tag":169,"props":2603,"children":2605},{"class":171,"line":2604},35,[2606,2610,2615,2619,2623,2627,2631,2635,2639,2644,2649,2653],{"type":38,"tag":169,"props":2607,"children":2608},{"style":186},[2609],{"type":44,"value":189},{"type":38,"tag":169,"props":2611,"children":2612},{"style":209},[2613],{"type":44,"value":2614}," result",{"type":38,"tag":169,"props":2616,"children":2617},{"style":192},[2618],{"type":44,"value":147},{"type":38,"tag":169,"props":2620,"children":2621},{"style":219},[2622],{"type":44,"value":422},{"type":38,"tag":169,"props":2624,"children":2625},{"style":209},[2626],{"type":44,"value":427},{"type":38,"tag":169,"props":2628,"children":2629},{"style":430},[2630],{"type":44,"value":236},{"type":38,"tag":169,"props":2632,"children":2633},{"style":342},[2634],{"type":44,"value":438},{"type":38,"tag":169,"props":2636,"children":2637},{"style":209},[2638],{"type":44,"value":930},{"type":38,"tag":169,"props":2640,"children":2641},{"style":192},[2642],{"type":44,"value":2643},"{",{"type":38,"tag":169,"props":2645,"children":2646},{"style":209},[2647],{"type":44,"value":2648}," json ",{"type":38,"tag":169,"props":2650,"children":2651},{"style":192},[2652],{"type":44,"value":1171},{"type":38,"tag":169,"props":2654,"children":2655},{"style":209},[2656],{"type":44,"value":2657},"))\n",{"type":38,"tag":47,"props":2659,"children":2660},{},[2661,2663,2669],{"type":44,"value":2662},"Technically expressions can reach across items via ",{"type":38,"tag":76,"props":2664,"children":2666},{"className":2665},[],[2667],{"type":44,"value":2668},"$('Node Name').all()",{"type":44,"value":2670}," and reduce inline, but for anything with this much shape (joins, group-bys, nested aggregation) the result is a one-line megaexpression that's hard to read and impossible to debug. Use Code.",{"type":38,"tag":1213,"props":2672,"children":2674},{"id":2673},"external-libraries",[2675],{"type":44,"value":2676},"External libraries",{"type":38,"tag":47,"props":2678,"children":2679},{},[2680,2682,2688],{"type":44,"value":2681},"JS Code can ",{"type":38,"tag":76,"props":2683,"children":2685},{"className":2684},[],[2686],{"type":44,"value":2687},"require",{"type":44,"value":2689}," from a curated allowlist (lodash, etc.), but expressions can't.",{"type":38,"tag":47,"props":2691,"children":2692},{},[2693,2698],{"type":38,"tag":68,"props":2694,"children":2695},{},[2696],{"type":44,"value":2697},"Always check for a native node first.",{"type":44,"value":2699}," n8n has more native nodes than people realize. Dropping into Code for something with a native node is a recurring mistake. The next two subsections cover the specific traps.",{"type":38,"tag":1213,"props":2701,"children":2703},{"id":2702},"cryptographic-operations-use-the-crypto-node-not-code",[2704],{"type":44,"value":2705},"Cryptographic operations: use the Crypto node, not Code",{"type":38,"tag":47,"props":2707,"children":2708},{},[2709,2711,2723],{"type":44,"value":2710},"HMAC, signing, hashing, encryption: ",{"type":38,"tag":68,"props":2712,"children":2713},{},[2714,2716,2722],{"type":44,"value":2715},"n8n has a native Crypto node (",{"type":38,"tag":76,"props":2717,"children":2719},{"className":2718},[],[2720],{"type":44,"value":2721},"n8n-nodes-base.crypto",{"type":44,"value":116},{"type":44,"value":2724}," Use it. It handles SHA256, MD5, HMAC, encrypt\u002Fdecrypt, and random generation, all without writing JavaScript.",{"type":38,"tag":124,"props":2726,"children":2728},{"className":161,"code":2727,"language":163,"meta":132,"style":132},"\u002F\u002F WRONG (recurring AI slip):\nconst crypto = require('crypto')\nconst hash = crypto.createHash('sha256').update(buf).digest('hex').slice(0, 12)\n\n\u002F\u002F RIGHT: configure the Crypto node with operation: 'hash', type: 'SHA256'\n\u002F\u002F   then read $('Hash').item.json.\u003Coutput> downstream.\n",[2729],{"type":38,"tag":76,"props":2730,"children":2731},{"__ignoreMap":132},[2732,2740,2781,2905,2912,2920],{"type":38,"tag":169,"props":2733,"children":2734},{"class":171,"line":172},[2735],{"type":38,"tag":169,"props":2736,"children":2737},{"style":176},[2738],{"type":44,"value":2739},"\u002F\u002F WRONG (recurring AI slip):\n",{"type":38,"tag":169,"props":2741,"children":2742},{"class":171,"line":182},[2743,2747,2752,2756,2761,2765,2769,2773,2777],{"type":38,"tag":169,"props":2744,"children":2745},{"style":342},[2746],{"type":44,"value":345},{"type":38,"tag":169,"props":2748,"children":2749},{"style":209},[2750],{"type":44,"value":2751}," crypto ",{"type":38,"tag":169,"props":2753,"children":2754},{"style":192},[2755],{"type":44,"value":355},{"type":38,"tag":169,"props":2757,"children":2758},{"style":219},[2759],{"type":44,"value":2760}," require",{"type":38,"tag":169,"props":2762,"children":2763},{"style":209},[2764],{"type":44,"value":427},{"type":38,"tag":169,"props":2766,"children":2767},{"style":192},[2768],{"type":44,"value":496},{"type":38,"tag":169,"props":2770,"children":2771},{"style":499},[2772],{"type":44,"value":107},{"type":38,"tag":169,"props":2774,"children":2775},{"style":192},[2776],{"type":44,"value":496},{"type":38,"tag":169,"props":2778,"children":2779},{"style":209},[2780],{"type":44,"value":1067},{"type":38,"tag":169,"props":2782,"children":2783},{"class":171,"line":267},[2784,2788,2793,2797,2802,2806,2811,2815,2819,2824,2828,2832,2836,2841,2846,2850,2855,2859,2863,2868,2872,2876,2880,2884,2888,2892,2896,2901],{"type":38,"tag":169,"props":2785,"children":2786},{"style":342},[2787],{"type":44,"value":345},{"type":38,"tag":169,"props":2789,"children":2790},{"style":209},[2791],{"type":44,"value":2792}," hash ",{"type":38,"tag":169,"props":2794,"children":2795},{"style":192},[2796],{"type":44,"value":355},{"type":38,"tag":169,"props":2798,"children":2799},{"style":209},[2800],{"type":44,"value":2801}," crypto",{"type":38,"tag":169,"props":2803,"children":2804},{"style":192},[2805],{"type":44,"value":147},{"type":38,"tag":169,"props":2807,"children":2808},{"style":219},[2809],{"type":44,"value":2810},"createHash",{"type":38,"tag":169,"props":2812,"children":2813},{"style":209},[2814],{"type":44,"value":427},{"type":38,"tag":169,"props":2816,"children":2817},{"style":192},[2818],{"type":44,"value":496},{"type":38,"tag":169,"props":2820,"children":2821},{"style":499},[2822],{"type":44,"value":2823},"sha256",{"type":38,"tag":169,"props":2825,"children":2826},{"style":192},[2827],{"type":44,"value":496},{"type":38,"tag":169,"props":2829,"children":2830},{"style":209},[2831],{"type":44,"value":587},{"type":38,"tag":169,"props":2833,"children":2834},{"style":192},[2835],{"type":44,"value":147},{"type":38,"tag":169,"props":2837,"children":2838},{"style":219},[2839],{"type":44,"value":2840},"update",{"type":38,"tag":169,"props":2842,"children":2843},{"style":209},[2844],{"type":44,"value":2845},"(buf)",{"type":38,"tag":169,"props":2847,"children":2848},{"style":192},[2849],{"type":44,"value":147},{"type":38,"tag":169,"props":2851,"children":2852},{"style":219},[2853],{"type":44,"value":2854},"digest",{"type":38,"tag":169,"props":2856,"children":2857},{"style":209},[2858],{"type":44,"value":427},{"type":38,"tag":169,"props":2860,"children":2861},{"style":192},[2862],{"type":44,"value":496},{"type":38,"tag":169,"props":2864,"children":2865},{"style":499},[2866],{"type":44,"value":2867},"hex",{"type":38,"tag":169,"props":2869,"children":2870},{"style":192},[2871],{"type":44,"value":496},{"type":38,"tag":169,"props":2873,"children":2874},{"style":209},[2875],{"type":44,"value":587},{"type":38,"tag":169,"props":2877,"children":2878},{"style":192},[2879],{"type":44,"value":147},{"type":38,"tag":169,"props":2881,"children":2882},{"style":219},[2883],{"type":44,"value":769},{"type":38,"tag":169,"props":2885,"children":2886},{"style":209},[2887],{"type":44,"value":427},{"type":38,"tag":169,"props":2889,"children":2890},{"style":776},[2891],{"type":44,"value":779},{"type":38,"tag":169,"props":2893,"children":2894},{"style":192},[2895],{"type":44,"value":784},{"type":38,"tag":169,"props":2897,"children":2898},{"style":776},[2899],{"type":44,"value":2900}," 12",{"type":38,"tag":169,"props":2902,"children":2903},{"style":209},[2904],{"type":44,"value":1067},{"type":38,"tag":169,"props":2906,"children":2907},{"class":171,"line":277},[2908],{"type":38,"tag":169,"props":2909,"children":2910},{"emptyLinePlaceholder":271},[2911],{"type":44,"value":274},{"type":38,"tag":169,"props":2913,"children":2914},{"class":171,"line":286},[2915],{"type":38,"tag":169,"props":2916,"children":2917},{"style":176},[2918],{"type":44,"value":2919},"\u002F\u002F RIGHT: configure the Crypto node with operation: 'hash', type: 'SHA256'\n",{"type":38,"tag":169,"props":2921,"children":2922},{"class":171,"line":532},[2923],{"type":38,"tag":169,"props":2924,"children":2925},{"style":176},[2926],{"type":44,"value":2927},"\u002F\u002F   then read $('Hash').item.json.\u003Coutput> downstream.\n",{"type":38,"tag":47,"props":2929,"children":2930},{},[2931,2933,2939],{"type":44,"value":2932},"The Code-with-",{"type":38,"tag":76,"props":2934,"children":2936},{"className":2935},[],[2937],{"type":44,"value":2938},"require('crypto')",{"type":44,"value":2940}," pattern is one of the most common false positives for \"this needs a Code node.\" It doesn't. The Crypto node covers it.",{"type":38,"tag":2942,"props":2943,"children":2945},"h4",{"id":2944},"hashing-binary-not-strings",[2946],{"type":44,"value":2947},"Hashing binary, not strings",{"type":38,"tag":47,"props":2949,"children":2950},{},[2951,2953,2959,2961,2967,2969,2975],{"type":44,"value":2952},"Don't reach for Code just because you need to hash ",{"type":38,"tag":2954,"props":2955,"children":2956},"em",{},[2957],{"type":44,"value":2958},"binary",{"type":44,"value":2960}," (a PDF, an image, a file buffer). The Crypto node has a ",{"type":38,"tag":76,"props":2962,"children":2964},{"className":2963},[],[2965],{"type":44,"value":2966},"binaryPropertyName",{"type":44,"value":2968}," parameter. Point it at the binary slot key and it hashes the buffer directly. You don't need ",{"type":38,"tag":76,"props":2970,"children":2972},{"className":2971},[],[2973],{"type":44,"value":2974},"this.helpers.getBinaryDataBuffer(...)",{"type":44,"value":2976}," in user code.",{"type":38,"tag":124,"props":2978,"children":2980},{"className":161,"code":2979,"language":163,"meta":132,"style":132},"\u002F\u002F WRONG (recurring AI slip with binary):\nconst crypto = require('crypto')\nconst buf = await this.helpers.getBinaryDataBuffer($itemIndex, 'data')\nconst hash = crypto.createHash('sha256').update(buf).digest('hex')\n\n\u002F\u002F RIGHT: Crypto node configured to hash binaryPropertyName='data', SHA256.\n\u002F\u002F   Then $('Crypto').item.json.\u003Coutput> has the hash; chain a Set node for any field shaping.\n",[2981],{"type":38,"tag":76,"props":2982,"children":2983},{"__ignoreMap":132},[2984,2992,3031,3098,3185,3192,3200],{"type":38,"tag":169,"props":2985,"children":2986},{"class":171,"line":172},[2987],{"type":38,"tag":169,"props":2988,"children":2989},{"style":176},[2990],{"type":44,"value":2991},"\u002F\u002F WRONG (recurring AI slip with binary):\n",{"type":38,"tag":169,"props":2993,"children":2994},{"class":171,"line":182},[2995,2999,3003,3007,3011,3015,3019,3023,3027],{"type":38,"tag":169,"props":2996,"children":2997},{"style":342},[2998],{"type":44,"value":345},{"type":38,"tag":169,"props":3000,"children":3001},{"style":209},[3002],{"type":44,"value":2751},{"type":38,"tag":169,"props":3004,"children":3005},{"style":192},[3006],{"type":44,"value":355},{"type":38,"tag":169,"props":3008,"children":3009},{"style":219},[3010],{"type":44,"value":2760},{"type":38,"tag":169,"props":3012,"children":3013},{"style":209},[3014],{"type":44,"value":427},{"type":38,"tag":169,"props":3016,"children":3017},{"style":192},[3018],{"type":44,"value":496},{"type":38,"tag":169,"props":3020,"children":3021},{"style":499},[3022],{"type":44,"value":107},{"type":38,"tag":169,"props":3024,"children":3025},{"style":192},[3026],{"type":44,"value":496},{"type":38,"tag":169,"props":3028,"children":3029},{"style":209},[3030],{"type":44,"value":1067},{"type":38,"tag":169,"props":3032,"children":3033},{"class":171,"line":267},[3034,3038,3043,3047,3052,3057,3062,3066,3071,3076,3080,3085,3090,3094],{"type":38,"tag":169,"props":3035,"children":3036},{"style":342},[3037],{"type":44,"value":345},{"type":38,"tag":169,"props":3039,"children":3040},{"style":209},[3041],{"type":44,"value":3042}," buf ",{"type":38,"tag":169,"props":3044,"children":3045},{"style":192},[3046],{"type":44,"value":355},{"type":38,"tag":169,"props":3048,"children":3049},{"style":186},[3050],{"type":44,"value":3051}," await",{"type":38,"tag":169,"props":3053,"children":3054},{"style":192},[3055],{"type":44,"value":3056}," this.",{"type":38,"tag":169,"props":3058,"children":3059},{"style":209},[3060],{"type":44,"value":3061},"helpers",{"type":38,"tag":169,"props":3063,"children":3064},{"style":192},[3065],{"type":44,"value":147},{"type":38,"tag":169,"props":3067,"children":3068},{"style":219},[3069],{"type":44,"value":3070},"getBinaryDataBuffer",{"type":38,"tag":169,"props":3072,"children":3073},{"style":209},[3074],{"type":44,"value":3075},"($itemIndex",{"type":38,"tag":169,"props":3077,"children":3078},{"style":192},[3079],{"type":44,"value":784},{"type":38,"tag":169,"props":3081,"children":3082},{"style":192},[3083],{"type":44,"value":3084}," '",{"type":38,"tag":169,"props":3086,"children":3087},{"style":499},[3088],{"type":44,"value":3089},"data",{"type":38,"tag":169,"props":3091,"children":3092},{"style":192},[3093],{"type":44,"value":496},{"type":38,"tag":169,"props":3095,"children":3096},{"style":209},[3097],{"type":44,"value":1067},{"type":38,"tag":169,"props":3099,"children":3100},{"class":171,"line":277},[3101,3105,3109,3113,3117,3121,3125,3129,3133,3137,3141,3145,3149,3153,3157,3161,3165,3169,3173,3177,3181],{"type":38,"tag":169,"props":3102,"children":3103},{"style":342},[3104],{"type":44,"value":345},{"type":38,"tag":169,"props":3106,"children":3107},{"style":209},[3108],{"type":44,"value":2792},{"type":38,"tag":169,"props":3110,"children":3111},{"style":192},[3112],{"type":44,"value":355},{"type":38,"tag":169,"props":3114,"children":3115},{"style":209},[3116],{"type":44,"value":2801},{"type":38,"tag":169,"props":3118,"children":3119},{"style":192},[3120],{"type":44,"value":147},{"type":38,"tag":169,"props":3122,"children":3123},{"style":219},[3124],{"type":44,"value":2810},{"type":38,"tag":169,"props":3126,"children":3127},{"style":209},[3128],{"type":44,"value":427},{"type":38,"tag":169,"props":3130,"children":3131},{"style":192},[3132],{"type":44,"value":496},{"type":38,"tag":169,"props":3134,"children":3135},{"style":499},[3136],{"type":44,"value":2823},{"type":38,"tag":169,"props":3138,"children":3139},{"style":192},[3140],{"type":44,"value":496},{"type":38,"tag":169,"props":3142,"children":3143},{"style":209},[3144],{"type":44,"value":587},{"type":38,"tag":169,"props":3146,"children":3147},{"style":192},[3148],{"type":44,"value":147},{"type":38,"tag":169,"props":3150,"children":3151},{"style":219},[3152],{"type":44,"value":2840},{"type":38,"tag":169,"props":3154,"children":3155},{"style":209},[3156],{"type":44,"value":2845},{"type":38,"tag":169,"props":3158,"children":3159},{"style":192},[3160],{"type":44,"value":147},{"type":38,"tag":169,"props":3162,"children":3163},{"style":219},[3164],{"type":44,"value":2854},{"type":38,"tag":169,"props":3166,"children":3167},{"style":209},[3168],{"type":44,"value":427},{"type":38,"tag":169,"props":3170,"children":3171},{"style":192},[3172],{"type":44,"value":496},{"type":38,"tag":169,"props":3174,"children":3175},{"style":499},[3176],{"type":44,"value":2867},{"type":38,"tag":169,"props":3178,"children":3179},{"style":192},[3180],{"type":44,"value":496},{"type":38,"tag":169,"props":3182,"children":3183},{"style":209},[3184],{"type":44,"value":1067},{"type":38,"tag":169,"props":3186,"children":3187},{"class":171,"line":286},[3188],{"type":38,"tag":169,"props":3189,"children":3190},{"emptyLinePlaceholder":271},[3191],{"type":44,"value":274},{"type":38,"tag":169,"props":3193,"children":3194},{"class":171,"line":532},[3195],{"type":38,"tag":169,"props":3196,"children":3197},{"style":176},[3198],{"type":44,"value":3199},"\u002F\u002F RIGHT: Crypto node configured to hash binaryPropertyName='data', SHA256.\n",{"type":38,"tag":169,"props":3201,"children":3202},{"class":171,"line":1165},[3203],{"type":38,"tag":169,"props":3204,"children":3205},{"style":176},[3206],{"type":44,"value":3207},"\u002F\u002F   Then $('Crypto').item.json.\u003Coutput> has the hash; chain a Set node for any field shaping.\n",{"type":38,"tag":47,"props":3209,"children":3210},{},[3211,3213,3219],{"type":44,"value":3212},"The remaining valid Code-for-crypto case: a non-standard signing scheme that the Crypto node doesn't expose (e.g., a custom AWS-style signature), AND ",{"type":38,"tag":76,"props":3214,"children":3216},{"className":3215},[],[3217],{"type":44,"value":3218},"httpCustomAuth",{"type":44,"value":3220}," credential doesn't fit either. Rare. Justify explicitly.",{"type":38,"tag":1213,"props":3222,"children":3224},{"id":3223},"xml-soap-rss-parsing-use-the-xml-node-not-code",[3225],{"type":44,"value":3226},"XML \u002F SOAP \u002F RSS parsing: use the XML node, not Code",{"type":38,"tag":47,"props":3228,"children":3229},{},[3230,3242,3244,3250,3252,3258],{"type":38,"tag":68,"props":3231,"children":3232},{},[3233,3235,3241],{"type":44,"value":3234},"n8n has a native XML node (",{"type":38,"tag":76,"props":3236,"children":3238},{"className":3237},[],[3239],{"type":44,"value":3240},"n8n-nodes-base.xml",{"type":44,"value":587},{"type":44,"value":3243}," with parse and stringify operations. It already converts XML to JSON. Once it has, the result is plain JSON and Edit Fields with arrow function expressions handles all the field extraction, array normalization (",{"type":38,"tag":76,"props":3245,"children":3247},{"className":3246},[],[3248],{"type":44,"value":3249},"Array.isArray(...) ? ... : ...",{"type":44,"value":3251},"), and link-finding (",{"type":38,"tag":76,"props":3253,"children":3255},{"className":3254},[],[3256],{"type":44,"value":3257},".find()",{"type":44,"value":3259},") you'd reach for Code to do.",{"type":38,"tag":124,"props":3261,"children":3263},{"className":161,"code":3262,"language":163,"meta":132,"style":132},"\u002F\u002F WRONG (recurring AI slip):\n\u002F\u002F XML node already parsed → another Code node to extract a few fields:\nconst entry = $('Parse XML').item.json.feed.entry\nconst firstEntry = Array.isArray(entry) ? entry[0] : entry\nreturn { json: { title: firstEntry.title, url: firstEntry.link.find(link => link.type === 'pdf').href } }\n\n\u002F\u002F RIGHT: Edit Fields with arrow function expressions:\n\u002F\u002F   title:  ={{ (() => { const entry = $('Parse XML').item.json.feed.entry; return Array.isArray(entry) ? entry[0].title : entry.title; })() }}\n\u002F\u002F   pdfUrl: ={{ $('Parse XML').item.json.feed.entry.link.find(link => link.type === 'pdf')?.href }}\n",[3264],{"type":38,"tag":76,"props":3265,"children":3266},{"__ignoreMap":132},[3267,3274,3282,3357,3419,3566,3573,3581,3589],{"type":38,"tag":169,"props":3268,"children":3269},{"class":171,"line":172},[3270],{"type":38,"tag":169,"props":3271,"children":3272},{"style":176},[3273],{"type":44,"value":2739},{"type":38,"tag":169,"props":3275,"children":3276},{"class":171,"line":182},[3277],{"type":38,"tag":169,"props":3278,"children":3279},{"style":176},[3280],{"type":44,"value":3281},"\u002F\u002F XML node already parsed → another Code node to extract a few fields:\n",{"type":38,"tag":169,"props":3283,"children":3284},{"class":171,"line":267},[3285,3289,3294,3298,3302,3306,3310,3315,3319,3323,3327,3331,3335,3339,3343,3348,3352],{"type":38,"tag":169,"props":3286,"children":3287},{"style":342},[3288],{"type":44,"value":345},{"type":38,"tag":169,"props":3290,"children":3291},{"style":209},[3292],{"type":44,"value":3293}," entry ",{"type":38,"tag":169,"props":3295,"children":3296},{"style":192},[3297],{"type":44,"value":355},{"type":38,"tag":169,"props":3299,"children":3300},{"style":219},[3301],{"type":44,"value":1359},{"type":38,"tag":169,"props":3303,"children":3304},{"style":209},[3305],{"type":44,"value":427},{"type":38,"tag":169,"props":3307,"children":3308},{"style":192},[3309],{"type":44,"value":496},{"type":38,"tag":169,"props":3311,"children":3312},{"style":499},[3313],{"type":44,"value":3314},"Parse XML",{"type":38,"tag":169,"props":3316,"children":3317},{"style":192},[3318],{"type":44,"value":496},{"type":38,"tag":169,"props":3320,"children":3321},{"style":209},[3322],{"type":44,"value":587},{"type":38,"tag":169,"props":3324,"children":3325},{"style":192},[3326],{"type":44,"value":147},{"type":38,"tag":169,"props":3328,"children":3329},{"style":209},[3330],{"type":44,"value":433},{"type":38,"tag":169,"props":3332,"children":3333},{"style":192},[3334],{"type":44,"value":147},{"type":38,"tag":169,"props":3336,"children":3337},{"style":209},[3338],{"type":44,"value":236},{"type":38,"tag":169,"props":3340,"children":3341},{"style":192},[3342],{"type":44,"value":147},{"type":38,"tag":169,"props":3344,"children":3345},{"style":209},[3346],{"type":44,"value":3347},"feed",{"type":38,"tag":169,"props":3349,"children":3350},{"style":192},[3351],{"type":44,"value":147},{"type":38,"tag":169,"props":3353,"children":3354},{"style":209},[3355],{"type":44,"value":3356},"entry\n",{"type":38,"tag":169,"props":3358,"children":3359},{"class":171,"line":277},[3360,3364,3369,3373,3378,3382,3387,3392,3397,3402,3406,3410,3414],{"type":38,"tag":169,"props":3361,"children":3362},{"style":342},[3363],{"type":44,"value":345},{"type":38,"tag":169,"props":3365,"children":3366},{"style":209},[3367],{"type":44,"value":3368}," firstEntry ",{"type":38,"tag":169,"props":3370,"children":3371},{"style":192},[3372],{"type":44,"value":355},{"type":38,"tag":169,"props":3374,"children":3375},{"style":209},[3376],{"type":44,"value":3377}," Array",{"type":38,"tag":169,"props":3379,"children":3380},{"style":192},[3381],{"type":44,"value":147},{"type":38,"tag":169,"props":3383,"children":3384},{"style":219},[3385],{"type":44,"value":3386},"isArray",{"type":38,"tag":169,"props":3388,"children":3389},{"style":209},[3390],{"type":44,"value":3391},"(entry) ",{"type":38,"tag":169,"props":3393,"children":3394},{"style":192},[3395],{"type":44,"value":3396},"?",{"type":38,"tag":169,"props":3398,"children":3399},{"style":209},[3400],{"type":44,"value":3401}," entry[",{"type":38,"tag":169,"props":3403,"children":3404},{"style":776},[3405],{"type":44,"value":779},{"type":38,"tag":169,"props":3407,"children":3408},{"style":209},[3409],{"type":44,"value":1995},{"type":38,"tag":169,"props":3411,"children":3412},{"style":192},[3413],{"type":44,"value":206},{"type":38,"tag":169,"props":3415,"children":3416},{"style":209},[3417],{"type":44,"value":3418}," entry\n",{"type":38,"tag":169,"props":3420,"children":3421},{"class":171,"line":286},[3422,3426,3430,3435,3439,3443,3448,3452,3457,3461,3466,3470,3475,3479,3483,3487,3492,3496,3501,3505,3509,3513,3518,3522,3527,3532,3536,3541,3545,3549,3553,3558,3562],{"type":38,"tag":169,"props":3423,"children":3424},{"style":186},[3425],{"type":44,"value":189},{"type":38,"tag":169,"props":3427,"children":3428},{"style":192},[3429],{"type":44,"value":195},{"type":38,"tag":169,"props":3431,"children":3432},{"style":198},[3433],{"type":44,"value":3434}," json",{"type":38,"tag":169,"props":3436,"children":3437},{"style":192},[3438],{"type":44,"value":206},{"type":38,"tag":169,"props":3440,"children":3441},{"style":192},[3442],{"type":44,"value":195},{"type":38,"tag":169,"props":3444,"children":3445},{"style":198},[3446],{"type":44,"value":3447}," title",{"type":38,"tag":169,"props":3449,"children":3450},{"style":192},[3451],{"type":44,"value":206},{"type":38,"tag":169,"props":3453,"children":3454},{"style":209},[3455],{"type":44,"value":3456}," firstEntry",{"type":38,"tag":169,"props":3458,"children":3459},{"style":192},[3460],{"type":44,"value":147},{"type":38,"tag":169,"props":3462,"children":3463},{"style":209},[3464],{"type":44,"value":3465},"title",{"type":38,"tag":169,"props":3467,"children":3468},{"style":192},[3469],{"type":44,"value":784},{"type":38,"tag":169,"props":3471,"children":3472},{"style":198},[3473],{"type":44,"value":3474}," url",{"type":38,"tag":169,"props":3476,"children":3477},{"style":192},[3478],{"type":44,"value":206},{"type":38,"tag":169,"props":3480,"children":3481},{"style":209},[3482],{"type":44,"value":3456},{"type":38,"tag":169,"props":3484,"children":3485},{"style":192},[3486],{"type":44,"value":147},{"type":38,"tag":169,"props":3488,"children":3489},{"style":209},[3490],{"type":44,"value":3491},"link",{"type":38,"tag":169,"props":3493,"children":3494},{"style":192},[3495],{"type":44,"value":147},{"type":38,"tag":169,"props":3497,"children":3498},{"style":219},[3499],{"type":44,"value":3500},"find",{"type":38,"tag":169,"props":3502,"children":3503},{"style":209},[3504],{"type":44,"value":427},{"type":38,"tag":169,"props":3506,"children":3507},{"style":430},[3508],{"type":44,"value":3491},{"type":38,"tag":169,"props":3510,"children":3511},{"style":342},[3512],{"type":44,"value":438},{"type":38,"tag":169,"props":3514,"children":3515},{"style":209},[3516],{"type":44,"value":3517}," link",{"type":38,"tag":169,"props":3519,"children":3520},{"style":192},[3521],{"type":44,"value":147},{"type":38,"tag":169,"props":3523,"children":3524},{"style":209},[3525],{"type":44,"value":3526},"type ",{"type":38,"tag":169,"props":3528,"children":3529},{"style":192},[3530],{"type":44,"value":3531},"===",{"type":38,"tag":169,"props":3533,"children":3534},{"style":192},[3535],{"type":44,"value":3084},{"type":38,"tag":169,"props":3537,"children":3538},{"style":499},[3539],{"type":44,"value":3540},"pdf",{"type":38,"tag":169,"props":3542,"children":3543},{"style":192},[3544],{"type":44,"value":496},{"type":38,"tag":169,"props":3546,"children":3547},{"style":209},[3548],{"type":44,"value":587},{"type":38,"tag":169,"props":3550,"children":3551},{"style":192},[3552],{"type":44,"value":147},{"type":38,"tag":169,"props":3554,"children":3555},{"style":209},[3556],{"type":44,"value":3557},"href ",{"type":38,"tag":169,"props":3559,"children":3560},{"style":192},[3561],{"type":44,"value":1171},{"type":38,"tag":169,"props":3563,"children":3564},{"style":192},[3565],{"type":44,"value":2056},{"type":38,"tag":169,"props":3567,"children":3568},{"class":171,"line":532},[3569],{"type":38,"tag":169,"props":3570,"children":3571},{"emptyLinePlaceholder":271},[3572],{"type":44,"value":274},{"type":38,"tag":169,"props":3574,"children":3575},{"class":171,"line":1165},[3576],{"type":38,"tag":169,"props":3577,"children":3578},{"style":176},[3579],{"type":44,"value":3580},"\u002F\u002F RIGHT: Edit Fields with arrow function expressions:\n",{"type":38,"tag":169,"props":3582,"children":3583},{"class":171,"line":1584},[3584],{"type":38,"tag":169,"props":3585,"children":3586},{"style":176},[3587],{"type":44,"value":3588},"\u002F\u002F   title:  ={{ (() => { const entry = $('Parse XML').item.json.feed.entry; return Array.isArray(entry) ? entry[0].title : entry.title; })() }}\n",{"type":38,"tag":169,"props":3590,"children":3591},{"class":171,"line":1592},[3592],{"type":38,"tag":169,"props":3593,"children":3594},{"style":176},[3595],{"type":44,"value":3596},"\u002F\u002F   pdfUrl: ={{ $('Parse XML').item.json.feed.entry.link.find(link => link.type === 'pdf')?.href }}\n",{"type":38,"tag":47,"props":3598,"children":3599},{},[3600,3602,3607],{"type":44,"value":3601},"If the field-extraction logic is genuinely too gnarly for inline expressions even with multi-line arrow functions, the next stop is Edit Fields with a single multi-line arrow function, NOT a Code node. See ",{"type":38,"tag":76,"props":3603,"children":3605},{"className":3604},[],[3606],{"type":44,"value":1191},{"type":44,"value":147},{"type":38,"tag":1213,"props":3609,"children":3611},{"id":3610},"what-these-have-in-common",[3612],{"type":44,"value":3613},"What these have in common",{"type":38,"tag":47,"props":3615,"children":3616},{},[3617,3619,3624],{"type":44,"value":3618},"Valid cases are about ",{"type":38,"tag":68,"props":3620,"children":3621},{},[3622],{"type":44,"value":3623},"scope",{"type":44,"value":3625},": whole-dataset, multiple sources, or stateful constructs single-item tools can't reach. Invalid cases: Code doing what an expression could, OR what a native node already does.",{"type":38,"tag":47,"props":3627,"children":3628},{},[3629],{"type":44,"value":3630},"Quick tests:",{"type":38,"tag":1225,"props":3632,"children":3633},{},[3634,3644],{"type":38,"tag":64,"props":3635,"children":3636},{},[3637,3642],{"type":38,"tag":68,"props":3638,"children":3639},{},[3640],{"type":44,"value":3641},"\"Could I describe this Code node's job as 'take this one item and...'?\"",{"type":44,"value":3643}," If yes, wrong tool.",{"type":38,"tag":64,"props":3645,"children":3646},{},[3647,3652,3654,3660],{"type":38,"tag":68,"props":3648,"children":3649},{},[3650],{"type":44,"value":3651},"\"Is there a native node for this?\"",{"type":44,"value":3653}," Search via ",{"type":38,"tag":76,"props":3655,"children":3657},{"className":3656},[],[3658],{"type":44,"value":3659},"search_nodes",{"type":44,"value":3661}," first. Crypto, XML, JSON parsing, date math (Luxon), HTTP calls, file I\u002FO, regex matching: all have native nodes or expression-level support.",{"type":38,"tag":53,"props":3663,"children":3665},{"id":3664},"javascript-code-node-specifics",[3666],{"type":44,"value":3667},"JavaScript Code node specifics",{"type":38,"tag":47,"props":3669,"children":3670},{},[3671],{"type":44,"value":3672},"Two modes:",{"type":38,"tag":1225,"props":3674,"children":3675},{},[3676,3702],{"type":38,"tag":64,"props":3677,"children":3678},{},[3679,3684,3686,3692,3694,3700],{"type":38,"tag":68,"props":3680,"children":3681},{},[3682],{"type":44,"value":3683},"Run Once for All Items (default, use this):",{"type":44,"value":3685}," runs once with ",{"type":38,"tag":76,"props":3687,"children":3689},{"className":3688},[],[3690],{"type":44,"value":3691},"$input.all()",{"type":44,"value":3693},". If you need per-item logic, just ",{"type":38,"tag":76,"props":3695,"children":3697},{"className":3696},[],[3698],{"type":44,"value":3699},"for (const item of $input.all())",{"type":44,"value":3701}," inside. This is the standard shape and almost always what you want.",{"type":38,"tag":64,"props":3703,"children":3704},{},[3705,3710,3712,3718,3720,3726],{"type":38,"tag":68,"props":3706,"children":3707},{},[3708],{"type":44,"value":3709},"Run Once for Each Item:",{"type":44,"value":3711}," runs once per item with ",{"type":38,"tag":76,"props":3713,"children":3715},{"className":3714},[],[3716],{"type":44,"value":3717},"$input.first()",{"type":44,"value":3719}," (or ",{"type":38,"tag":76,"props":3721,"children":3723},{"className":3722},[],[3724],{"type":44,"value":3725},"$input.item",{"type":44,"value":116},{"type":38,"tag":47,"props":3728,"children":3729},{},[3730],{"type":44,"value":3731},"Common shape:",{"type":38,"tag":124,"props":3733,"children":3735},{"className":161,"code":3734,"language":163,"meta":132,"style":132},"\u002F\u002F Run Once for All Items\nconst items = $input.all()\nconst totals = items.map(item => ({\n  ...item.json,\n  total: item.json.qty * item.json.price,\n}))\nreturn totals.map(json => ({ json }))\n",[3736],{"type":38,"tag":76,"props":3737,"children":3738},{"__ignoreMap":132},[3739,3747,3779,3828,3852,3914,3925],{"type":38,"tag":169,"props":3740,"children":3741},{"class":171,"line":172},[3742],{"type":38,"tag":169,"props":3743,"children":3744},{"style":176},[3745],{"type":44,"value":3746},"\u002F\u002F Run Once for All Items\n",{"type":38,"tag":169,"props":3748,"children":3749},{"class":171,"line":182},[3750,3754,3758,3762,3766,3770,3774],{"type":38,"tag":169,"props":3751,"children":3752},{"style":342},[3753],{"type":44,"value":345},{"type":38,"tag":169,"props":3755,"children":3756},{"style":209},[3757],{"type":44,"value":350},{"type":38,"tag":169,"props":3759,"children":3760},{"style":192},[3761],{"type":44,"value":355},{"type":38,"tag":169,"props":3763,"children":3764},{"style":209},[3765],{"type":44,"value":212},{"type":38,"tag":169,"props":3767,"children":3768},{"style":192},[3769],{"type":44,"value":147},{"type":38,"tag":169,"props":3771,"children":3772},{"style":219},[3773],{"type":44,"value":1389},{"type":38,"tag":169,"props":3775,"children":3776},{"style":209},[3777],{"type":44,"value":3778},"()\n",{"type":38,"tag":169,"props":3780,"children":3781},{"class":171,"line":267},[3782,3786,3791,3795,3799,3803,3807,3811,3815,3819,3823],{"type":38,"tag":169,"props":3783,"children":3784},{"style":342},[3785],{"type":44,"value":345},{"type":38,"tag":169,"props":3787,"children":3788},{"style":209},[3789],{"type":44,"value":3790}," totals ",{"type":38,"tag":169,"props":3792,"children":3793},{"style":192},[3794],{"type":44,"value":355},{"type":38,"tag":169,"props":3796,"children":3797},{"style":209},[3798],{"type":44,"value":413},{"type":38,"tag":169,"props":3800,"children":3801},{"style":192},[3802],{"type":44,"value":147},{"type":38,"tag":169,"props":3804,"children":3805},{"style":219},[3806],{"type":44,"value":422},{"type":38,"tag":169,"props":3808,"children":3809},{"style":209},[3810],{"type":44,"value":427},{"type":38,"tag":169,"props":3812,"children":3813},{"style":430},[3814],{"type":44,"value":433},{"type":38,"tag":169,"props":3816,"children":3817},{"style":342},[3818],{"type":44,"value":438},{"type":38,"tag":169,"props":3820,"children":3821},{"style":209},[3822],{"type":44,"value":930},{"type":38,"tag":169,"props":3824,"children":3825},{"style":192},[3826],{"type":44,"value":3827},"{\n",{"type":38,"tag":169,"props":3829,"children":3830},{"class":171,"line":277},[3831,3836,3840,3844,3848],{"type":38,"tag":169,"props":3832,"children":3833},{"style":192},[3834],{"type":44,"value":3835},"  ...",{"type":38,"tag":169,"props":3837,"children":3838},{"style":209},[3839],{"type":44,"value":433},{"type":38,"tag":169,"props":3841,"children":3842},{"style":192},[3843],{"type":44,"value":147},{"type":38,"tag":169,"props":3845,"children":3846},{"style":209},[3847],{"type":44,"value":236},{"type":38,"tag":169,"props":3849,"children":3850},{"style":192},[3851],{"type":44,"value":2368},{"type":38,"tag":169,"props":3853,"children":3854},{"class":171,"line":286},[3855,3860,3864,3868,3872,3876,3880,3885,3890,3894,3898,3902,3906,3910],{"type":38,"tag":169,"props":3856,"children":3857},{"style":198},[3858],{"type":44,"value":3859},"  total",{"type":38,"tag":169,"props":3861,"children":3862},{"style":192},[3863],{"type":44,"value":206},{"type":38,"tag":169,"props":3865,"children":3866},{"style":209},[3867],{"type":44,"value":443},{"type":38,"tag":169,"props":3869,"children":3870},{"style":192},[3871],{"type":44,"value":147},{"type":38,"tag":169,"props":3873,"children":3874},{"style":209},[3875],{"type":44,"value":236},{"type":38,"tag":169,"props":3877,"children":3878},{"style":192},[3879],{"type":44,"value":147},{"type":38,"tag":169,"props":3881,"children":3882},{"style":209},[3883],{"type":44,"value":3884},"qty ",{"type":38,"tag":169,"props":3886,"children":3887},{"style":192},[3888],{"type":44,"value":3889},"*",{"type":38,"tag":169,"props":3891,"children":3892},{"style":209},[3893],{"type":44,"value":443},{"type":38,"tag":169,"props":3895,"children":3896},{"style":192},[3897],{"type":44,"value":147},{"type":38,"tag":169,"props":3899,"children":3900},{"style":209},[3901],{"type":44,"value":236},{"type":38,"tag":169,"props":3903,"children":3904},{"style":192},[3905],{"type":44,"value":147},{"type":38,"tag":169,"props":3907,"children":3908},{"style":209},[3909],{"type":44,"value":1053},{"type":38,"tag":169,"props":3911,"children":3912},{"style":192},[3913],{"type":44,"value":2368},{"type":38,"tag":169,"props":3915,"children":3916},{"class":171,"line":532},[3917,3921],{"type":38,"tag":169,"props":3918,"children":3919},{"style":192},[3920],{"type":44,"value":1171},{"type":38,"tag":169,"props":3922,"children":3923},{"style":209},[3924],{"type":44,"value":2657},{"type":38,"tag":169,"props":3926,"children":3927},{"class":171,"line":1165},[3928,3932,3937,3941,3945,3949,3953,3957,3961,3965,3969,3973],{"type":38,"tag":169,"props":3929,"children":3930},{"style":186},[3931],{"type":44,"value":189},{"type":38,"tag":169,"props":3933,"children":3934},{"style":209},[3935],{"type":44,"value":3936}," totals",{"type":38,"tag":169,"props":3938,"children":3939},{"style":192},[3940],{"type":44,"value":147},{"type":38,"tag":169,"props":3942,"children":3943},{"style":219},[3944],{"type":44,"value":422},{"type":38,"tag":169,"props":3946,"children":3947},{"style":209},[3948],{"type":44,"value":427},{"type":38,"tag":169,"props":3950,"children":3951},{"style":430},[3952],{"type":44,"value":236},{"type":38,"tag":169,"props":3954,"children":3955},{"style":342},[3956],{"type":44,"value":438},{"type":38,"tag":169,"props":3958,"children":3959},{"style":209},[3960],{"type":44,"value":930},{"type":38,"tag":169,"props":3962,"children":3963},{"style":192},[3964],{"type":44,"value":2643},{"type":38,"tag":169,"props":3966,"children":3967},{"style":209},[3968],{"type":44,"value":2648},{"type":38,"tag":169,"props":3970,"children":3971},{"style":192},[3972],{"type":44,"value":1171},{"type":38,"tag":169,"props":3974,"children":3975},{"style":209},[3976],{"type":44,"value":2657},{"type":38,"tag":47,"props":3978,"children":3979},{},[3980,3982,3988,3990,3996],{"type":44,"value":3981},"The return must be an array of ",{"type":38,"tag":76,"props":3983,"children":3985},{"className":3984},[],[3986],{"type":44,"value":3987},"{ json: ... }",{"type":44,"value":3989}," objects (or ",{"type":38,"tag":76,"props":3991,"children":3993},{"className":3992},[],[3994],{"type":44,"value":3995},"{ json: ..., binary: ... }",{"type":44,"value":3997},"), not raw JSON.",{"type":38,"tag":47,"props":3999,"children":4000},{},[4001,4003,4009],{"type":44,"value":4002},"For binary handling, error patterns, and Code-node-only bugs, see ",{"type":38,"tag":76,"props":4004,"children":4006},{"className":4005},[],[4007],{"type":44,"value":4008},"references\u002FJAVASCRIPT_PATTERNS.md",{"type":44,"value":147},{"type":38,"tag":53,"props":4011,"children":4013},{"id":4012},"reference-files",[4014],{"type":44,"value":4015},"Reference files",{"type":38,"tag":4017,"props":4018,"children":4019},"table",{},[4020,4039],{"type":38,"tag":4021,"props":4022,"children":4023},"thead",{},[4024],{"type":38,"tag":4025,"props":4026,"children":4027},"tr",{},[4028,4034],{"type":38,"tag":4029,"props":4030,"children":4031},"th",{},[4032],{"type":44,"value":4033},"File",{"type":38,"tag":4029,"props":4035,"children":4036},{},[4037],{"type":44,"value":4038},"Read when",{"type":38,"tag":4040,"props":4041,"children":4042},"tbody",{},[4043,4060,4076],{"type":38,"tag":4025,"props":4044,"children":4045},{},[4046,4055],{"type":38,"tag":4047,"props":4048,"children":4049},"td",{},[4050],{"type":38,"tag":76,"props":4051,"children":4053},{"className":4052},[],[4054],{"type":44,"value":145},{"type":38,"tag":4047,"props":4056,"children":4057},{},[4058],{"type":44,"value":4059},"You're tempted to use a Code node and want to verify the simpler paths really don't work",{"type":38,"tag":4025,"props":4061,"children":4062},{},[4063,4071],{"type":38,"tag":4047,"props":4064,"children":4065},{},[4066],{"type":38,"tag":76,"props":4067,"children":4069},{"className":4068},[],[4070],{"type":44,"value":1191},{"type":38,"tag":4047,"props":4072,"children":4073},{},[4074],{"type":44,"value":4075},"The transformation is multi-line but pure data shaping",{"type":38,"tag":4025,"props":4077,"children":4078},{},[4079,4087],{"type":38,"tag":4047,"props":4080,"children":4081},{},[4082],{"type":38,"tag":76,"props":4083,"children":4085},{"className":4084},[],[4086],{"type":44,"value":4008},{"type":38,"tag":4047,"props":4088,"children":4089},{},[4090],{"type":44,"value":4091},"Code node is genuinely needed and JS is the language",{"type":38,"tag":53,"props":4093,"children":4095},{"id":4094},"anti-patterns",[4096],{"type":44,"value":4097},"Anti-patterns",{"type":38,"tag":4017,"props":4099,"children":4100},{},[4101,4122],{"type":38,"tag":4021,"props":4102,"children":4103},{},[4104],{"type":38,"tag":4025,"props":4105,"children":4106},{},[4107,4112,4117],{"type":38,"tag":4029,"props":4108,"children":4109},{},[4110],{"type":44,"value":4111},"Anti-pattern",{"type":38,"tag":4029,"props":4113,"children":4114},{},[4115],{"type":44,"value":4116},"What goes wrong",{"type":38,"tag":4029,"props":4118,"children":4119},{},[4120],{"type":44,"value":4121},"Fix",{"type":38,"tag":4040,"props":4123,"children":4124},{},[4125,4149,4167,4198,4216],{"type":38,"tag":4025,"props":4126,"children":4127},{},[4128,4139,4144],{"type":38,"tag":4047,"props":4129,"children":4130},{},[4131,4133],{"type":44,"value":4132},"Code node doing ",{"type":38,"tag":76,"props":4134,"children":4136},{"className":4135},[],[4137],{"type":44,"value":4138},"return { x: $input.first().json.x.toUpperCase() }",{"type":38,"tag":4047,"props":4140,"children":4141},{},[4142],{"type":44,"value":4143},"Whole node for one expression",{"type":38,"tag":4047,"props":4145,"children":4146},{},[4147],{"type":44,"value":4148},"Replace with an Edit Fields expression",{"type":38,"tag":4025,"props":4150,"children":4151},{},[4152,4157,4162],{"type":38,"tag":4047,"props":4153,"children":4154},{},[4155],{"type":44,"value":4156},"Code node building HTML strings for an email body",{"type":38,"tag":4047,"props":4158,"children":4159},{},[4160],{"type":44,"value":4161},"The Email node's body field accepts expressions",{"type":38,"tag":4047,"props":4163,"children":4164},{},[4165],{"type":44,"value":4166},"Inline the expression into the email node",{"type":38,"tag":4025,"props":4168,"children":4169},{},[4170,4183,4188],{"type":38,"tag":4047,"props":4171,"children":4172},{},[4173,4175,4181],{"type":44,"value":4174},"Code node using ",{"type":38,"tag":76,"props":4176,"children":4178},{"className":4177},[],[4179],{"type":44,"value":4180},"new Date()",{"type":44,"value":4182}," for date formatting",{"type":38,"tag":4047,"props":4184,"children":4185},{},[4186],{"type":44,"value":4187},"Loses to Luxon's clarity",{"type":38,"tag":4047,"props":4189,"children":4190},{},[4191,4193],{"type":44,"value":4192},"Use Luxon in expression. See ",{"type":38,"tag":76,"props":4194,"children":4196},{"className":4195},[],[4197],{"type":44,"value":890},{"type":38,"tag":4025,"props":4199,"children":4200},{},[4201,4206,4211],{"type":38,"tag":4047,"props":4202,"children":4203},{},[4204],{"type":44,"value":4205},"Set node + Code node combo (Set builds inputs, Code transforms)",{"type":38,"tag":4047,"props":4207,"children":4208},{},[4209],{"type":44,"value":4210},"Two nodes for what should be one Edit Fields",{"type":38,"tag":4047,"props":4212,"children":4213},{},[4214],{"type":44,"value":4215},"Collapse into one Edit Fields with arrow function",{"type":38,"tag":4025,"props":4217,"children":4218},{},[4219,4224,4229],{"type":38,"tag":4047,"props":4220,"children":4221},{},[4222],{"type":44,"value":4223},"Pasting credentials\u002Ftokens into Code node text",{"type":38,"tag":4047,"props":4225,"children":4226},{},[4227],{"type":44,"value":4228},"Same leak as text fields",{"type":38,"tag":4047,"props":4230,"children":4231},{},[4232],{"type":44,"value":4233},"Use credentials, not Code node",{"type":38,"tag":4235,"props":4236,"children":4237},"style",{},[4238],{"type":44,"value":4239},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4241,"total":2248},[4242,4261,4278,4292,4304,4317,4330,4347,4356,4368,4378,4388],{"slug":4243,"name":4243,"fn":4244,"description":4245,"org":4246,"tags":4247,"stars":4258,"repoUrl":4259,"updatedAt":4260},"config-evals","configure workflow evaluations","Builds and maintains configuration-based evaluations on a workflow with the eval-config tool. Use when the user asks to set up, add, view, change, or remove an evaluation, score, grade, or judge a workflow's output, or measure answer quality against a test dataset. This is the only eval form Instance AI handles — it does not touch on-canvas evaluation nodes.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4248,4251,4252,4255],{"name":4249,"slug":4250,"type":15},"Evals","evals",{"name":8,"slug":8,"type":15},{"name":4253,"slug":4254,"type":15},"Testing","testing",{"name":4256,"slug":4257,"type":15},"Workflow Automation","workflow-automation",198156,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fn8n","2026-07-24T05:37:07.398695",{"slug":4262,"name":4262,"fn":4263,"description":4264,"org":4265,"tags":4266,"stars":4258,"repoUrl":4259,"updatedAt":4277},"credential-setup-with-computer-use","configure n8n credentials via browser","Guides n8n credential setup through Computer Use browser tools. Use when a user needs OAuth apps, API keys, client IDs, client secrets, or other credential values from an external service console.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4267,4270,4273,4274],{"name":4268,"slug":4269,"type":15},"Automation","automation",{"name":4271,"slug":4272,"type":15},"Configuration","configuration",{"name":8,"slug":8,"type":15},{"name":4275,"slug":4276,"type":15},"OAuth","oauth","2026-06-30T07:40:45.54",{"slug":4279,"name":4279,"fn":4280,"description":4281,"org":4282,"tags":4283,"stars":4258,"repoUrl":4259,"updatedAt":4291},"data-table-manager","manage n8n Data Tables","Load before calling data-tables or parse-file. Use for natural standalone requests like \"what data tables do I have?\", \"show\u002Flist my tables\", or \"what columns are in this table?\", and whenever the user asks to list, show, create, inspect, import, seed, query, update, clean up, rename columns in, or delete data tables and rows, especially from CSV\u002FXLSX\u002FJSON attachments. Also load before building or planning workflows that create or write to Data Tables (then load workflow-builder before build-workflow).",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4284,4287,4290],{"name":4285,"slug":4286,"type":15},"Data Engineering","data-engineering",{"name":4288,"slug":4289,"type":15},"Database","database",{"name":8,"slug":8,"type":15},"2026-07-27T06:07:14.648144",{"slug":4293,"name":4293,"fn":4294,"description":4295,"org":4296,"tags":4297,"stars":4258,"repoUrl":4259,"updatedAt":4277},"debugging-executions","debug failed n8n workflow executions","Debug failed or wrong-output workflow executions using executions tools. Load when the user reports execution failures, unexpected node output, empty parameter values after a successful run, or a node showing a red or failed expression error.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4298,4299,4302,4303],{"name":4268,"slug":4269,"type":15},{"name":4300,"slug":4301,"type":15},"Debugging","debugging",{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},{"slug":4305,"name":4305,"fn":4306,"description":4307,"org":4308,"tags":4309,"stars":4258,"repoUrl":4259,"updatedAt":4316},"intent-recognition","classify automation requests by control flow","Classifies automation requests using two decisions: anchor (which primitive owns the top-level control flow — workflow-anchored, agent-anchored, needs-clarification, or out-of-scope) and embeds_other (whether the other primitive appears embedded inside — an agent step inside a workflow, or a workflow invoked as an agent tool). Must be used before deciding the intent of any automation request, including compound requests with multiple independent automations, mid-build extensions to an existing workflow or agent, one-off questions or reports that need external systems you cannot query directly, and requests that need clarification before an anchor can be chosen, before choosing workflow-builder, planning, or an agent-oriented design.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4310,4313,4314,4315],{"name":4311,"slug":4312,"type":15},"Agents","agents",{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-30T05:30:06.772347",{"slug":4318,"name":4318,"fn":4319,"description":4320,"org":4321,"tags":4322,"stars":4258,"repoUrl":4259,"updatedAt":4329},"n8n-cli","manage n8n workflows from the CLI","Use the n8n CLI to manage workflows, credentials, executions, and more on an n8n instance. Use when the user asks to interact with n8n, automate workflows, manage credentials, or operate their instance from the command line.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4323,4324,4327,4328],{"name":4268,"slug":4269,"type":15},{"name":4325,"slug":4326,"type":15},"CLI","cli",{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-04-06T18:38:40.360123",{"slug":4331,"name":4331,"fn":4332,"description":4333,"org":4334,"tags":4335,"stars":4258,"repoUrl":4259,"updatedAt":4346},"n8n-docs-assistant","retrieve n8n documentation and guidance","Answers n8n product, setup, credential, node, hosting, API, and usage questions from current n8n docs. Load n8n-docs via load_tool before calling it (search \"n8n docs\" if not visible). Use when the user asks how to configure, set up, troubleshoot, or understand n8n behavior, especially credential setup questions opened from the credential modal.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4336,4339,4340,4343],{"name":4337,"slug":4338,"type":15},"Documentation","documentation",{"name":8,"slug":8,"type":15},{"name":4341,"slug":4342,"type":15},"Reference","reference",{"name":4344,"slug":4345,"type":15},"Search","search","2026-07-27T06:07:15.692906",{"slug":4348,"name":4348,"fn":4349,"description":4350,"org":4351,"tags":4352,"stars":4258,"repoUrl":4259,"updatedAt":4277},"planned-task-runtime","manage n8n task runtimes","Handles system follow-up turns: planned-task-follow-up (synthesize, replan, build-workflow, checkpoint), background-task-completed, running-tasks context, and create-tasks silence rules. Load whenever any of these tags appear or after calling create-tasks.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4353,4354,4355],{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},{"slug":4357,"name":4357,"fn":4358,"description":4359,"org":4360,"tags":4361,"stars":4258,"repoUrl":4259,"updatedAt":4367},"planning","coordinate multi-artifact workflows","ONLY for coordinated multi-artifact work: multiple workflows with dependencies, shared data-table schema\u002Fmigration across tasks, or the user explicitly asked to review a plan first. Load create-tasks via load_tool before calling it (search \"create tasks\" if not visible). Do NOT use for new one-off workflows, single-workflow edits, verification-only requests, or standalone data-table ops — use workflow-builder or data-table-manager instead.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4362,4363,4364,4366],{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4365,"slug":4357,"type":15},"Planning",{"name":4256,"slug":4257,"type":15},"2026-07-27T06:07:16.673218",{"slug":4369,"name":4369,"fn":4370,"description":4371,"org":4372,"tags":4373,"stars":4258,"repoUrl":4259,"updatedAt":4377},"post-build-flow","verify and set up n8n workflows","Handles workflow verification and setup after build-workflow succeeds, or when the message contains workflow-verification-follow-up or workflow-setup-required. Load after direct builds, when verificationReadiness requires action, or on orchestrator verify\u002Fsetup follow-up turns.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4374,4375,4376],{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-24T05:37:08.421329",{"slug":4379,"name":4379,"fn":4380,"description":4381,"org":4382,"tags":4383,"stars":4258,"repoUrl":4259,"updatedAt":4387},"workflow-builder","build and edit n8n workflows","Load before calling build-workflow. Default path for all single-workflow work: new one-off workflows, existing-workflow edits, verification repairs, and workflow-local data tables. Write or edit a workspace source file, then call build-workflow with filePath. When the workflow creates or writes Data Tables, load data-table-manager first, then this skill. Do not load planning or create-tasks first. Load planning only when multiple coordinated workflows or shared cross-task data tables require a dependency-aware task graph.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4384,4385,4386],{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-30T05:30:07.798011",{"slug":4389,"name":4389,"fn":4390,"description":4391,"org":4392,"tags":4393,"stars":22,"repoUrl":23,"updatedAt":4399},"n8n-agents-official","build AI agents in n8n","Use when building or editing any AI feature in n8n: AI Agents, Text Classifier, Information Extractor, Sentiment Analysis, Summarization Chain, Basic LLM Chain, embeddings, vector stores, single one-shot LLM calls, or AI media generation (image \u002F audio \u002F video) via the native LangChain provider nodes. Triggers on any `@n8n\u002Fn8n-nodes-langchain.*` node, \"agent\", \"chat assistant\", \"LLM with tools\", \"tool calling\", \"fromAi\", \"system prompt\", \"memory window\", \"structured output\", \"outputParser\", \"function calling\", \"RAG\", \"vector store\", \"embeddings\", \"classify with AI\", \"extract fields with LLM\", \"sentiment analysis\", \"summarize with LLM\", \"single LLM call\", chat triggers with files, AI image \u002F video \u002F audio generation, or any multi-turn or one-shot LLM behavior.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4394,4395,4398],{"name":4311,"slug":4312,"type":15},{"name":4396,"slug":4397,"type":15},"LLM","llm",{"name":4256,"slug":4257,"type":15},"2026-07-08T05:44:47.938896",{"items":4401,"total":1753},[4402,4408,4421,4427,4443,4455,4466],{"slug":4389,"name":4389,"fn":4390,"description":4391,"org":4403,"tags":4404,"stars":22,"repoUrl":23,"updatedAt":4399},{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4405,4406,4407],{"name":4311,"slug":4312,"type":15},{"name":4396,"slug":4397,"type":15},{"name":4256,"slug":4257,"type":15},{"slug":4409,"name":4409,"fn":4410,"description":4411,"org":4412,"tags":4413,"stars":22,"repoUrl":23,"updatedAt":4420},"n8n-binary-and-data-official","handle binary data and files in n8n","Use when handling files, images, attachments, or binary data in n8n, OR when an AI agent needs to take a user-uploaded file as tool input or return a generated file. For Data Tables (schemas, dedup, persistent state), see the separate n8n-data-tables-official skill. Triggers on \"file\", \"image\", \"PDF\", \"attachment\", \"binary\", \"upload\", \"download\", chat trigger with files, agent tool that needs a file, vision\u002Fmultimodal, or any handling of non-JSON file data.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4414,4415,4418,4419],{"name":4268,"slug":4269,"type":15},{"name":4416,"slug":4417,"type":15},"File Uploads","file-uploads",{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-08T05:45:01.884342",{"slug":4,"name":4,"fn":5,"description":6,"org":4422,"tags":4423,"stars":22,"repoUrl":23,"updatedAt":24},{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4424,4425,4426],{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":17,"slug":18,"type":15},{"slug":4428,"name":4428,"fn":4429,"description":4430,"org":4431,"tags":4432,"stars":22,"repoUrl":23,"updatedAt":4442},"n8n-credentials-and-security-official","manage credentials and security in n8n","Use when handling any auth, API keys, tokens, OAuth, bearer tokens, basic auth, or secret values in n8n workflows. Triggers on \"API key\", \"token\", \"bearer\", \"OAuth\", \"secret\", \"auth\", \"credentials\", \"Authorization header\", \"x-api-key\", or any node configuration that mentions a third-party service.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4433,4436,4437,4438,4439],{"name":4434,"slug":4435,"type":15},"Authentication","authentication",{"name":4268,"slug":4269,"type":15},{"name":8,"slug":8,"type":15},{"name":4275,"slug":4276,"type":15},{"name":4440,"slug":4441,"type":15},"Security","security","2026-07-08T05:45:07.766252",{"slug":4444,"name":4444,"fn":4280,"description":4445,"org":4446,"tags":4447,"stars":22,"repoUrl":23,"updatedAt":4454},"n8n-data-tables-official","Use when working with n8n's built-in Data Tables, designing schemas, inserting\u002Fupdating\u002Fupserting rows, deduping, or querying. Triggers on \"Data Table\", \"data table\", `n8n-nodes-base.dataTable`, \"dedup\", \"idempotency\", \"lookup\", \"persistent state\", \"store across executions\", or any schema design discussion inside n8n.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4448,4451,4452,4453],{"name":4449,"slug":4450,"type":15},"Data Modeling","data-modeling",{"name":4288,"slug":4289,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-08T05:44:52.048039",{"slug":4456,"name":4456,"fn":4457,"description":4458,"org":4459,"tags":4460,"stars":22,"repoUrl":23,"updatedAt":4465},"n8n-debugging-official","debug and fix n8n workflow errors","Use when an n8n workflow isn't working, errors appear, results don't match what was expected, or the user says \"this isn't working.\" Triggers on errors, unexpected output, \"it's not working\", \"why is this happening\", \"the workflow stopped\", failure investigation, or any debugging context.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4461,4462,4463,4464],{"name":4268,"slug":4269,"type":15},{"name":4300,"slug":4301,"type":15},{"name":8,"slug":8,"type":15},{"name":4256,"slug":4257,"type":15},"2026-07-08T05:45:05.897341",{"slug":4467,"name":4467,"fn":4468,"description":4469,"org":4470,"tags":4471,"stars":22,"repoUrl":23,"updatedAt":4478},"n8n-error-handling-official","implement error handling in n8n","Use when building any webhook-triggered workflow, scheduled\u002Fproduction-bound workflow, wiring a per-node error output, or any workflow where silent failure would drop user-visible work. Triggers on \"webhook\", \"respond to webhook\", \"API\", \"production\", \"error\", \"failure\", \"5xx\", \"try\u002Fcatch\", \"error workflow\", \"onError\", \"continueErrorOutput\", \"error branch\", \"node error output\", \"output(1)\", \"main[1]\", \"scheduled\", or any workflow that runs unattended.",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[4472,4473,4474,4477],{"name":4300,"slug":4301,"type":15},{"name":8,"slug":8,"type":15},{"name":4475,"slug":4476,"type":15},"Operations","operations",{"name":4256,"slug":4257,"type":15},"2026-07-08T05:44:59.710099"]