[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-n8n-n8n-expressions-official":3,"mdc-3rtri4-key":30,"related-repo-n8n-n8n-expressions-official":5849,"related-org-n8n-n8n-expressions-official":5951},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":20,"repoUrl":21,"updatedAt":22,"license":23,"forks":24,"topics":25,"repo":26,"sourceUrl":28,"mdContent":29},"n8n-expressions-official","write and debug n8n expressions","Use when writing or reviewing n8n expressions (`{{...}}` syntax), `$json` \u002F `$node` references, Luxon date code, or expression errors. Triggers on `{{}}`, `$json`, `$node`, `$input`, `DateTime`, `Luxon`, \"expression error\", \"evaluating\", \"format date\", \"transform field\", or any node-parameter assignment.",{"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,14,17],{"name":8,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Debugging","debugging",{"name":18,"slug":19,"type":13},"Workflow Automation","workflow-automation",319,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills","2026-07-08T05:44:53.30247",null,30,[],{"repoUrl":21,"stars":20,"forks":24,"topics":27,"description":23},[],"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fn8n-expressions-official","---\nname: n8n-expressions-official\ndescription: Use when writing or reviewing n8n expressions (`{{...}}` syntax), `$json` \u002F `$node` references, Luxon date code, or expression errors. Triggers on `{{}}`, `$json`, `$node`, `$input`, `DateTime`, `Luxon`, \"expression error\", \"evaluating\", \"format date\", \"transform field\", or any node-parameter assignment.\n---\n\n# n8n Expressions\n\nn8n's expression language is JavaScript embedded in `{{...}}` blocks. They run synchronously, on a single item at a time (`$json`), with access to upstream nodes (`$('Name')`), Luxon for dates, and most of native JS.\n\n## Non-negotiable\n\n**Reference data by node name, not `$json`.** Use `$('Node Name').item.json.field` (or `.first().json.field`). `$json` works but breaks when any node clears item context (Aggregate, Code with Run for All, branching merges) or a refactor adds an intermediate. Failures are silent, and downstream gets the wrong data with no error. Node-name references are stable.\n\n## Strong defaults\n\n- **No Set nodes whose only purpose is to feed a single downstream field.** Inline the expression at the consumer. Set earns its place when 2+ consumers read the same derived value, the derivation is non-trivial, or the Set is a sub-workflow's final return-shaper. See \"The Set-node antipattern\" below.\n- **Luxon for dates, not the DateTime node.** Date math, formatting, and parsing all work in expressions: `{{ DateTime.now().minus({ days: 7 }).toISO() }}`. The DateTime node is more visible on the canvas for beginner human users, but avoid it unless the user specifically asks for it.\n- **Expressions over extra nodes generally.** Build the email body in the email node's body field, and compute the URL in the HTTP Request's URL field. Reach for an extra node when the transform is reused or the *primary purpose* of a section.\n- **Multi-line expressions are indented and commented.** When an expression spans more than one line, format it like real code. Most n8n users are not coders, so explain the code with concise inline comments\n\n## Why reference by node name (`$('Name').item.json.x`) over `$json.x`\n\n`$json` means \"the current item flowing into this node.\" Fine when the node is directly downstream of one source and nothing has cleared the item context (some nodes do: Aggregate, Code with `Run for All`, branching merges).\n\nIt breaks when:\n\n- You insert a node between source and consumer (the consumer was reading `$json.x` from a node 3 steps back, and now the new intermediate node is what `$json` refers to).\n- A node clears the context (Aggregate, certain merges, Code nodes that don't preserve shape).\n- Branches converge via Merge. `$json` is whichever branch fired last, not deterministic.\n\n`$('Get User').item.json.id` is unambiguous. Always the named node's first-item JSON, regardless of what's between.\n\n**The exception that makes the rule:**\n\nWhen branches converge and you need a stable reference point, **insert a NoOp node** at the convergence. Name it descriptively (e.g., `Combine Inputs`). Downstream nodes reference it by name.\n\n```\nBranch A ──┐\n           ├─→ [NoOp: Combine Inputs] ──→ Downstream nodes use $('Combine Inputs').item.json.x\nBranch B ──┘\n```\n\nNoOp survives refactors: inserting a transform between Combine Inputs and the consumer doesn't break the `$('Combine Inputs')` reference.\n\nThis pattern is **required** when downstream nodes need data from a node whose context gets cleared by an intermediate operation.\n\n**If the branches produce different shapes, use a Set node instead of NoOp.** NoOp passes through whatever shape arrived, so downstream still has to know which branch fired. A Set node normalizes both branches into one shape, and downstream reads one set of fields:\n\n```ts\n\u002F\u002F Set node: \"Normalize Inputs\"\nname: `={{ $('Lookup by Email').item.json.name || $('Lookup by ID').item.json.full_name }}`\nemail: `={{ $('Lookup by Email').item.json.email || $('Lookup by ID').item.json.contact_email }}`\n```\n\nDownstream nodes reference `$('Normalize Inputs').item.json.name` regardless of which branch produced it.\n\n## The Set-node antipattern \n\nThe pattern AI agents often produce:\n\n```\nWebhook → Set: { customer_id: $json.body.customer_id, amount: $json.body.amount }\n       → Postgres: WHERE id = {{ $json.customer_id }}\n       → Email: Total is {{ $json.amount }}\n```\n\nThe Set node does nothing useful. Each downstream node could read from the webhook directly:\n\n```\nWebhook → Postgres: WHERE id = {{ $('Webhook').item.json.body.customer_id }}\n       → Email: Total is {{ $('Webhook').item.json.body.amount }}\n```\n\nThe Set node only earns its place if:\n\n- The same derived value is used by **multiple downstream consumers** (derivation non-trivial).\n- The derivation is logic-heavy and a name aids readability.\n- Multiple branches need the same shape, and a shared upstream reference is cleaner.\n- **It's the final node of a sub-workflow, shaping the return contract.** Explicit exception: the \"single consumer\" is every caller, so the Set is the API boundary. Optional but encouraged for sub-workflows, and sometimes required when the prior node carries noise fields. See `n8n-subworkflows-official`.\n- **You need to drop fields from the item by setting `Include Other Fields: false`.** Set is the cleanest way to whitelist an output shape. This is the underlying mechanism behind the sub-workflow return-shaper bullet above (preventing internal scratch fields from leaking to callers), but it applies anywhere you need a clean shape downstream.\n- **You need to rename fields.** A Set keeps the rename visible in one place rather than spread across every consumer expression.\n\nFor \"extract a field from the request body and use it once,\" **no** Set node. The expression goes in the consuming field.\n\nFor \"extract once for many downstream uses,\" a Set node *is* legitimate. If only one consumer uses it, the Set is debt (except the return-shaper case above).\n\n### Quick test for whether a Set node is needed\n\nHow many downstream nodes reference each field?\n\n- **0 or 1** → delete, inline the expression.\n- **2+** → may earn its place, especially if non-trivial.\n\nMultiple consecutive Set nodes are almost certainly over-extraction. Collapse.\n\n## What expressions can do\n\n### Single-field transformation\n\n```ts\n{{ $json.name.toUpperCase() }}\n{{ $json.email.toLowerCase().trim() }}\n{{ $json.items.length }}\n{{ $json.user.first_name + ' ' + $json.user.last_name }}\n{{ `(${$json.user.phone.slice(0, 3)}) ${$json.user.phone.slice(3, 6)}-${$json.user.phone.slice(6, 10)}` }}\n```\n\n### Method chains: `.map()`, `.filter()`, `.find()`, `.reduce()`\n\nArray methods are some of the most useful expression tools. They replace dozens of nodes.\n\n```ts\n{{ $json.tags.filter(tag => tag.active).map(tag => tag.name).join(', ') }}\n{{ Object.values($json.scores).reduce((sum, score) => sum + score, 0) }}\n\n\u002F\u002F Find one matching item from another node's output\n{{ $('Get Models').all().find(model => model.json.id === $json.modelId).json.modelName }}\n\n\u002F\u002F Filter array, then check shape\n{{\n  $('Get User\\'s Entries').all()\n    .map(item => item.json)\n    .filter(entry => entry.prize_eligible === 'eligible')\n    .length > 0\n}}\n```\n\n#### Always indent multi-step chains and add comments\n\nWhen a chain has 2+ method calls or non-obvious filter logic, format it across lines and comment. Readers may not be the author, so comments make intent legible to non-technical readers too.\n\n```ts\n{{\n  \u002F\u002F Find all entries that are still processing AFTER 1 hour\n  \u002F\u002F (used to allow re-submission since something likely went wrong)\n  $('Get User\\'s Entries').all()\n    .map(item => item.json)\n    .filter(entry =>\n      entry.prize_eligible === 'processing' &&\n      $now.diffTo(entry.created_at, 'minutes') > 60\n    )\n    .length > 0\n}}\n```\n\nThis kind of logic is common in routing nodes (Switch, IF). Un-commented, it's unreadable for most users.\n\n#### `.all().map()` triggers an \"execute once\" question\n\nWhen you use `$('Source Node').all().map(...)` (or `.filter()`, `.reduce()`) to process the entire dataset, the **expression itself iterates**. If the node has the default per-item execution mode, it runs once *per input item*, but each run does the full `.all()` aggregation: wasted work, and possibly wrong.\n\n**Set the node to execute once when:**\n\n- The expression uses `.all().map()` \u002F `.all().filter()` \u002F `.all().reduce()`.\n- Output should be a single aggregated result, not per-item.\n\nThis is `executeOnce: true` on the node. Most nodes have it.\n\n```ts\nconst aggregateNode = node({\n    type: 'n8n-nodes-base.set',\n    config: {\n        executeOnce: true,            \u002F\u002F important when using .all() in expressions\n        parameters: {\n            assignments: {\n                assignments: [\n                    {\n                        name: 'totalEligible',\n                        value: `={{\n                            $('Get Entries').all()\n                                .map(item => item.json)\n                                .filter(entry => entry.eligible)\n                                .length\n                        }}`,\n                        type: 'number',\n                    },\n                ],\n            },\n        },\n    },\n})\n```\n\nForgetting `executeOnce` often still works but does N times the work for N items. Worse, if downstream expects one item, you get N.\n\n**Counter-case: `.all()` as a per-item lookup, NOT aggregation.** When the `.all()` reads a *different* node and gets filtered by the current item's identity, you want per-item execution. Each iteration produces a different result, so it's real work, not wasted.\n\n```ts\n\u002F\u002F Workflow: Get Tags (200 items) → Search Posts (10 items) → this Set Fields node.\n\u002F\u002F Each post carries a `tag_ids` array. Set Fields runs per-item (10 times)\n\u002F\u002F and resolves each post's tag_ids into the full tag objects.\ntags: ={{\n  $('Get Tags').all()\n    .filter(tag => $('Search Posts').item.json.tag_ids.includes(tag.json.id))\n}}\n```\n\nSetting `executeOnce: true` here would collapse the 10 outputs to 1.\n\nThe shape distinguishing the two:\n\n- `$source.all()` *alone* (aggregating across the dataset) → `executeOnce: true`.\n- `$source.all().filter(... matches $other.item.json.x)` (looking up by the current item) → leave `executeOnce` off.\n\n**Quick test:** does the expression use `.all()` *without* combining it with another node's `.item`? If yes, the node should probably be `executeOnce: true`.\n\nFor the broader picture on iteration and explicit looping, see the `n8n-loops-official` skill.\n\n### Conditionals\n\n```ts\n{{ $json.status === 'active' ? 'Active' : 'Inactive' }}\n{{ $json.amount >= 100 ? 'Large' : ($json.amount >= 10 ? 'Medium' : 'Small') }}\n```\n\n### Date math (Luxon)\n\n```ts\n{{ DateTime.now().toISO() }}\n{{ DateTime.fromISO($json.created_at).toFormat('yyyy-MM-dd') }}\n{{ DateTime.now().minus({ days: 7 }).startOf('day').toISO() }}\n{{ DateTime.fromISO($json.due).diffNow('days').days }}    \u002F\u002F days from now (negative if past)\n```\n\n### Cross-node references (preferred over `$json`)\n\n```ts\n{{ $('Webhook Trigger').item.json.body.customer_id }}\n{{ $('Lookup customer').item.json.email }}\n{{ $('Combine Inputs').item.json.coupon_code }}    \u002F\u002F NoOp convergence point\n```\n\n`.item` and `.first()` are mostly equivalent for single-item nodes, so pick one. `.first()` is more explicit, `.item` is shorter.\n\n### Multi-line logic with an IIFE arrow function\n\nWhen logic is too gnarly for one line but operates on a single item, wrap it in an immediately-invoked arrow function:\n\n```ts\n{{ (() => {\n    \u002F\u002F Compute total including tax\n    const items = $json.line_items\n    const subtotal = items.reduce((sum, item) => sum + item.price * item.qty, 0)\n    const tax = subtotal * 0.08\n    return (subtotal + tax).toFixed(2)\n})() }}\n```\n\nInside, you get the full expression scope (`$json`, `$('Node Name')`, `$now`, Luxon) plus the JS you'd write in any function: `const`\u002F`let`, `if`\u002F`switch`, `try`\u002F`catch`, regex.\n\n**Arguments don't work.** Expressions have no caller to pass them, so `(text) => text.replace(...)` has nothing to invoke it with. Reference values from the outer scope directly. The function still needs the IIFE wrapping (`(...)()`) to actually execute.\n\n```ts\n{{ (() => $json.text.replace(\u002F\\b(?:foo|bar)\\b\u002Fgi, 'baz'))() }}\n```\n\nThe outer `(` and trailing `)()` are mandatory: the first pair brackets the function expression, the trailing `()` invokes it. Drop either and n8n errors and refuses to run the workflow.\n\n**Why this over a Code node?** The Code node runs in a sandboxed VM: roughly 500-1000ms worst case. The expression IIFE runs in the same context as the surrounding expression: 1-10ms consistently. For pure single-item shaping, that's a 100x gap with no functional difference. This is a common poweruser method.\n\nA Code node still earns its place for multi-item aggregation (`$input.all()`), external libraries, or async work. See `n8n-code-nodes-official` for the decision tree, and `n8n-code-nodes-official` `ARROW_FUNCTIONS_IN_EDIT_FIELDS.md` for longer examples and formatting rules.\n\n### Native JS available\n\n`String`, `Array`, `Number`, `Object`, `Map`, `Set`, `JSON.parse`, `JSON.stringify`, `Math`, regular expressions, `Date` (but only use Luxon).\n\n## Useful idioms\n\n### Default value when a field might be missing\n\n```ts\n{{ $json.id || \"fallback-id-here\" }}\n```\n\nOr with optional chaining:\n\n```ts\n{{ $json.user?.profile?.id ?? \"anonymous\" }}\n```\n\nEspecially useful for filter values feeding queries: pass a default that matches no rows rather than letting the query fail with `undefined`.\n\n### Embedding JSON in a text field: which serializer\n\nTwo serializers, two contexts:\n\n- **`.toJsonString()`** for compact JSON where formatting doesn't matter. Canonical case: **AI prompts**. Smaller, easier on tokens, easier to scan in a prompt template.\n  ```ts\n  {{ $('Get Data').item.json.toJsonString() }}\n  ```\n- **`JSON.stringify(value, null, 2)`** for pretty-printed JSON where formatting matters. Canonical case: **email bodies, Slack messages, debug output**, anywhere a human reads the result.\n  ```ts\n  {{ JSON.stringify($('Source Node').item.json, null, 2) }}\n  ```\n\nPick deliberately. Pretty-printing inside an LLM prompt wastes tokens and clutters the model's context. Compact JSON in an email is unreadable.\n\n### `JSON.stringify` and `JSON.parse`: where they belong\n\n`JSON.stringify` and `JSON.parse` are common in expressions. Both are fine. The key discipline: **stringify and parse are storage-layer operations, not interface-layer operations.**\n\n- **Stringify when you're writing into a storage column that doesn't natively hold the type.** The canonical case: a Data Tables `_object`-postfixed string column holding what's actually an array or object. See `n8n-data-tables-official`.\n- **Parse when you're reading back out of that storage column.** Inside the workflow that owns the storage.\n- **Don't propagate the stringified shape across boundaries.** Sub-workflow returns, webhook responses, agent tool results, downstream consumers: all of those should receive the natural shape (arrays as arrays, objects as objects), not a stringified shell that the caller has to remember to `JSON.parse`.\n\nThe classic slip: a sub-workflow has a \"fresh\" path (data just produced by an LLM, already an array) and a \"cached\" path (data just read from a `_object` column, still a string). The wrong instinct is to stringify the fresh path \"to match\" the cached one. The right instinct is to parse the cached path so both branches produce the same natural shape on the way out.\n\nStorage representation belongs inside the workflow that owns the storage. Outside that boundary, talk in natural shapes. `n8n-subworkflows-official` SKILL.md \"Return natural shapes, not storage shapes\" covers this from the sub-workflow side, and `n8n-data-tables-official` covers it from the storage side.\n\n### Returning the right type: when to wrap in `={{ ... }}`\n\nSome node fields will treat your value as a string literal unless you tell n8n to evaluate it as an expression. Wrapping in `={{ ... }}` (the `=` prefix turns the field into expression mode) returns the actual type the inner code produces:\n\n```ts\n\u002F\u002F String literal (default behavior)\nfoo: 'plain string'\n\n\u002F\u002F Number\nfoo: '={{ 100 }}'\n\n\u002F\u002F Boolean\nfoo: '={{ true }}'\n\n\u002F\u002F Object (the `={{ ... }}` is what makes the receiver see an object, not a string)\nfoo: '={{ { \"valid\": true, \"items\": [] } }}'\n\n\u002F\u002F Array\nfoo: '={{ [\"a\", \"b\", \"c\"] }}'\n\n\u002F\u002F Reference to another node's value (preserves whatever type that value already is)\nfoo: '={{ $(\"Source Node\").item.json.payload }}'\n```\n\nWhen the type matters: object\u002Farray fields on Set \u002F Edit Fields (with the column's `Type` set to Object or Array), JSON body parameters on HTTP Request, structured inputs to a sub-workflow's typed `workflowInputs.values[type]`, agent tool parameters, anywhere the receiving node validates the type. Without the `={{ ... }}` wrapper, you'd be passing a string and the receiver either coerces or errors.\n\n**Reference by node name, not `$json`**, per non-negotiable #1 above:\n\n```ts\n\u002F\u002F WRONG\nfoo: '={{ $json.payload }}'\n\n\u002F\u002F RIGHT\nfoo: '={{ $(\"Source Node\").item.json.payload }}'\n```\n\nThe exception: if `$json` is genuinely the right thing (no intermediate transforms, no convergence) and the field is a per-item slot on a node that's directly downstream of one source. Even then, named references are more refactor-safe.\n\n### Multi-line expression with explanatory comment\n\n```ts\n{{\n  \u002F\u002F Default to avoid query errors when user_id is missing.\n  \u002F\u002F The fallback UUID is a known-empty row.\n  $json.id || \"305f7106-6988-4651-b26a-18979641b7b5\"\n}}\n```\n\n**Encouraged** when logic is non-obvious. The comment will be there for the next reader.\n\n## What expressions CAN'T do\n\n- Use external libraries (no `require`).\n- Async \u002F await.\n\n`$json` itself is the current item only, but expressions *can* reach across items via `$input.all()`, `$input.all()[3]`, `$('Source Node').all()`, etc. See \"Method chains\" above.\n\nFor those, see `n8n-code-nodes-official`.\n\n## Decision: expression, Edit Fields, or Code node?\n\nPer `n8n-code-nodes-official`'s decision tree:\n\n```\n1. Single-field transform → expression in the field\n2. Multi-step pure logic on one item → arrow function in Edit Fields\n3. Multi-source aggregation, libraries, or stateful → Code node\n```\n\nExpression is the default. Reach past it only when input or scope demands it.\n\n## The \"extra node\" smell\n\nCommon reaches-for-extra-nodes that should stay in expressions:\n\n| Adding this node | Better as |\n|---|---|\n| DateTime node to format a date | `DateTime.fromISO(...).toFormat(...)` in the consumer's expression |\n| Set node to build an email body | Inline the expression in the email node's body field |\n| Set node to compute a derived field used once | Inline at the consumer |\n| Two nodes (Set + IF) to compute then test | One IF with the computation in its condition expression |\n| Code node to call `.toUpperCase()` | Just the expression |\n\nAdding nodes for transforms means more visual clutter, slower workflows, harder reading.\n\nWhen extra nodes ARE right:\n\n- The transform is *reused* across multiple downstream consumers.\n- The transform is heavy (Code node territory).\n- The transform is the *primary purpose* of a section (a clear \"compute X\" step).\n\n## Anti-patterns\n\n| Anti-pattern | What goes wrong | Fix |\n|---|---|---|\n| Set node that exists to extract one field from a webhook body for one downstream consumer | Extra node for what should be inlined, fragile to refactor | Delete the Set node, reference `$('Webhook').item.json.body.x` directly in the consumer |\n| Multiple consecutive Set nodes each defining one field | Workflow padding | Collapse. Most aren't needed, and for the ones that are, group into one Set node |\n| Using `$json.x` deep in a workflow with multiple branches and intermediate transforms | Reference breaks when an intermediate is added or context is cleared | Use `$('Source Node').item.json.x`. Add a NoOp convergence point if branches merge. |\n| Adding a DateTime node to format a timestamp | Extra node for what's a 1-line Luxon expression | `{{ DateTime.fromISO($('Source').item.json.x).toFormat('yyyy-MM-dd') }}` |\n| Set node to build email HTML, then read it in the Email node | Two nodes for what's one expression | Build the HTML directly in the email node's body field |\n| `new Date($json.created_at)` instead of Luxon | Loses formatting\u002Fmanipulation features | `DateTime.fromISO($('Source').item.json.created_at)` |\n| One-line expression that's actually 200 chars | Unreadable | Multi-line with arrow function, indented, with comments |\n| `$json.foo.bar.baz` without checking `$json.foo` exists | Crashes on missing intermediate | Use `?.` chain: `$('Source').item.json.foo?.bar?.baz` |\n| Hardcoding values in expressions that should be config | Magic strings | Use `$vars.X` (n8n Variables, paid plans) or a Data Table |\n| Branches converge with `$json` references downstream | Whichever branch fired last wins, non-deterministic | Insert a NoOp (\"Combine Inputs\") at the merge, reference by name |\n| Using `$env.X` in any expression | Doesn't work; throws at runtime | For config use `$vars.X` (paid plans) or a Data Table. For secrets use the credential system |",{"data":31,"body":32},{"name":4,"description":6},{"type":33,"children":34},"root",[35,44,75,82,123,129,190,210,228,233,272,283,291,311,323,336,348,358,437,450,456,461,470,475,484,489,558,570,582,589,594,617,622,628,634,1054,1088,1093,1708,1715,1720,1997,2002,2014,2061,2069,2103,2116,2478,2491,2522,2727,2739,2744,2789,2826,2839,2845,3046,3052,3373,3385,3587,3619,3625,3630,3903,3972,3998,4121,4148,4158,4193,4199,4274,4280,4286,4336,4341,4407,4419,4425,4430,4643,4648,4665,4686,4740,4752,4771,4783,4802,5037,5065,5080,5157,5169,5175,5246,5256,5262,5283,5321,5332,5338,5350,5359,5364,5370,5375,5480,5485,5490,5521,5527,5843],{"type":36,"tag":37,"props":38,"children":40},"element","h1",{"id":39},"n8n-expressions",[41],{"type":42,"value":43},"text","n8n Expressions",{"type":36,"tag":45,"props":46,"children":47},"p",{},[48,50,57,59,65,67,73],{"type":42,"value":49},"n8n's expression language is JavaScript embedded in ",{"type":36,"tag":51,"props":52,"children":54},"code",{"className":53},[],[55],{"type":42,"value":56},"{{...}}",{"type":42,"value":58}," blocks. They run synchronously, on a single item at a time (",{"type":36,"tag":51,"props":60,"children":62},{"className":61},[],[63],{"type":42,"value":64},"$json",{"type":42,"value":66},"), with access to upstream nodes (",{"type":36,"tag":51,"props":68,"children":70},{"className":69},[],[71],{"type":42,"value":72},"$('Name')",{"type":42,"value":74},"), Luxon for dates, and most of native JS.",{"type":36,"tag":76,"props":77,"children":79},"h2",{"id":78},"non-negotiable",[80],{"type":42,"value":81},"Non-negotiable",{"type":36,"tag":45,"props":83,"children":84},{},[85,98,100,106,108,114,116,121],{"type":36,"tag":86,"props":87,"children":88},"strong",{},[89,91,96],{"type":42,"value":90},"Reference data by node name, not ",{"type":36,"tag":51,"props":92,"children":94},{"className":93},[],[95],{"type":42,"value":64},{"type":42,"value":97},".",{"type":42,"value":99}," Use ",{"type":36,"tag":51,"props":101,"children":103},{"className":102},[],[104],{"type":42,"value":105},"$('Node Name').item.json.field",{"type":42,"value":107}," (or ",{"type":36,"tag":51,"props":109,"children":111},{"className":110},[],[112],{"type":42,"value":113},".first().json.field",{"type":42,"value":115},"). ",{"type":36,"tag":51,"props":117,"children":119},{"className":118},[],[120],{"type":42,"value":64},{"type":42,"value":122}," works but breaks when any node clears item context (Aggregate, Code with Run for All, branching merges) or a refactor adds an intermediate. Failures are silent, and downstream gets the wrong data with no error. Node-name references are stable.",{"type":36,"tag":76,"props":124,"children":126},{"id":125},"strong-defaults",[127],{"type":42,"value":128},"Strong defaults",{"type":36,"tag":130,"props":131,"children":132},"ul",{},[133,144,162,180],{"type":36,"tag":134,"props":135,"children":136},"li",{},[137,142],{"type":36,"tag":86,"props":138,"children":139},{},[140],{"type":42,"value":141},"No Set nodes whose only purpose is to feed a single downstream field.",{"type":42,"value":143}," Inline the expression at the consumer. Set earns its place when 2+ consumers read the same derived value, the derivation is non-trivial, or the Set is a sub-workflow's final return-shaper. See \"The Set-node antipattern\" below.",{"type":36,"tag":134,"props":145,"children":146},{},[147,152,154,160],{"type":36,"tag":86,"props":148,"children":149},{},[150],{"type":42,"value":151},"Luxon for dates, not the DateTime node.",{"type":42,"value":153}," Date math, formatting, and parsing all work in expressions: ",{"type":36,"tag":51,"props":155,"children":157},{"className":156},[],[158],{"type":42,"value":159},"{{ DateTime.now().minus({ days: 7 }).toISO() }}",{"type":42,"value":161},". The DateTime node is more visible on the canvas for beginner human users, but avoid it unless the user specifically asks for it.",{"type":36,"tag":134,"props":163,"children":164},{},[165,170,172,178],{"type":36,"tag":86,"props":166,"children":167},{},[168],{"type":42,"value":169},"Expressions over extra nodes generally.",{"type":42,"value":171}," Build the email body in the email node's body field, and compute the URL in the HTTP Request's URL field. Reach for an extra node when the transform is reused or the ",{"type":36,"tag":173,"props":174,"children":175},"em",{},[176],{"type":42,"value":177},"primary purpose",{"type":42,"value":179}," of a section.",{"type":36,"tag":134,"props":181,"children":182},{},[183,188],{"type":36,"tag":86,"props":184,"children":185},{},[186],{"type":42,"value":187},"Multi-line expressions are indented and commented.",{"type":42,"value":189}," When an expression spans more than one line, format it like real code. Most n8n users are not coders, so explain the code with concise inline comments",{"type":36,"tag":76,"props":191,"children":193},{"id":192},"why-reference-by-node-name-nameitemjsonx-over-jsonx",[194,196,202,204],{"type":42,"value":195},"Why reference by node name (",{"type":36,"tag":51,"props":197,"children":199},{"className":198},[],[200],{"type":42,"value":201},"$('Name').item.json.x",{"type":42,"value":203},") over ",{"type":36,"tag":51,"props":205,"children":207},{"className":206},[],[208],{"type":42,"value":209},"$json.x",{"type":36,"tag":45,"props":211,"children":212},{},[213,218,220,226],{"type":36,"tag":51,"props":214,"children":216},{"className":215},[],[217],{"type":42,"value":64},{"type":42,"value":219}," means \"the current item flowing into this node.\" Fine when the node is directly downstream of one source and nothing has cleared the item context (some nodes do: Aggregate, Code with ",{"type":36,"tag":51,"props":221,"children":223},{"className":222},[],[224],{"type":42,"value":225},"Run for All",{"type":42,"value":227},", branching merges).",{"type":36,"tag":45,"props":229,"children":230},{},[231],{"type":42,"value":232},"It breaks when:",{"type":36,"tag":130,"props":234,"children":235},{},[236,255,260],{"type":36,"tag":134,"props":237,"children":238},{},[239,241,246,248,253],{"type":42,"value":240},"You insert a node between source and consumer (the consumer was reading ",{"type":36,"tag":51,"props":242,"children":244},{"className":243},[],[245],{"type":42,"value":209},{"type":42,"value":247}," from a node 3 steps back, and now the new intermediate node is what ",{"type":36,"tag":51,"props":249,"children":251},{"className":250},[],[252],{"type":42,"value":64},{"type":42,"value":254}," refers to).",{"type":36,"tag":134,"props":256,"children":257},{},[258],{"type":42,"value":259},"A node clears the context (Aggregate, certain merges, Code nodes that don't preserve shape).",{"type":36,"tag":134,"props":261,"children":262},{},[263,265,270],{"type":42,"value":264},"Branches converge via Merge. ",{"type":36,"tag":51,"props":266,"children":268},{"className":267},[],[269],{"type":42,"value":64},{"type":42,"value":271}," is whichever branch fired last, not deterministic.",{"type":36,"tag":45,"props":273,"children":274},{},[275,281],{"type":36,"tag":51,"props":276,"children":278},{"className":277},[],[279],{"type":42,"value":280},"$('Get User').item.json.id",{"type":42,"value":282}," is unambiguous. Always the named node's first-item JSON, regardless of what's between.",{"type":36,"tag":45,"props":284,"children":285},{},[286],{"type":36,"tag":86,"props":287,"children":288},{},[289],{"type":42,"value":290},"The exception that makes the rule:",{"type":36,"tag":45,"props":292,"children":293},{},[294,296,301,303,309],{"type":42,"value":295},"When branches converge and you need a stable reference point, ",{"type":36,"tag":86,"props":297,"children":298},{},[299],{"type":42,"value":300},"insert a NoOp node",{"type":42,"value":302}," at the convergence. Name it descriptively (e.g., ",{"type":36,"tag":51,"props":304,"children":306},{"className":305},[],[307],{"type":42,"value":308},"Combine Inputs",{"type":42,"value":310},"). Downstream nodes reference it by name.",{"type":36,"tag":312,"props":313,"children":317},"pre",{"className":314,"code":316,"language":42},[315],"language-text","Branch A ──┐\n           ├─→ [NoOp: Combine Inputs] ──→ Downstream nodes use $('Combine Inputs').item.json.x\nBranch B ──┘\n",[318],{"type":36,"tag":51,"props":319,"children":321},{"__ignoreMap":320},"",[322],{"type":42,"value":316},{"type":36,"tag":45,"props":324,"children":325},{},[326,328,334],{"type":42,"value":327},"NoOp survives refactors: inserting a transform between Combine Inputs and the consumer doesn't break the ",{"type":36,"tag":51,"props":329,"children":331},{"className":330},[],[332],{"type":42,"value":333},"$('Combine Inputs')",{"type":42,"value":335}," reference.",{"type":36,"tag":45,"props":337,"children":338},{},[339,341,346],{"type":42,"value":340},"This pattern is ",{"type":36,"tag":86,"props":342,"children":343},{},[344],{"type":42,"value":345},"required",{"type":42,"value":347}," when downstream nodes need data from a node whose context gets cleared by an intermediate operation.",{"type":36,"tag":45,"props":349,"children":350},{},[351,356],{"type":36,"tag":86,"props":352,"children":353},{},[354],{"type":42,"value":355},"If the branches produce different shapes, use a Set node instead of NoOp.",{"type":42,"value":357}," NoOp passes through whatever shape arrived, so downstream still has to know which branch fired. A Set node normalizes both branches into one shape, and downstream reads one set of fields:",{"type":36,"tag":312,"props":359,"children":363},{"className":360,"code":361,"language":362,"meta":320,"style":320},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Set node: \"Normalize Inputs\"\nname: `={{ $('Lookup by Email').item.json.name || $('Lookup by ID').item.json.full_name }}`\nemail: `={{ $('Lookup by Email').item.json.email || $('Lookup by ID').item.json.contact_email }}`\n","ts",[364],{"type":36,"tag":51,"props":365,"children":366},{"__ignoreMap":320},[367,379,411],{"type":36,"tag":368,"props":369,"children":372},"span",{"class":370,"line":371},"line",1,[373],{"type":36,"tag":368,"props":374,"children":376},{"style":375},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[377],{"type":42,"value":378},"\u002F\u002F Set node: \"Normalize Inputs\"\n",{"type":36,"tag":368,"props":380,"children":382},{"class":370,"line":381},2,[383,389,395,400,406],{"type":36,"tag":368,"props":384,"children":386},{"style":385},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[387],{"type":42,"value":388},"name",{"type":36,"tag":368,"props":390,"children":392},{"style":391},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[393],{"type":42,"value":394},":",{"type":36,"tag":368,"props":396,"children":397},{"style":391},[398],{"type":42,"value":399}," `",{"type":36,"tag":368,"props":401,"children":403},{"style":402},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[404],{"type":42,"value":405},"={{ $('Lookup by Email').item.json.name || $('Lookup by ID').item.json.full_name }}",{"type":36,"tag":368,"props":407,"children":408},{"style":391},[409],{"type":42,"value":410},"`\n",{"type":36,"tag":368,"props":412,"children":414},{"class":370,"line":413},3,[415,420,424,428,433],{"type":36,"tag":368,"props":416,"children":417},{"style":385},[418],{"type":42,"value":419},"email",{"type":36,"tag":368,"props":421,"children":422},{"style":391},[423],{"type":42,"value":394},{"type":36,"tag":368,"props":425,"children":426},{"style":391},[427],{"type":42,"value":399},{"type":36,"tag":368,"props":429,"children":430},{"style":402},[431],{"type":42,"value":432},"={{ $('Lookup by Email').item.json.email || $('Lookup by ID').item.json.contact_email }}",{"type":36,"tag":368,"props":434,"children":435},{"style":391},[436],{"type":42,"value":410},{"type":36,"tag":45,"props":438,"children":439},{},[440,442,448],{"type":42,"value":441},"Downstream nodes reference ",{"type":36,"tag":51,"props":443,"children":445},{"className":444},[],[446],{"type":42,"value":447},"$('Normalize Inputs').item.json.name",{"type":42,"value":449}," regardless of which branch produced it.",{"type":36,"tag":76,"props":451,"children":453},{"id":452},"the-set-node-antipattern",[454],{"type":42,"value":455},"The Set-node antipattern",{"type":36,"tag":45,"props":457,"children":458},{},[459],{"type":42,"value":460},"The pattern AI agents often produce:",{"type":36,"tag":312,"props":462,"children":465},{"className":463,"code":464,"language":42},[315],"Webhook → Set: { customer_id: $json.body.customer_id, amount: $json.body.amount }\n       → Postgres: WHERE id = {{ $json.customer_id }}\n       → Email: Total is {{ $json.amount }}\n",[466],{"type":36,"tag":51,"props":467,"children":468},{"__ignoreMap":320},[469],{"type":42,"value":464},{"type":36,"tag":45,"props":471,"children":472},{},[473],{"type":42,"value":474},"The Set node does nothing useful. Each downstream node could read from the webhook directly:",{"type":36,"tag":312,"props":476,"children":479},{"className":477,"code":478,"language":42},[315],"Webhook → Postgres: WHERE id = {{ $('Webhook').item.json.body.customer_id }}\n       → Email: Total is {{ $('Webhook').item.json.body.amount }}\n",[480],{"type":36,"tag":51,"props":481,"children":482},{"__ignoreMap":320},[483],{"type":42,"value":478},{"type":36,"tag":45,"props":485,"children":486},{},[487],{"type":42,"value":488},"The Set node only earns its place if:",{"type":36,"tag":130,"props":490,"children":491},{},[492,504,509,514,531,548],{"type":36,"tag":134,"props":493,"children":494},{},[495,497,502],{"type":42,"value":496},"The same derived value is used by ",{"type":36,"tag":86,"props":498,"children":499},{},[500],{"type":42,"value":501},"multiple downstream consumers",{"type":42,"value":503}," (derivation non-trivial).",{"type":36,"tag":134,"props":505,"children":506},{},[507],{"type":42,"value":508},"The derivation is logic-heavy and a name aids readability.",{"type":36,"tag":134,"props":510,"children":511},{},[512],{"type":42,"value":513},"Multiple branches need the same shape, and a shared upstream reference is cleaner.",{"type":36,"tag":134,"props":515,"children":516},{},[517,522,524,530],{"type":36,"tag":86,"props":518,"children":519},{},[520],{"type":42,"value":521},"It's the final node of a sub-workflow, shaping the return contract.",{"type":42,"value":523}," Explicit exception: the \"single consumer\" is every caller, so the Set is the API boundary. Optional but encouraged for sub-workflows, and sometimes required when the prior node carries noise fields. See ",{"type":36,"tag":51,"props":525,"children":527},{"className":526},[],[528],{"type":42,"value":529},"n8n-subworkflows-official",{"type":42,"value":97},{"type":36,"tag":134,"props":532,"children":533},{},[534,546],{"type":36,"tag":86,"props":535,"children":536},{},[537,539,545],{"type":42,"value":538},"You need to drop fields from the item by setting ",{"type":36,"tag":51,"props":540,"children":542},{"className":541},[],[543],{"type":42,"value":544},"Include Other Fields: false",{"type":42,"value":97},{"type":42,"value":547}," Set is the cleanest way to whitelist an output shape. This is the underlying mechanism behind the sub-workflow return-shaper bullet above (preventing internal scratch fields from leaking to callers), but it applies anywhere you need a clean shape downstream.",{"type":36,"tag":134,"props":549,"children":550},{},[551,556],{"type":36,"tag":86,"props":552,"children":553},{},[554],{"type":42,"value":555},"You need to rename fields.",{"type":42,"value":557}," A Set keeps the rename visible in one place rather than spread across every consumer expression.",{"type":36,"tag":45,"props":559,"children":560},{},[561,563,568],{"type":42,"value":562},"For \"extract a field from the request body and use it once,\" ",{"type":36,"tag":86,"props":564,"children":565},{},[566],{"type":42,"value":567},"no",{"type":42,"value":569}," Set node. The expression goes in the consuming field.",{"type":36,"tag":45,"props":571,"children":572},{},[573,575,580],{"type":42,"value":574},"For \"extract once for many downstream uses,\" a Set node ",{"type":36,"tag":173,"props":576,"children":577},{},[578],{"type":42,"value":579},"is",{"type":42,"value":581}," legitimate. If only one consumer uses it, the Set is debt (except the return-shaper case above).",{"type":36,"tag":583,"props":584,"children":586},"h3",{"id":585},"quick-test-for-whether-a-set-node-is-needed",[587],{"type":42,"value":588},"Quick test for whether a Set node is needed",{"type":36,"tag":45,"props":590,"children":591},{},[592],{"type":42,"value":593},"How many downstream nodes reference each field?",{"type":36,"tag":130,"props":595,"children":596},{},[597,607],{"type":36,"tag":134,"props":598,"children":599},{},[600,605],{"type":36,"tag":86,"props":601,"children":602},{},[603],{"type":42,"value":604},"0 or 1",{"type":42,"value":606}," → delete, inline the expression.",{"type":36,"tag":134,"props":608,"children":609},{},[610,615],{"type":36,"tag":86,"props":611,"children":612},{},[613],{"type":42,"value":614},"2+",{"type":42,"value":616}," → may earn its place, especially if non-trivial.",{"type":36,"tag":45,"props":618,"children":619},{},[620],{"type":42,"value":621},"Multiple consecutive Set nodes are almost certainly over-extraction. Collapse.",{"type":36,"tag":76,"props":623,"children":625},{"id":624},"what-expressions-can-do",[626],{"type":42,"value":627},"What expressions can do",{"type":36,"tag":583,"props":629,"children":631},{"id":630},"single-field-transformation",[632],{"type":42,"value":633},"Single-field transformation",{"type":36,"tag":312,"props":635,"children":637},{"className":360,"code":636,"language":362,"meta":320,"style":320},"{{ $json.name.toUpperCase() }}\n{{ $json.email.toLowerCase().trim() }}\n{{ $json.items.length }}\n{{ $json.user.first_name + ' ' + $json.user.last_name }}\n{{ `(${$json.user.phone.slice(0, 3)}) ${$json.user.phone.slice(3, 6)}-${$json.user.phone.slice(6, 10)}` }}\n",[638],{"type":36,"tag":51,"props":639,"children":640},{"__ignoreMap":320},[641,684,734,768,841],{"type":36,"tag":368,"props":642,"children":643},{"class":370,"line":371},[644,649,655,659,663,667,673,679],{"type":36,"tag":368,"props":645,"children":646},{"style":391},[647],{"type":42,"value":648},"{{",{"type":36,"tag":368,"props":650,"children":652},{"style":651},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[653],{"type":42,"value":654}," $json",{"type":36,"tag":368,"props":656,"children":657},{"style":391},[658],{"type":42,"value":97},{"type":36,"tag":368,"props":660,"children":661},{"style":651},[662],{"type":42,"value":388},{"type":36,"tag":368,"props":664,"children":665},{"style":391},[666],{"type":42,"value":97},{"type":36,"tag":368,"props":668,"children":670},{"style":669},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[671],{"type":42,"value":672},"toUpperCase",{"type":36,"tag":368,"props":674,"children":676},{"style":675},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[677],{"type":42,"value":678},"() ",{"type":36,"tag":368,"props":680,"children":681},{"style":391},[682],{"type":42,"value":683},"}}\n",{"type":36,"tag":368,"props":685,"children":686},{"class":370,"line":381},[687,691,695,699,703,707,712,717,721,726,730],{"type":36,"tag":368,"props":688,"children":689},{"style":391},[690],{"type":42,"value":648},{"type":36,"tag":368,"props":692,"children":693},{"style":651},[694],{"type":42,"value":654},{"type":36,"tag":368,"props":696,"children":697},{"style":391},[698],{"type":42,"value":97},{"type":36,"tag":368,"props":700,"children":701},{"style":651},[702],{"type":42,"value":419},{"type":36,"tag":368,"props":704,"children":705},{"style":391},[706],{"type":42,"value":97},{"type":36,"tag":368,"props":708,"children":709},{"style":669},[710],{"type":42,"value":711},"toLowerCase",{"type":36,"tag":368,"props":713,"children":714},{"style":675},[715],{"type":42,"value":716},"()",{"type":36,"tag":368,"props":718,"children":719},{"style":391},[720],{"type":42,"value":97},{"type":36,"tag":368,"props":722,"children":723},{"style":669},[724],{"type":42,"value":725},"trim",{"type":36,"tag":368,"props":727,"children":728},{"style":675},[729],{"type":42,"value":678},{"type":36,"tag":368,"props":731,"children":732},{"style":391},[733],{"type":42,"value":683},{"type":36,"tag":368,"props":735,"children":736},{"class":370,"line":413},[737,741,745,749,754,758,763],{"type":36,"tag":368,"props":738,"children":739},{"style":391},[740],{"type":42,"value":648},{"type":36,"tag":368,"props":742,"children":743},{"style":651},[744],{"type":42,"value":654},{"type":36,"tag":368,"props":746,"children":747},{"style":391},[748],{"type":42,"value":97},{"type":36,"tag":368,"props":750,"children":751},{"style":651},[752],{"type":42,"value":753},"items",{"type":36,"tag":368,"props":755,"children":756},{"style":391},[757],{"type":42,"value":97},{"type":36,"tag":368,"props":759,"children":760},{"style":651},[761],{"type":42,"value":762},"length",{"type":36,"tag":368,"props":764,"children":765},{"style":391},[766],{"type":42,"value":767}," }}\n",{"type":36,"tag":368,"props":769,"children":771},{"class":370,"line":770},4,[772,776,780,784,789,793,798,803,808,812,816,820,824,828,832,837],{"type":36,"tag":368,"props":773,"children":774},{"style":391},[775],{"type":42,"value":648},{"type":36,"tag":368,"props":777,"children":778},{"style":651},[779],{"type":42,"value":654},{"type":36,"tag":368,"props":781,"children":782},{"style":391},[783],{"type":42,"value":97},{"type":36,"tag":368,"props":785,"children":786},{"style":651},[787],{"type":42,"value":788},"user",{"type":36,"tag":368,"props":790,"children":791},{"style":391},[792],{"type":42,"value":97},{"type":36,"tag":368,"props":794,"children":795},{"style":651},[796],{"type":42,"value":797},"first_name",{"type":36,"tag":368,"props":799,"children":800},{"style":391},[801],{"type":42,"value":802}," +",{"type":36,"tag":368,"props":804,"children":805},{"style":391},[806],{"type":42,"value":807}," '",{"type":36,"tag":368,"props":809,"children":810},{"style":391},[811],{"type":42,"value":807},{"type":36,"tag":368,"props":813,"children":814},{"style":391},[815],{"type":42,"value":802},{"type":36,"tag":368,"props":817,"children":818},{"style":651},[819],{"type":42,"value":654},{"type":36,"tag":368,"props":821,"children":822},{"style":391},[823],{"type":42,"value":97},{"type":36,"tag":368,"props":825,"children":826},{"style":651},[827],{"type":42,"value":788},{"type":36,"tag":368,"props":829,"children":830},{"style":391},[831],{"type":42,"value":97},{"type":36,"tag":368,"props":833,"children":834},{"style":651},[835],{"type":42,"value":836},"last_name",{"type":36,"tag":368,"props":838,"children":839},{"style":391},[840],{"type":42,"value":767},{"type":36,"tag":368,"props":842,"children":844},{"class":370,"line":843},5,[845,849,853,858,863,867,871,875,879,884,888,893,897,903,908,913,918,923,928,932,936,940,944,948,952,956,960,964,969,973,978,982,986,991,995,999,1003,1007,1011,1015,1019,1023,1027,1032,1036,1041,1045,1050],{"type":36,"tag":368,"props":846,"children":847},{"style":391},[848],{"type":42,"value":648},{"type":36,"tag":368,"props":850,"children":851},{"style":391},[852],{"type":42,"value":399},{"type":36,"tag":368,"props":854,"children":855},{"style":402},[856],{"type":42,"value":857},"(",{"type":36,"tag":368,"props":859,"children":860},{"style":391},[861],{"type":42,"value":862},"${",{"type":36,"tag":368,"props":864,"children":865},{"style":651},[866],{"type":42,"value":64},{"type":36,"tag":368,"props":868,"children":869},{"style":391},[870],{"type":42,"value":97},{"type":36,"tag":368,"props":872,"children":873},{"style":651},[874],{"type":42,"value":788},{"type":36,"tag":368,"props":876,"children":877},{"style":391},[878],{"type":42,"value":97},{"type":36,"tag":368,"props":880,"children":881},{"style":651},[882],{"type":42,"value":883},"phone",{"type":36,"tag":368,"props":885,"children":886},{"style":391},[887],{"type":42,"value":97},{"type":36,"tag":368,"props":889,"children":890},{"style":669},[891],{"type":42,"value":892},"slice",{"type":36,"tag":368,"props":894,"children":895},{"style":651},[896],{"type":42,"value":857},{"type":36,"tag":368,"props":898,"children":900},{"style":899},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[901],{"type":42,"value":902},"0",{"type":36,"tag":368,"props":904,"children":905},{"style":391},[906],{"type":42,"value":907},",",{"type":36,"tag":368,"props":909,"children":910},{"style":899},[911],{"type":42,"value":912}," 3",{"type":36,"tag":368,"props":914,"children":915},{"style":651},[916],{"type":42,"value":917},")",{"type":36,"tag":368,"props":919,"children":920},{"style":391},[921],{"type":42,"value":922},"}",{"type":36,"tag":368,"props":924,"children":925},{"style":402},[926],{"type":42,"value":927},") ",{"type":36,"tag":368,"props":929,"children":930},{"style":391},[931],{"type":42,"value":862},{"type":36,"tag":368,"props":933,"children":934},{"style":651},[935],{"type":42,"value":64},{"type":36,"tag":368,"props":937,"children":938},{"style":391},[939],{"type":42,"value":97},{"type":36,"tag":368,"props":941,"children":942},{"style":651},[943],{"type":42,"value":788},{"type":36,"tag":368,"props":945,"children":946},{"style":391},[947],{"type":42,"value":97},{"type":36,"tag":368,"props":949,"children":950},{"style":651},[951],{"type":42,"value":883},{"type":36,"tag":368,"props":953,"children":954},{"style":391},[955],{"type":42,"value":97},{"type":36,"tag":368,"props":957,"children":958},{"style":669},[959],{"type":42,"value":892},{"type":36,"tag":368,"props":961,"children":962},{"style":651},[963],{"type":42,"value":857},{"type":36,"tag":368,"props":965,"children":966},{"style":899},[967],{"type":42,"value":968},"3",{"type":36,"tag":368,"props":970,"children":971},{"style":391},[972],{"type":42,"value":907},{"type":36,"tag":368,"props":974,"children":975},{"style":899},[976],{"type":42,"value":977}," 6",{"type":36,"tag":368,"props":979,"children":980},{"style":651},[981],{"type":42,"value":917},{"type":36,"tag":368,"props":983,"children":984},{"style":391},[985],{"type":42,"value":922},{"type":36,"tag":368,"props":987,"children":988},{"style":402},[989],{"type":42,"value":990},"-",{"type":36,"tag":368,"props":992,"children":993},{"style":391},[994],{"type":42,"value":862},{"type":36,"tag":368,"props":996,"children":997},{"style":651},[998],{"type":42,"value":64},{"type":36,"tag":368,"props":1000,"children":1001},{"style":391},[1002],{"type":42,"value":97},{"type":36,"tag":368,"props":1004,"children":1005},{"style":651},[1006],{"type":42,"value":788},{"type":36,"tag":368,"props":1008,"children":1009},{"style":391},[1010],{"type":42,"value":97},{"type":36,"tag":368,"props":1012,"children":1013},{"style":651},[1014],{"type":42,"value":883},{"type":36,"tag":368,"props":1016,"children":1017},{"style":391},[1018],{"type":42,"value":97},{"type":36,"tag":368,"props":1020,"children":1021},{"style":669},[1022],{"type":42,"value":892},{"type":36,"tag":368,"props":1024,"children":1025},{"style":651},[1026],{"type":42,"value":857},{"type":36,"tag":368,"props":1028,"children":1029},{"style":899},[1030],{"type":42,"value":1031},"6",{"type":36,"tag":368,"props":1033,"children":1034},{"style":391},[1035],{"type":42,"value":907},{"type":36,"tag":368,"props":1037,"children":1038},{"style":899},[1039],{"type":42,"value":1040}," 10",{"type":36,"tag":368,"props":1042,"children":1043},{"style":651},[1044],{"type":42,"value":917},{"type":36,"tag":368,"props":1046,"children":1047},{"style":391},[1048],{"type":42,"value":1049},"}`",{"type":36,"tag":368,"props":1051,"children":1052},{"style":391},[1053],{"type":42,"value":767},{"type":36,"tag":583,"props":1055,"children":1057},{"id":1056},"method-chains-map-filter-find-reduce",[1058,1060,1066,1068,1074,1075,1081,1082],{"type":42,"value":1059},"Method chains: ",{"type":36,"tag":51,"props":1061,"children":1063},{"className":1062},[],[1064],{"type":42,"value":1065},".map()",{"type":42,"value":1067},", ",{"type":36,"tag":51,"props":1069,"children":1071},{"className":1070},[],[1072],{"type":42,"value":1073},".filter()",{"type":42,"value":1067},{"type":36,"tag":51,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":42,"value":1080},".find()",{"type":42,"value":1067},{"type":36,"tag":51,"props":1083,"children":1085},{"className":1084},[],[1086],{"type":42,"value":1087},".reduce()",{"type":36,"tag":45,"props":1089,"children":1090},{},[1091],{"type":42,"value":1092},"Array methods are some of the most useful expression tools. They replace dozens of nodes.",{"type":36,"tag":312,"props":1094,"children":1096},{"className":360,"code":1095,"language":362,"meta":320,"style":320},"{{ $json.tags.filter(tag => tag.active).map(tag => tag.name).join(', ') }}\n{{ Object.values($json.scores).reduce((sum, score) => sum + score, 0) }}\n\n\u002F\u002F Find one matching item from another node's output\n{{ $('Get Models').all().find(model => model.json.id === $json.modelId).json.modelName }}\n\n\u002F\u002F Filter array, then check shape\n{{\n  $('Get User\\'s Entries').all()\n    .map(item => item.json)\n    .filter(entry => entry.prize_eligible === 'eligible')\n    .length > 0\n}}\n",[1097],{"type":36,"tag":51,"props":1098,"children":1099},{"__ignoreMap":320},[1100,1233,1344,1353,1361,1495,1503,1512,1521,1574,1618,1678,1700],{"type":36,"tag":368,"props":1101,"children":1102},{"class":370,"line":371},[1103,1107,1111,1115,1120,1124,1129,1133,1138,1144,1149,1153,1158,1162,1166,1171,1175,1179,1183,1187,1191,1195,1199,1203,1208,1212,1217,1221,1225,1229],{"type":36,"tag":368,"props":1104,"children":1105},{"style":391},[1106],{"type":42,"value":648},{"type":36,"tag":368,"props":1108,"children":1109},{"style":651},[1110],{"type":42,"value":654},{"type":36,"tag":368,"props":1112,"children":1113},{"style":391},[1114],{"type":42,"value":97},{"type":36,"tag":368,"props":1116,"children":1117},{"style":651},[1118],{"type":42,"value":1119},"tags",{"type":36,"tag":368,"props":1121,"children":1122},{"style":391},[1123],{"type":42,"value":97},{"type":36,"tag":368,"props":1125,"children":1126},{"style":669},[1127],{"type":42,"value":1128},"filter",{"type":36,"tag":368,"props":1130,"children":1131},{"style":675},[1132],{"type":42,"value":857},{"type":36,"tag":368,"props":1134,"children":1136},{"style":1135},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1137],{"type":42,"value":13},{"type":36,"tag":368,"props":1139,"children":1141},{"style":1140},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1142],{"type":42,"value":1143}," =>",{"type":36,"tag":368,"props":1145,"children":1146},{"style":651},[1147],{"type":42,"value":1148}," tag",{"type":36,"tag":368,"props":1150,"children":1151},{"style":391},[1152],{"type":42,"value":97},{"type":36,"tag":368,"props":1154,"children":1155},{"style":651},[1156],{"type":42,"value":1157},"active",{"type":36,"tag":368,"props":1159,"children":1160},{"style":675},[1161],{"type":42,"value":917},{"type":36,"tag":368,"props":1163,"children":1164},{"style":391},[1165],{"type":42,"value":97},{"type":36,"tag":368,"props":1167,"children":1168},{"style":669},[1169],{"type":42,"value":1170},"map",{"type":36,"tag":368,"props":1172,"children":1173},{"style":675},[1174],{"type":42,"value":857},{"type":36,"tag":368,"props":1176,"children":1177},{"style":1135},[1178],{"type":42,"value":13},{"type":36,"tag":368,"props":1180,"children":1181},{"style":1140},[1182],{"type":42,"value":1143},{"type":36,"tag":368,"props":1184,"children":1185},{"style":651},[1186],{"type":42,"value":1148},{"type":36,"tag":368,"props":1188,"children":1189},{"style":391},[1190],{"type":42,"value":97},{"type":36,"tag":368,"props":1192,"children":1193},{"style":651},[1194],{"type":42,"value":388},{"type":36,"tag":368,"props":1196,"children":1197},{"style":675},[1198],{"type":42,"value":917},{"type":36,"tag":368,"props":1200,"children":1201},{"style":391},[1202],{"type":42,"value":97},{"type":36,"tag":368,"props":1204,"children":1205},{"style":669},[1206],{"type":42,"value":1207},"join",{"type":36,"tag":368,"props":1209,"children":1210},{"style":675},[1211],{"type":42,"value":857},{"type":36,"tag":368,"props":1213,"children":1214},{"style":391},[1215],{"type":42,"value":1216},"'",{"type":36,"tag":368,"props":1218,"children":1219},{"style":402},[1220],{"type":42,"value":1067},{"type":36,"tag":368,"props":1222,"children":1223},{"style":391},[1224],{"type":42,"value":1216},{"type":36,"tag":368,"props":1226,"children":1227},{"style":675},[1228],{"type":42,"value":927},{"type":36,"tag":368,"props":1230,"children":1231},{"style":391},[1232],{"type":42,"value":683},{"type":36,"tag":368,"props":1234,"children":1235},{"class":370,"line":381},[1236,1240,1245,1249,1254,1258,1262,1266,1271,1275,1279,1284,1288,1292,1297,1301,1306,1310,1314,1319,1323,1327,1331,1336,1340],{"type":36,"tag":368,"props":1237,"children":1238},{"style":391},[1239],{"type":42,"value":648},{"type":36,"tag":368,"props":1241,"children":1242},{"style":651},[1243],{"type":42,"value":1244}," Object",{"type":36,"tag":368,"props":1246,"children":1247},{"style":391},[1248],{"type":42,"value":97},{"type":36,"tag":368,"props":1250,"children":1251},{"style":669},[1252],{"type":42,"value":1253},"values",{"type":36,"tag":368,"props":1255,"children":1256},{"style":675},[1257],{"type":42,"value":857},{"type":36,"tag":368,"props":1259,"children":1260},{"style":651},[1261],{"type":42,"value":64},{"type":36,"tag":368,"props":1263,"children":1264},{"style":391},[1265],{"type":42,"value":97},{"type":36,"tag":368,"props":1267,"children":1268},{"style":651},[1269],{"type":42,"value":1270},"scores",{"type":36,"tag":368,"props":1272,"children":1273},{"style":675},[1274],{"type":42,"value":917},{"type":36,"tag":368,"props":1276,"children":1277},{"style":391},[1278],{"type":42,"value":97},{"type":36,"tag":368,"props":1280,"children":1281},{"style":669},[1282],{"type":42,"value":1283},"reduce",{"type":36,"tag":368,"props":1285,"children":1286},{"style":675},[1287],{"type":42,"value":857},{"type":36,"tag":368,"props":1289,"children":1290},{"style":391},[1291],{"type":42,"value":857},{"type":36,"tag":368,"props":1293,"children":1294},{"style":1135},[1295],{"type":42,"value":1296},"sum",{"type":36,"tag":368,"props":1298,"children":1299},{"style":391},[1300],{"type":42,"value":907},{"type":36,"tag":368,"props":1302,"children":1303},{"style":1135},[1304],{"type":42,"value":1305}," score",{"type":36,"tag":368,"props":1307,"children":1308},{"style":391},[1309],{"type":42,"value":917},{"type":36,"tag":368,"props":1311,"children":1312},{"style":1140},[1313],{"type":42,"value":1143},{"type":36,"tag":368,"props":1315,"children":1316},{"style":651},[1317],{"type":42,"value":1318}," sum",{"type":36,"tag":368,"props":1320,"children":1321},{"style":391},[1322],{"type":42,"value":802},{"type":36,"tag":368,"props":1324,"children":1325},{"style":651},[1326],{"type":42,"value":1305},{"type":36,"tag":368,"props":1328,"children":1329},{"style":391},[1330],{"type":42,"value":907},{"type":36,"tag":368,"props":1332,"children":1333},{"style":899},[1334],{"type":42,"value":1335}," 0",{"type":36,"tag":368,"props":1337,"children":1338},{"style":675},[1339],{"type":42,"value":927},{"type":36,"tag":368,"props":1341,"children":1342},{"style":391},[1343],{"type":42,"value":683},{"type":36,"tag":368,"props":1345,"children":1346},{"class":370,"line":413},[1347],{"type":36,"tag":368,"props":1348,"children":1350},{"emptyLinePlaceholder":1349},true,[1351],{"type":42,"value":1352},"\n",{"type":36,"tag":368,"props":1354,"children":1355},{"class":370,"line":770},[1356],{"type":36,"tag":368,"props":1357,"children":1358},{"style":375},[1359],{"type":42,"value":1360},"\u002F\u002F Find one matching item from another node's output\n",{"type":36,"tag":368,"props":1362,"children":1363},{"class":370,"line":843},[1364,1368,1373,1377,1381,1386,1390,1394,1398,1403,1407,1411,1416,1420,1425,1429,1434,1438,1443,1447,1452,1457,1461,1465,1470,1474,1478,1482,1486,1491],{"type":36,"tag":368,"props":1365,"children":1366},{"style":391},[1367],{"type":42,"value":648},{"type":36,"tag":368,"props":1369,"children":1370},{"style":669},[1371],{"type":42,"value":1372}," $",{"type":36,"tag":368,"props":1374,"children":1375},{"style":675},[1376],{"type":42,"value":857},{"type":36,"tag":368,"props":1378,"children":1379},{"style":391},[1380],{"type":42,"value":1216},{"type":36,"tag":368,"props":1382,"children":1383},{"style":402},[1384],{"type":42,"value":1385},"Get Models",{"type":36,"tag":368,"props":1387,"children":1388},{"style":391},[1389],{"type":42,"value":1216},{"type":36,"tag":368,"props":1391,"children":1392},{"style":675},[1393],{"type":42,"value":917},{"type":36,"tag":368,"props":1395,"children":1396},{"style":391},[1397],{"type":42,"value":97},{"type":36,"tag":368,"props":1399,"children":1400},{"style":669},[1401],{"type":42,"value":1402},"all",{"type":36,"tag":368,"props":1404,"children":1405},{"style":675},[1406],{"type":42,"value":716},{"type":36,"tag":368,"props":1408,"children":1409},{"style":391},[1410],{"type":42,"value":97},{"type":36,"tag":368,"props":1412,"children":1413},{"style":669},[1414],{"type":42,"value":1415},"find",{"type":36,"tag":368,"props":1417,"children":1418},{"style":675},[1419],{"type":42,"value":857},{"type":36,"tag":368,"props":1421,"children":1422},{"style":1135},[1423],{"type":42,"value":1424},"model",{"type":36,"tag":368,"props":1426,"children":1427},{"style":1140},[1428],{"type":42,"value":1143},{"type":36,"tag":368,"props":1430,"children":1431},{"style":651},[1432],{"type":42,"value":1433}," model",{"type":36,"tag":368,"props":1435,"children":1436},{"style":391},[1437],{"type":42,"value":97},{"type":36,"tag":368,"props":1439,"children":1440},{"style":651},[1441],{"type":42,"value":1442},"json",{"type":36,"tag":368,"props":1444,"children":1445},{"style":391},[1446],{"type":42,"value":97},{"type":36,"tag":368,"props":1448,"children":1449},{"style":651},[1450],{"type":42,"value":1451},"id",{"type":36,"tag":368,"props":1453,"children":1454},{"style":391},[1455],{"type":42,"value":1456}," ===",{"type":36,"tag":368,"props":1458,"children":1459},{"style":651},[1460],{"type":42,"value":654},{"type":36,"tag":368,"props":1462,"children":1463},{"style":391},[1464],{"type":42,"value":97},{"type":36,"tag":368,"props":1466,"children":1467},{"style":651},[1468],{"type":42,"value":1469},"modelId",{"type":36,"tag":368,"props":1471,"children":1472},{"style":675},[1473],{"type":42,"value":917},{"type":36,"tag":368,"props":1475,"children":1476},{"style":391},[1477],{"type":42,"value":97},{"type":36,"tag":368,"props":1479,"children":1480},{"style":651},[1481],{"type":42,"value":1442},{"type":36,"tag":368,"props":1483,"children":1484},{"style":391},[1485],{"type":42,"value":97},{"type":36,"tag":368,"props":1487,"children":1488},{"style":651},[1489],{"type":42,"value":1490},"modelName",{"type":36,"tag":368,"props":1492,"children":1493},{"style":391},[1494],{"type":42,"value":767},{"type":36,"tag":368,"props":1496,"children":1498},{"class":370,"line":1497},6,[1499],{"type":36,"tag":368,"props":1500,"children":1501},{"emptyLinePlaceholder":1349},[1502],{"type":42,"value":1352},{"type":36,"tag":368,"props":1504,"children":1506},{"class":370,"line":1505},7,[1507],{"type":36,"tag":368,"props":1508,"children":1509},{"style":375},[1510],{"type":42,"value":1511},"\u002F\u002F Filter array, then check shape\n",{"type":36,"tag":368,"props":1513,"children":1515},{"class":370,"line":1514},8,[1516],{"type":36,"tag":368,"props":1517,"children":1518},{"style":391},[1519],{"type":42,"value":1520},"{{\n",{"type":36,"tag":368,"props":1522,"children":1524},{"class":370,"line":1523},9,[1525,1530,1534,1538,1543,1548,1553,1557,1561,1565,1569],{"type":36,"tag":368,"props":1526,"children":1527},{"style":669},[1528],{"type":42,"value":1529},"  $",{"type":36,"tag":368,"props":1531,"children":1532},{"style":675},[1533],{"type":42,"value":857},{"type":36,"tag":368,"props":1535,"children":1536},{"style":391},[1537],{"type":42,"value":1216},{"type":36,"tag":368,"props":1539,"children":1540},{"style":402},[1541],{"type":42,"value":1542},"Get User",{"type":36,"tag":368,"props":1544,"children":1545},{"style":651},[1546],{"type":42,"value":1547},"\\'",{"type":36,"tag":368,"props":1549,"children":1550},{"style":402},[1551],{"type":42,"value":1552},"s Entries",{"type":36,"tag":368,"props":1554,"children":1555},{"style":391},[1556],{"type":42,"value":1216},{"type":36,"tag":368,"props":1558,"children":1559},{"style":675},[1560],{"type":42,"value":917},{"type":36,"tag":368,"props":1562,"children":1563},{"style":391},[1564],{"type":42,"value":97},{"type":36,"tag":368,"props":1566,"children":1567},{"style":669},[1568],{"type":42,"value":1402},{"type":36,"tag":368,"props":1570,"children":1571},{"style":675},[1572],{"type":42,"value":1573},"()\n",{"type":36,"tag":368,"props":1575,"children":1577},{"class":370,"line":1576},10,[1578,1583,1587,1591,1596,1600,1605,1609,1613],{"type":36,"tag":368,"props":1579,"children":1580},{"style":391},[1581],{"type":42,"value":1582},"    .",{"type":36,"tag":368,"props":1584,"children":1585},{"style":669},[1586],{"type":42,"value":1170},{"type":36,"tag":368,"props":1588,"children":1589},{"style":675},[1590],{"type":42,"value":857},{"type":36,"tag":368,"props":1592,"children":1593},{"style":1135},[1594],{"type":42,"value":1595},"item",{"type":36,"tag":368,"props":1597,"children":1598},{"style":1140},[1599],{"type":42,"value":1143},{"type":36,"tag":368,"props":1601,"children":1602},{"style":651},[1603],{"type":42,"value":1604}," item",{"type":36,"tag":368,"props":1606,"children":1607},{"style":391},[1608],{"type":42,"value":97},{"type":36,"tag":368,"props":1610,"children":1611},{"style":651},[1612],{"type":42,"value":1442},{"type":36,"tag":368,"props":1614,"children":1615},{"style":675},[1616],{"type":42,"value":1617},")\n",{"type":36,"tag":368,"props":1619,"children":1621},{"class":370,"line":1620},11,[1622,1626,1630,1634,1639,1643,1648,1652,1657,1661,1665,1670,1674],{"type":36,"tag":368,"props":1623,"children":1624},{"style":391},[1625],{"type":42,"value":1582},{"type":36,"tag":368,"props":1627,"children":1628},{"style":669},[1629],{"type":42,"value":1128},{"type":36,"tag":368,"props":1631,"children":1632},{"style":675},[1633],{"type":42,"value":857},{"type":36,"tag":368,"props":1635,"children":1636},{"style":1135},[1637],{"type":42,"value":1638},"entry",{"type":36,"tag":368,"props":1640,"children":1641},{"style":1140},[1642],{"type":42,"value":1143},{"type":36,"tag":368,"props":1644,"children":1645},{"style":651},[1646],{"type":42,"value":1647}," entry",{"type":36,"tag":368,"props":1649,"children":1650},{"style":391},[1651],{"type":42,"value":97},{"type":36,"tag":368,"props":1653,"children":1654},{"style":651},[1655],{"type":42,"value":1656},"prize_eligible",{"type":36,"tag":368,"props":1658,"children":1659},{"style":391},[1660],{"type":42,"value":1456},{"type":36,"tag":368,"props":1662,"children":1663},{"style":391},[1664],{"type":42,"value":807},{"type":36,"tag":368,"props":1666,"children":1667},{"style":402},[1668],{"type":42,"value":1669},"eligible",{"type":36,"tag":368,"props":1671,"children":1672},{"style":391},[1673],{"type":42,"value":1216},{"type":36,"tag":368,"props":1675,"children":1676},{"style":675},[1677],{"type":42,"value":1617},{"type":36,"tag":368,"props":1679,"children":1681},{"class":370,"line":1680},12,[1682,1686,1690,1695],{"type":36,"tag":368,"props":1683,"children":1684},{"style":391},[1685],{"type":42,"value":1582},{"type":36,"tag":368,"props":1687,"children":1688},{"style":651},[1689],{"type":42,"value":762},{"type":36,"tag":368,"props":1691,"children":1692},{"style":391},[1693],{"type":42,"value":1694}," >",{"type":36,"tag":368,"props":1696,"children":1697},{"style":899},[1698],{"type":42,"value":1699}," 0\n",{"type":36,"tag":368,"props":1701,"children":1703},{"class":370,"line":1702},13,[1704],{"type":36,"tag":368,"props":1705,"children":1706},{"style":391},[1707],{"type":42,"value":683},{"type":36,"tag":1709,"props":1710,"children":1712},"h4",{"id":1711},"always-indent-multi-step-chains-and-add-comments",[1713],{"type":42,"value":1714},"Always indent multi-step chains and add comments",{"type":36,"tag":45,"props":1716,"children":1717},{},[1718],{"type":42,"value":1719},"When a chain has 2+ method calls or non-obvious filter logic, format it across lines and comment. Readers may not be the author, so comments make intent legible to non-technical readers too.",{"type":36,"tag":312,"props":1721,"children":1723},{"className":360,"code":1722,"language":362,"meta":320,"style":320},"{{\n  \u002F\u002F Find all entries that are still processing AFTER 1 hour\n  \u002F\u002F (used to allow re-submission since something likely went wrong)\n  $('Get User\\'s Entries').all()\n    .map(item => item.json)\n    .filter(entry =>\n      entry.prize_eligible === 'processing' &&\n      $now.diffTo(entry.created_at, 'minutes') > 60\n    )\n    .length > 0\n}}\n",[1724],{"type":36,"tag":51,"props":1725,"children":1726},{"__ignoreMap":320},[1727,1734,1742,1750,1797,1836,1860,1898,1963,1971,1990],{"type":36,"tag":368,"props":1728,"children":1729},{"class":370,"line":371},[1730],{"type":36,"tag":368,"props":1731,"children":1732},{"style":391},[1733],{"type":42,"value":1520},{"type":36,"tag":368,"props":1735,"children":1736},{"class":370,"line":381},[1737],{"type":36,"tag":368,"props":1738,"children":1739},{"style":375},[1740],{"type":42,"value":1741},"  \u002F\u002F Find all entries that are still processing AFTER 1 hour\n",{"type":36,"tag":368,"props":1743,"children":1744},{"class":370,"line":413},[1745],{"type":36,"tag":368,"props":1746,"children":1747},{"style":375},[1748],{"type":42,"value":1749},"  \u002F\u002F (used to allow re-submission since something likely went wrong)\n",{"type":36,"tag":368,"props":1751,"children":1752},{"class":370,"line":770},[1753,1757,1761,1765,1769,1773,1777,1781,1785,1789,1793],{"type":36,"tag":368,"props":1754,"children":1755},{"style":669},[1756],{"type":42,"value":1529},{"type":36,"tag":368,"props":1758,"children":1759},{"style":675},[1760],{"type":42,"value":857},{"type":36,"tag":368,"props":1762,"children":1763},{"style":391},[1764],{"type":42,"value":1216},{"type":36,"tag":368,"props":1766,"children":1767},{"style":402},[1768],{"type":42,"value":1542},{"type":36,"tag":368,"props":1770,"children":1771},{"style":651},[1772],{"type":42,"value":1547},{"type":36,"tag":368,"props":1774,"children":1775},{"style":402},[1776],{"type":42,"value":1552},{"type":36,"tag":368,"props":1778,"children":1779},{"style":391},[1780],{"type":42,"value":1216},{"type":36,"tag":368,"props":1782,"children":1783},{"style":675},[1784],{"type":42,"value":917},{"type":36,"tag":368,"props":1786,"children":1787},{"style":391},[1788],{"type":42,"value":97},{"type":36,"tag":368,"props":1790,"children":1791},{"style":669},[1792],{"type":42,"value":1402},{"type":36,"tag":368,"props":1794,"children":1795},{"style":675},[1796],{"type":42,"value":1573},{"type":36,"tag":368,"props":1798,"children":1799},{"class":370,"line":843},[1800,1804,1808,1812,1816,1820,1824,1828,1832],{"type":36,"tag":368,"props":1801,"children":1802},{"style":391},[1803],{"type":42,"value":1582},{"type":36,"tag":368,"props":1805,"children":1806},{"style":669},[1807],{"type":42,"value":1170},{"type":36,"tag":368,"props":1809,"children":1810},{"style":675},[1811],{"type":42,"value":857},{"type":36,"tag":368,"props":1813,"children":1814},{"style":1135},[1815],{"type":42,"value":1595},{"type":36,"tag":368,"props":1817,"children":1818},{"style":1140},[1819],{"type":42,"value":1143},{"type":36,"tag":368,"props":1821,"children":1822},{"style":651},[1823],{"type":42,"value":1604},{"type":36,"tag":368,"props":1825,"children":1826},{"style":391},[1827],{"type":42,"value":97},{"type":36,"tag":368,"props":1829,"children":1830},{"style":651},[1831],{"type":42,"value":1442},{"type":36,"tag":368,"props":1833,"children":1834},{"style":675},[1835],{"type":42,"value":1617},{"type":36,"tag":368,"props":1837,"children":1838},{"class":370,"line":1497},[1839,1843,1847,1851,1855],{"type":36,"tag":368,"props":1840,"children":1841},{"style":391},[1842],{"type":42,"value":1582},{"type":36,"tag":368,"props":1844,"children":1845},{"style":669},[1846],{"type":42,"value":1128},{"type":36,"tag":368,"props":1848,"children":1849},{"style":675},[1850],{"type":42,"value":857},{"type":36,"tag":368,"props":1852,"children":1853},{"style":1135},[1854],{"type":42,"value":1638},{"type":36,"tag":368,"props":1856,"children":1857},{"style":1140},[1858],{"type":42,"value":1859}," =>\n",{"type":36,"tag":368,"props":1861,"children":1862},{"class":370,"line":1505},[1863,1868,1872,1876,1880,1884,1889,1893],{"type":36,"tag":368,"props":1864,"children":1865},{"style":651},[1866],{"type":42,"value":1867},"      entry",{"type":36,"tag":368,"props":1869,"children":1870},{"style":391},[1871],{"type":42,"value":97},{"type":36,"tag":368,"props":1873,"children":1874},{"style":651},[1875],{"type":42,"value":1656},{"type":36,"tag":368,"props":1877,"children":1878},{"style":391},[1879],{"type":42,"value":1456},{"type":36,"tag":368,"props":1881,"children":1882},{"style":391},[1883],{"type":42,"value":807},{"type":36,"tag":368,"props":1885,"children":1886},{"style":402},[1887],{"type":42,"value":1888},"processing",{"type":36,"tag":368,"props":1890,"children":1891},{"style":391},[1892],{"type":42,"value":1216},{"type":36,"tag":368,"props":1894,"children":1895},{"style":391},[1896],{"type":42,"value":1897}," &&\n",{"type":36,"tag":368,"props":1899,"children":1900},{"class":370,"line":1514},[1901,1906,1910,1915,1919,1923,1927,1932,1936,1940,1945,1949,1953,1958],{"type":36,"tag":368,"props":1902,"children":1903},{"style":651},[1904],{"type":42,"value":1905},"      $now",{"type":36,"tag":368,"props":1907,"children":1908},{"style":391},[1909],{"type":42,"value":97},{"type":36,"tag":368,"props":1911,"children":1912},{"style":669},[1913],{"type":42,"value":1914},"diffTo",{"type":36,"tag":368,"props":1916,"children":1917},{"style":675},[1918],{"type":42,"value":857},{"type":36,"tag":368,"props":1920,"children":1921},{"style":651},[1922],{"type":42,"value":1638},{"type":36,"tag":368,"props":1924,"children":1925},{"style":391},[1926],{"type":42,"value":97},{"type":36,"tag":368,"props":1928,"children":1929},{"style":651},[1930],{"type":42,"value":1931},"created_at",{"type":36,"tag":368,"props":1933,"children":1934},{"style":391},[1935],{"type":42,"value":907},{"type":36,"tag":368,"props":1937,"children":1938},{"style":391},[1939],{"type":42,"value":807},{"type":36,"tag":368,"props":1941,"children":1942},{"style":402},[1943],{"type":42,"value":1944},"minutes",{"type":36,"tag":368,"props":1946,"children":1947},{"style":391},[1948],{"type":42,"value":1216},{"type":36,"tag":368,"props":1950,"children":1951},{"style":675},[1952],{"type":42,"value":927},{"type":36,"tag":368,"props":1954,"children":1955},{"style":391},[1956],{"type":42,"value":1957},">",{"type":36,"tag":368,"props":1959,"children":1960},{"style":899},[1961],{"type":42,"value":1962}," 60\n",{"type":36,"tag":368,"props":1964,"children":1965},{"class":370,"line":1523},[1966],{"type":36,"tag":368,"props":1967,"children":1968},{"style":675},[1969],{"type":42,"value":1970},"    )\n",{"type":36,"tag":368,"props":1972,"children":1973},{"class":370,"line":1576},[1974,1978,1982,1986],{"type":36,"tag":368,"props":1975,"children":1976},{"style":391},[1977],{"type":42,"value":1582},{"type":36,"tag":368,"props":1979,"children":1980},{"style":651},[1981],{"type":42,"value":762},{"type":36,"tag":368,"props":1983,"children":1984},{"style":391},[1985],{"type":42,"value":1694},{"type":36,"tag":368,"props":1987,"children":1988},{"style":899},[1989],{"type":42,"value":1699},{"type":36,"tag":368,"props":1991,"children":1992},{"class":370,"line":1620},[1993],{"type":36,"tag":368,"props":1994,"children":1995},{"style":391},[1996],{"type":42,"value":683},{"type":36,"tag":45,"props":1998,"children":1999},{},[2000],{"type":42,"value":2001},"This kind of logic is common in routing nodes (Switch, IF). Un-commented, it's unreadable for most users.",{"type":36,"tag":1709,"props":2003,"children":2005},{"id":2004},"allmap-triggers-an-execute-once-question",[2006,2012],{"type":36,"tag":51,"props":2007,"children":2009},{"className":2008},[],[2010],{"type":42,"value":2011},".all().map()",{"type":42,"value":2013}," triggers an \"execute once\" question",{"type":36,"tag":45,"props":2015,"children":2016},{},[2017,2019,2025,2026,2031,2032,2037,2039,2044,2046,2051,2053,2059],{"type":42,"value":2018},"When you use ",{"type":36,"tag":51,"props":2020,"children":2022},{"className":2021},[],[2023],{"type":42,"value":2024},"$('Source Node').all().map(...)",{"type":42,"value":107},{"type":36,"tag":51,"props":2027,"children":2029},{"className":2028},[],[2030],{"type":42,"value":1073},{"type":42,"value":1067},{"type":36,"tag":51,"props":2033,"children":2035},{"className":2034},[],[2036],{"type":42,"value":1087},{"type":42,"value":2038},") to process the entire dataset, the ",{"type":36,"tag":86,"props":2040,"children":2041},{},[2042],{"type":42,"value":2043},"expression itself iterates",{"type":42,"value":2045},". If the node has the default per-item execution mode, it runs once ",{"type":36,"tag":173,"props":2047,"children":2048},{},[2049],{"type":42,"value":2050},"per input item",{"type":42,"value":2052},", but each run does the full ",{"type":36,"tag":51,"props":2054,"children":2056},{"className":2055},[],[2057],{"type":42,"value":2058},".all()",{"type":42,"value":2060}," aggregation: wasted work, and possibly wrong.",{"type":36,"tag":45,"props":2062,"children":2063},{},[2064],{"type":36,"tag":86,"props":2065,"children":2066},{},[2067],{"type":42,"value":2068},"Set the node to execute once when:",{"type":36,"tag":130,"props":2070,"children":2071},{},[2072,2098],{"type":36,"tag":134,"props":2073,"children":2074},{},[2075,2077,2082,2084,2090,2091,2097],{"type":42,"value":2076},"The expression uses ",{"type":36,"tag":51,"props":2078,"children":2080},{"className":2079},[],[2081],{"type":42,"value":2011},{"type":42,"value":2083}," \u002F ",{"type":36,"tag":51,"props":2085,"children":2087},{"className":2086},[],[2088],{"type":42,"value":2089},".all().filter()",{"type":42,"value":2083},{"type":36,"tag":51,"props":2092,"children":2094},{"className":2093},[],[2095],{"type":42,"value":2096},".all().reduce()",{"type":42,"value":97},{"type":36,"tag":134,"props":2099,"children":2100},{},[2101],{"type":42,"value":2102},"Output should be a single aggregated result, not per-item.",{"type":36,"tag":45,"props":2104,"children":2105},{},[2106,2108,2114],{"type":42,"value":2107},"This is ",{"type":36,"tag":51,"props":2109,"children":2111},{"className":2110},[],[2112],{"type":42,"value":2113},"executeOnce: true",{"type":42,"value":2115}," on the node. Most nodes have it.",{"type":36,"tag":312,"props":2117,"children":2119},{"className":360,"code":2118,"language":362,"meta":320,"style":320},"const aggregateNode = node({\n    type: 'n8n-nodes-base.set',\n    config: {\n        executeOnce: true,            \u002F\u002F important when using .all() in expressions\n        parameters: {\n            assignments: {\n                assignments: [\n                    {\n                        name: 'totalEligible',\n                        value: `={{\n                            $('Get Entries').all()\n                                .map(item => item.json)\n                                .filter(entry => entry.eligible)\n                                .length\n                        }}`,\n                        type: 'number',\n                    },\n                ],\n            },\n        },\n    },\n})\n",[2120],{"type":36,"tag":51,"props":2121,"children":2122},{"__ignoreMap":320},[2123,2155,2185,2202,2229,2245,2261,2278,2286,2315,2336,2344,2352,2360,2369,2387,2417,2426,2439,2448,2457,2466],{"type":36,"tag":368,"props":2124,"children":2125},{"class":370,"line":371},[2126,2131,2136,2141,2146,2150],{"type":36,"tag":368,"props":2127,"children":2128},{"style":1140},[2129],{"type":42,"value":2130},"const",{"type":36,"tag":368,"props":2132,"children":2133},{"style":651},[2134],{"type":42,"value":2135}," aggregateNode ",{"type":36,"tag":368,"props":2137,"children":2138},{"style":391},[2139],{"type":42,"value":2140},"=",{"type":36,"tag":368,"props":2142,"children":2143},{"style":669},[2144],{"type":42,"value":2145}," node",{"type":36,"tag":368,"props":2147,"children":2148},{"style":651},[2149],{"type":42,"value":857},{"type":36,"tag":368,"props":2151,"children":2152},{"style":391},[2153],{"type":42,"value":2154},"{\n",{"type":36,"tag":368,"props":2156,"children":2157},{"class":370,"line":381},[2158,2163,2167,2171,2176,2180],{"type":36,"tag":368,"props":2159,"children":2160},{"style":675},[2161],{"type":42,"value":2162},"    type",{"type":36,"tag":368,"props":2164,"children":2165},{"style":391},[2166],{"type":42,"value":394},{"type":36,"tag":368,"props":2168,"children":2169},{"style":391},[2170],{"type":42,"value":807},{"type":36,"tag":368,"props":2172,"children":2173},{"style":402},[2174],{"type":42,"value":2175},"n8n-nodes-base.set",{"type":36,"tag":368,"props":2177,"children":2178},{"style":391},[2179],{"type":42,"value":1216},{"type":36,"tag":368,"props":2181,"children":2182},{"style":391},[2183],{"type":42,"value":2184},",\n",{"type":36,"tag":368,"props":2186,"children":2187},{"class":370,"line":413},[2188,2193,2197],{"type":36,"tag":368,"props":2189,"children":2190},{"style":675},[2191],{"type":42,"value":2192},"    config",{"type":36,"tag":368,"props":2194,"children":2195},{"style":391},[2196],{"type":42,"value":394},{"type":36,"tag":368,"props":2198,"children":2199},{"style":391},[2200],{"type":42,"value":2201}," {\n",{"type":36,"tag":368,"props":2203,"children":2204},{"class":370,"line":770},[2205,2210,2214,2220,2224],{"type":36,"tag":368,"props":2206,"children":2207},{"style":675},[2208],{"type":42,"value":2209},"        executeOnce",{"type":36,"tag":368,"props":2211,"children":2212},{"style":391},[2213],{"type":42,"value":394},{"type":36,"tag":368,"props":2215,"children":2217},{"style":2216},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2218],{"type":42,"value":2219}," true",{"type":36,"tag":368,"props":2221,"children":2222},{"style":391},[2223],{"type":42,"value":907},{"type":36,"tag":368,"props":2225,"children":2226},{"style":375},[2227],{"type":42,"value":2228},"            \u002F\u002F important when using .all() in expressions\n",{"type":36,"tag":368,"props":2230,"children":2231},{"class":370,"line":843},[2232,2237,2241],{"type":36,"tag":368,"props":2233,"children":2234},{"style":675},[2235],{"type":42,"value":2236},"        parameters",{"type":36,"tag":368,"props":2238,"children":2239},{"style":391},[2240],{"type":42,"value":394},{"type":36,"tag":368,"props":2242,"children":2243},{"style":391},[2244],{"type":42,"value":2201},{"type":36,"tag":368,"props":2246,"children":2247},{"class":370,"line":1497},[2248,2253,2257],{"type":36,"tag":368,"props":2249,"children":2250},{"style":675},[2251],{"type":42,"value":2252},"            assignments",{"type":36,"tag":368,"props":2254,"children":2255},{"style":391},[2256],{"type":42,"value":394},{"type":36,"tag":368,"props":2258,"children":2259},{"style":391},[2260],{"type":42,"value":2201},{"type":36,"tag":368,"props":2262,"children":2263},{"class":370,"line":1505},[2264,2269,2273],{"type":36,"tag":368,"props":2265,"children":2266},{"style":675},[2267],{"type":42,"value":2268},"                assignments",{"type":36,"tag":368,"props":2270,"children":2271},{"style":391},[2272],{"type":42,"value":394},{"type":36,"tag":368,"props":2274,"children":2275},{"style":651},[2276],{"type":42,"value":2277}," [\n",{"type":36,"tag":368,"props":2279,"children":2280},{"class":370,"line":1514},[2281],{"type":36,"tag":368,"props":2282,"children":2283},{"style":391},[2284],{"type":42,"value":2285},"                    {\n",{"type":36,"tag":368,"props":2287,"children":2288},{"class":370,"line":1523},[2289,2294,2298,2302,2307,2311],{"type":36,"tag":368,"props":2290,"children":2291},{"style":675},[2292],{"type":42,"value":2293},"                        name",{"type":36,"tag":368,"props":2295,"children":2296},{"style":391},[2297],{"type":42,"value":394},{"type":36,"tag":368,"props":2299,"children":2300},{"style":391},[2301],{"type":42,"value":807},{"type":36,"tag":368,"props":2303,"children":2304},{"style":402},[2305],{"type":42,"value":2306},"totalEligible",{"type":36,"tag":368,"props":2308,"children":2309},{"style":391},[2310],{"type":42,"value":1216},{"type":36,"tag":368,"props":2312,"children":2313},{"style":391},[2314],{"type":42,"value":2184},{"type":36,"tag":368,"props":2316,"children":2317},{"class":370,"line":1576},[2318,2323,2327,2331],{"type":36,"tag":368,"props":2319,"children":2320},{"style":675},[2321],{"type":42,"value":2322},"                        value",{"type":36,"tag":368,"props":2324,"children":2325},{"style":391},[2326],{"type":42,"value":394},{"type":36,"tag":368,"props":2328,"children":2329},{"style":391},[2330],{"type":42,"value":399},{"type":36,"tag":368,"props":2332,"children":2333},{"style":402},[2334],{"type":42,"value":2335},"={{\n",{"type":36,"tag":368,"props":2337,"children":2338},{"class":370,"line":1620},[2339],{"type":36,"tag":368,"props":2340,"children":2341},{"style":402},[2342],{"type":42,"value":2343},"                            $('Get Entries').all()\n",{"type":36,"tag":368,"props":2345,"children":2346},{"class":370,"line":1680},[2347],{"type":36,"tag":368,"props":2348,"children":2349},{"style":402},[2350],{"type":42,"value":2351},"                                .map(item => item.json)\n",{"type":36,"tag":368,"props":2353,"children":2354},{"class":370,"line":1702},[2355],{"type":36,"tag":368,"props":2356,"children":2357},{"style":402},[2358],{"type":42,"value":2359},"                                .filter(entry => entry.eligible)\n",{"type":36,"tag":368,"props":2361,"children":2363},{"class":370,"line":2362},14,[2364],{"type":36,"tag":368,"props":2365,"children":2366},{"style":402},[2367],{"type":42,"value":2368},"                                .length\n",{"type":36,"tag":368,"props":2370,"children":2372},{"class":370,"line":2371},15,[2373,2378,2383],{"type":36,"tag":368,"props":2374,"children":2375},{"style":402},[2376],{"type":42,"value":2377},"                        }}",{"type":36,"tag":368,"props":2379,"children":2380},{"style":391},[2381],{"type":42,"value":2382},"`",{"type":36,"tag":368,"props":2384,"children":2385},{"style":391},[2386],{"type":42,"value":2184},{"type":36,"tag":368,"props":2388,"children":2390},{"class":370,"line":2389},16,[2391,2396,2400,2404,2409,2413],{"type":36,"tag":368,"props":2392,"children":2393},{"style":675},[2394],{"type":42,"value":2395},"                        type",{"type":36,"tag":368,"props":2397,"children":2398},{"style":391},[2399],{"type":42,"value":394},{"type":36,"tag":368,"props":2401,"children":2402},{"style":391},[2403],{"type":42,"value":807},{"type":36,"tag":368,"props":2405,"children":2406},{"style":402},[2407],{"type":42,"value":2408},"number",{"type":36,"tag":368,"props":2410,"children":2411},{"style":391},[2412],{"type":42,"value":1216},{"type":36,"tag":368,"props":2414,"children":2415},{"style":391},[2416],{"type":42,"value":2184},{"type":36,"tag":368,"props":2418,"children":2420},{"class":370,"line":2419},17,[2421],{"type":36,"tag":368,"props":2422,"children":2423},{"style":391},[2424],{"type":42,"value":2425},"                    },\n",{"type":36,"tag":368,"props":2427,"children":2429},{"class":370,"line":2428},18,[2430,2435],{"type":36,"tag":368,"props":2431,"children":2432},{"style":651},[2433],{"type":42,"value":2434},"                ]",{"type":36,"tag":368,"props":2436,"children":2437},{"style":391},[2438],{"type":42,"value":2184},{"type":36,"tag":368,"props":2440,"children":2442},{"class":370,"line":2441},19,[2443],{"type":36,"tag":368,"props":2444,"children":2445},{"style":391},[2446],{"type":42,"value":2447},"            },\n",{"type":36,"tag":368,"props":2449,"children":2451},{"class":370,"line":2450},20,[2452],{"type":36,"tag":368,"props":2453,"children":2454},{"style":391},[2455],{"type":42,"value":2456},"        },\n",{"type":36,"tag":368,"props":2458,"children":2460},{"class":370,"line":2459},21,[2461],{"type":36,"tag":368,"props":2462,"children":2463},{"style":391},[2464],{"type":42,"value":2465},"    },\n",{"type":36,"tag":368,"props":2467,"children":2469},{"class":370,"line":2468},22,[2470,2474],{"type":36,"tag":368,"props":2471,"children":2472},{"style":391},[2473],{"type":42,"value":922},{"type":36,"tag":368,"props":2475,"children":2476},{"style":651},[2477],{"type":42,"value":1617},{"type":36,"tag":45,"props":2479,"children":2480},{},[2481,2483,2489],{"type":42,"value":2482},"Forgetting ",{"type":36,"tag":51,"props":2484,"children":2486},{"className":2485},[],[2487],{"type":42,"value":2488},"executeOnce",{"type":42,"value":2490}," often still works but does N times the work for N items. Worse, if downstream expects one item, you get N.",{"type":36,"tag":45,"props":2492,"children":2493},{},[2494,2506,2508,2513,2515,2520],{"type":36,"tag":86,"props":2495,"children":2496},{},[2497,2499,2504],{"type":42,"value":2498},"Counter-case: ",{"type":36,"tag":51,"props":2500,"children":2502},{"className":2501},[],[2503],{"type":42,"value":2058},{"type":42,"value":2505}," as a per-item lookup, NOT aggregation.",{"type":42,"value":2507}," When the ",{"type":36,"tag":51,"props":2509,"children":2511},{"className":2510},[],[2512],{"type":42,"value":2058},{"type":42,"value":2514}," reads a ",{"type":36,"tag":173,"props":2516,"children":2517},{},[2518],{"type":42,"value":2519},"different",{"type":42,"value":2521}," node and gets filtered by the current item's identity, you want per-item execution. Each iteration produces a different result, so it's real work, not wasted.",{"type":36,"tag":312,"props":2523,"children":2525},{"className":360,"code":2524,"language":362,"meta":320,"style":320},"\u002F\u002F Workflow: Get Tags (200 items) → Search Posts (10 items) → this Set Fields node.\n\u002F\u002F Each post carries a `tag_ids` array. Set Fields runs per-item (10 times)\n\u002F\u002F and resolves each post's tag_ids into the full tag objects.\ntags: ={{\n  $('Get Tags').all()\n    .filter(tag => $('Search Posts').item.json.tag_ids.includes(tag.json.id))\n}}\n",[2526],{"type":36,"tag":51,"props":2527,"children":2528},{"__ignoreMap":320},[2529,2537,2545,2553,2569,2609,2720],{"type":36,"tag":368,"props":2530,"children":2531},{"class":370,"line":371},[2532],{"type":36,"tag":368,"props":2533,"children":2534},{"style":375},[2535],{"type":42,"value":2536},"\u002F\u002F Workflow: Get Tags (200 items) → Search Posts (10 items) → this Set Fields node.\n",{"type":36,"tag":368,"props":2538,"children":2539},{"class":370,"line":381},[2540],{"type":36,"tag":368,"props":2541,"children":2542},{"style":375},[2543],{"type":42,"value":2544},"\u002F\u002F Each post carries a `tag_ids` array. Set Fields runs per-item (10 times)\n",{"type":36,"tag":368,"props":2546,"children":2547},{"class":370,"line":413},[2548],{"type":36,"tag":368,"props":2549,"children":2550},{"style":375},[2551],{"type":42,"value":2552},"\u002F\u002F and resolves each post's tag_ids into the full tag objects.\n",{"type":36,"tag":368,"props":2554,"children":2555},{"class":370,"line":770},[2556,2560,2564],{"type":36,"tag":368,"props":2557,"children":2558},{"style":385},[2559],{"type":42,"value":1119},{"type":36,"tag":368,"props":2561,"children":2562},{"style":391},[2563],{"type":42,"value":394},{"type":36,"tag":368,"props":2565,"children":2566},{"style":391},[2567],{"type":42,"value":2568}," ={{\n",{"type":36,"tag":368,"props":2570,"children":2571},{"class":370,"line":843},[2572,2576,2580,2584,2589,2593,2597,2601,2605],{"type":36,"tag":368,"props":2573,"children":2574},{"style":669},[2575],{"type":42,"value":1529},{"type":36,"tag":368,"props":2577,"children":2578},{"style":675},[2579],{"type":42,"value":857},{"type":36,"tag":368,"props":2581,"children":2582},{"style":391},[2583],{"type":42,"value":1216},{"type":36,"tag":368,"props":2585,"children":2586},{"style":402},[2587],{"type":42,"value":2588},"Get Tags",{"type":36,"tag":368,"props":2590,"children":2591},{"style":391},[2592],{"type":42,"value":1216},{"type":36,"tag":368,"props":2594,"children":2595},{"style":675},[2596],{"type":42,"value":917},{"type":36,"tag":368,"props":2598,"children":2599},{"style":391},[2600],{"type":42,"value":97},{"type":36,"tag":368,"props":2602,"children":2603},{"style":669},[2604],{"type":42,"value":1402},{"type":36,"tag":368,"props":2606,"children":2607},{"style":675},[2608],{"type":42,"value":1573},{"type":36,"tag":368,"props":2610,"children":2611},{"class":370,"line":1497},[2612,2616,2620,2624,2628,2632,2636,2640,2644,2649,2653,2657,2661,2665,2669,2673,2677,2682,2686,2691,2695,2699,2703,2707,2711,2715],{"type":36,"tag":368,"props":2613,"children":2614},{"style":391},[2615],{"type":42,"value":1582},{"type":36,"tag":368,"props":2617,"children":2618},{"style":669},[2619],{"type":42,"value":1128},{"type":36,"tag":368,"props":2621,"children":2622},{"style":675},[2623],{"type":42,"value":857},{"type":36,"tag":368,"props":2625,"children":2626},{"style":1135},[2627],{"type":42,"value":13},{"type":36,"tag":368,"props":2629,"children":2630},{"style":1140},[2631],{"type":42,"value":1143},{"type":36,"tag":368,"props":2633,"children":2634},{"style":669},[2635],{"type":42,"value":1372},{"type":36,"tag":368,"props":2637,"children":2638},{"style":675},[2639],{"type":42,"value":857},{"type":36,"tag":368,"props":2641,"children":2642},{"style":391},[2643],{"type":42,"value":1216},{"type":36,"tag":368,"props":2645,"children":2646},{"style":402},[2647],{"type":42,"value":2648},"Search Posts",{"type":36,"tag":368,"props":2650,"children":2651},{"style":391},[2652],{"type":42,"value":1216},{"type":36,"tag":368,"props":2654,"children":2655},{"style":675},[2656],{"type":42,"value":917},{"type":36,"tag":368,"props":2658,"children":2659},{"style":391},[2660],{"type":42,"value":97},{"type":36,"tag":368,"props":2662,"children":2663},{"style":651},[2664],{"type":42,"value":1595},{"type":36,"tag":368,"props":2666,"children":2667},{"style":391},[2668],{"type":42,"value":97},{"type":36,"tag":368,"props":2670,"children":2671},{"style":651},[2672],{"type":42,"value":1442},{"type":36,"tag":368,"props":2674,"children":2675},{"style":391},[2676],{"type":42,"value":97},{"type":36,"tag":368,"props":2678,"children":2679},{"style":651},[2680],{"type":42,"value":2681},"tag_ids",{"type":36,"tag":368,"props":2683,"children":2684},{"style":391},[2685],{"type":42,"value":97},{"type":36,"tag":368,"props":2687,"children":2688},{"style":669},[2689],{"type":42,"value":2690},"includes",{"type":36,"tag":368,"props":2692,"children":2693},{"style":675},[2694],{"type":42,"value":857},{"type":36,"tag":368,"props":2696,"children":2697},{"style":651},[2698],{"type":42,"value":13},{"type":36,"tag":368,"props":2700,"children":2701},{"style":391},[2702],{"type":42,"value":97},{"type":36,"tag":368,"props":2704,"children":2705},{"style":651},[2706],{"type":42,"value":1442},{"type":36,"tag":368,"props":2708,"children":2709},{"style":391},[2710],{"type":42,"value":97},{"type":36,"tag":368,"props":2712,"children":2713},{"style":651},[2714],{"type":42,"value":1451},{"type":36,"tag":368,"props":2716,"children":2717},{"style":675},[2718],{"type":42,"value":2719},"))\n",{"type":36,"tag":368,"props":2721,"children":2722},{"class":370,"line":1505},[2723],{"type":36,"tag":368,"props":2724,"children":2725},{"style":391},[2726],{"type":42,"value":683},{"type":36,"tag":45,"props":2728,"children":2729},{},[2730,2732,2737],{"type":42,"value":2731},"Setting ",{"type":36,"tag":51,"props":2733,"children":2735},{"className":2734},[],[2736],{"type":42,"value":2113},{"type":42,"value":2738}," here would collapse the 10 outputs to 1.",{"type":36,"tag":45,"props":2740,"children":2741},{},[2742],{"type":42,"value":2743},"The shape distinguishing the two:",{"type":36,"tag":130,"props":2745,"children":2746},{},[2747,2771],{"type":36,"tag":134,"props":2748,"children":2749},{},[2750,2756,2758,2763,2765,2770],{"type":36,"tag":51,"props":2751,"children":2753},{"className":2752},[],[2754],{"type":42,"value":2755},"$source.all()",{"type":42,"value":2757}," ",{"type":36,"tag":173,"props":2759,"children":2760},{},[2761],{"type":42,"value":2762},"alone",{"type":42,"value":2764}," (aggregating across the dataset) → ",{"type":36,"tag":51,"props":2766,"children":2768},{"className":2767},[],[2769],{"type":42,"value":2113},{"type":42,"value":97},{"type":36,"tag":134,"props":2772,"children":2773},{},[2774,2780,2782,2787],{"type":36,"tag":51,"props":2775,"children":2777},{"className":2776},[],[2778],{"type":42,"value":2779},"$source.all().filter(... matches $other.item.json.x)",{"type":42,"value":2781}," (looking up by the current item) → leave ",{"type":36,"tag":51,"props":2783,"children":2785},{"className":2784},[],[2786],{"type":42,"value":2488},{"type":42,"value":2788}," off.",{"type":36,"tag":45,"props":2790,"children":2791},{},[2792,2797,2799,2804,2805,2810,2812,2818,2820,2825],{"type":36,"tag":86,"props":2793,"children":2794},{},[2795],{"type":42,"value":2796},"Quick test:",{"type":42,"value":2798}," does the expression use ",{"type":36,"tag":51,"props":2800,"children":2802},{"className":2801},[],[2803],{"type":42,"value":2058},{"type":42,"value":2757},{"type":36,"tag":173,"props":2806,"children":2807},{},[2808],{"type":42,"value":2809},"without",{"type":42,"value":2811}," combining it with another node's ",{"type":36,"tag":51,"props":2813,"children":2815},{"className":2814},[],[2816],{"type":42,"value":2817},".item",{"type":42,"value":2819},"? If yes, the node should probably be ",{"type":36,"tag":51,"props":2821,"children":2823},{"className":2822},[],[2824],{"type":42,"value":2113},{"type":42,"value":97},{"type":36,"tag":45,"props":2827,"children":2828},{},[2829,2831,2837],{"type":42,"value":2830},"For the broader picture on iteration and explicit looping, see the ",{"type":36,"tag":51,"props":2832,"children":2834},{"className":2833},[],[2835],{"type":42,"value":2836},"n8n-loops-official",{"type":42,"value":2838}," skill.",{"type":36,"tag":583,"props":2840,"children":2842},{"id":2841},"conditionals",[2843],{"type":42,"value":2844},"Conditionals",{"type":36,"tag":312,"props":2846,"children":2848},{"className":360,"code":2847,"language":362,"meta":320,"style":320},"{{ $json.status === 'active' ? 'Active' : 'Inactive' }}\n{{ $json.amount >= 100 ? 'Large' : ($json.amount >= 10 ? 'Medium' : 'Small') }}\n",[2849],{"type":36,"tag":51,"props":2850,"children":2851},{"__ignoreMap":320},[2852,2928],{"type":36,"tag":368,"props":2853,"children":2854},{"class":370,"line":371},[2855,2859,2863,2867,2872,2876,2880,2884,2888,2893,2897,2902,2906,2911,2915,2920,2924],{"type":36,"tag":368,"props":2856,"children":2857},{"style":391},[2858],{"type":42,"value":648},{"type":36,"tag":368,"props":2860,"children":2861},{"style":651},[2862],{"type":42,"value":654},{"type":36,"tag":368,"props":2864,"children":2865},{"style":391},[2866],{"type":42,"value":97},{"type":36,"tag":368,"props":2868,"children":2869},{"style":651},[2870],{"type":42,"value":2871},"status",{"type":36,"tag":368,"props":2873,"children":2874},{"style":391},[2875],{"type":42,"value":1456},{"type":36,"tag":368,"props":2877,"children":2878},{"style":391},[2879],{"type":42,"value":807},{"type":36,"tag":368,"props":2881,"children":2882},{"style":402},[2883],{"type":42,"value":1157},{"type":36,"tag":368,"props":2885,"children":2886},{"style":391},[2887],{"type":42,"value":1216},{"type":36,"tag":368,"props":2889,"children":2890},{"style":391},[2891],{"type":42,"value":2892}," ?",{"type":36,"tag":368,"props":2894,"children":2895},{"style":391},[2896],{"type":42,"value":807},{"type":36,"tag":368,"props":2898,"children":2899},{"style":402},[2900],{"type":42,"value":2901},"Active",{"type":36,"tag":368,"props":2903,"children":2904},{"style":391},[2905],{"type":42,"value":1216},{"type":36,"tag":368,"props":2907,"children":2908},{"style":391},[2909],{"type":42,"value":2910}," :",{"type":36,"tag":368,"props":2912,"children":2913},{"style":391},[2914],{"type":42,"value":807},{"type":36,"tag":368,"props":2916,"children":2917},{"style":402},[2918],{"type":42,"value":2919},"Inactive",{"type":36,"tag":368,"props":2921,"children":2922},{"style":391},[2923],{"type":42,"value":1216},{"type":36,"tag":368,"props":2925,"children":2926},{"style":391},[2927],{"type":42,"value":767},{"type":36,"tag":368,"props":2929,"children":2930},{"class":370,"line":381},[2931,2935,2939,2943,2948,2953,2958,2962,2966,2971,2975,2979,2984,2988,2992,2996,3000,3004,3008,3012,3017,3021,3025,3029,3034,3038,3042],{"type":36,"tag":368,"props":2932,"children":2933},{"style":391},[2934],{"type":42,"value":648},{"type":36,"tag":368,"props":2936,"children":2937},{"style":651},[2938],{"type":42,"value":654},{"type":36,"tag":368,"props":2940,"children":2941},{"style":391},[2942],{"type":42,"value":97},{"type":36,"tag":368,"props":2944,"children":2945},{"style":651},[2946],{"type":42,"value":2947},"amount",{"type":36,"tag":368,"props":2949,"children":2950},{"style":391},[2951],{"type":42,"value":2952}," >=",{"type":36,"tag":368,"props":2954,"children":2955},{"style":899},[2956],{"type":42,"value":2957}," 100",{"type":36,"tag":368,"props":2959,"children":2960},{"style":391},[2961],{"type":42,"value":2892},{"type":36,"tag":368,"props":2963,"children":2964},{"style":391},[2965],{"type":42,"value":807},{"type":36,"tag":368,"props":2967,"children":2968},{"style":402},[2969],{"type":42,"value":2970},"Large",{"type":36,"tag":368,"props":2972,"children":2973},{"style":391},[2974],{"type":42,"value":1216},{"type":36,"tag":368,"props":2976,"children":2977},{"style":391},[2978],{"type":42,"value":2910},{"type":36,"tag":368,"props":2980,"children":2981},{"style":675},[2982],{"type":42,"value":2983}," (",{"type":36,"tag":368,"props":2985,"children":2986},{"style":651},[2987],{"type":42,"value":64},{"type":36,"tag":368,"props":2989,"children":2990},{"style":391},[2991],{"type":42,"value":97},{"type":36,"tag":368,"props":2993,"children":2994},{"style":651},[2995],{"type":42,"value":2947},{"type":36,"tag":368,"props":2997,"children":2998},{"style":391},[2999],{"type":42,"value":2952},{"type":36,"tag":368,"props":3001,"children":3002},{"style":899},[3003],{"type":42,"value":1040},{"type":36,"tag":368,"props":3005,"children":3006},{"style":391},[3007],{"type":42,"value":2892},{"type":36,"tag":368,"props":3009,"children":3010},{"style":391},[3011],{"type":42,"value":807},{"type":36,"tag":368,"props":3013,"children":3014},{"style":402},[3015],{"type":42,"value":3016},"Medium",{"type":36,"tag":368,"props":3018,"children":3019},{"style":391},[3020],{"type":42,"value":1216},{"type":36,"tag":368,"props":3022,"children":3023},{"style":391},[3024],{"type":42,"value":2910},{"type":36,"tag":368,"props":3026,"children":3027},{"style":391},[3028],{"type":42,"value":807},{"type":36,"tag":368,"props":3030,"children":3031},{"style":402},[3032],{"type":42,"value":3033},"Small",{"type":36,"tag":368,"props":3035,"children":3036},{"style":391},[3037],{"type":42,"value":1216},{"type":36,"tag":368,"props":3039,"children":3040},{"style":675},[3041],{"type":42,"value":927},{"type":36,"tag":368,"props":3043,"children":3044},{"style":391},[3045],{"type":42,"value":683},{"type":36,"tag":583,"props":3047,"children":3049},{"id":3048},"date-math-luxon",[3050],{"type":42,"value":3051},"Date math (Luxon)",{"type":36,"tag":312,"props":3053,"children":3055},{"className":360,"code":3054,"language":362,"meta":320,"style":320},"{{ DateTime.now().toISO() }}\n{{ DateTime.fromISO($json.created_at).toFormat('yyyy-MM-dd') }}\n{{ DateTime.now().minus({ days: 7 }).startOf('day').toISO() }}\n{{ DateTime.fromISO($json.due).diffNow('days').days }}    \u002F\u002F days from now (negative if past)\n",[3056],{"type":36,"tag":51,"props":3057,"children":3058},{"__ignoreMap":320},[3059,3101,3175,3285],{"type":36,"tag":368,"props":3060,"children":3061},{"class":370,"line":371},[3062,3066,3071,3075,3080,3084,3088,3093,3097],{"type":36,"tag":368,"props":3063,"children":3064},{"style":391},[3065],{"type":42,"value":648},{"type":36,"tag":368,"props":3067,"children":3068},{"style":651},[3069],{"type":42,"value":3070}," DateTime",{"type":36,"tag":368,"props":3072,"children":3073},{"style":391},[3074],{"type":42,"value":97},{"type":36,"tag":368,"props":3076,"children":3077},{"style":669},[3078],{"type":42,"value":3079},"now",{"type":36,"tag":368,"props":3081,"children":3082},{"style":675},[3083],{"type":42,"value":716},{"type":36,"tag":368,"props":3085,"children":3086},{"style":391},[3087],{"type":42,"value":97},{"type":36,"tag":368,"props":3089,"children":3090},{"style":669},[3091],{"type":42,"value":3092},"toISO",{"type":36,"tag":368,"props":3094,"children":3095},{"style":675},[3096],{"type":42,"value":678},{"type":36,"tag":368,"props":3098,"children":3099},{"style":391},[3100],{"type":42,"value":683},{"type":36,"tag":368,"props":3102,"children":3103},{"class":370,"line":381},[3104,3108,3112,3116,3121,3125,3129,3133,3137,3141,3145,3150,3154,3158,3163,3167,3171],{"type":36,"tag":368,"props":3105,"children":3106},{"style":391},[3107],{"type":42,"value":648},{"type":36,"tag":368,"props":3109,"children":3110},{"style":651},[3111],{"type":42,"value":3070},{"type":36,"tag":368,"props":3113,"children":3114},{"style":391},[3115],{"type":42,"value":97},{"type":36,"tag":368,"props":3117,"children":3118},{"style":669},[3119],{"type":42,"value":3120},"fromISO",{"type":36,"tag":368,"props":3122,"children":3123},{"style":675},[3124],{"type":42,"value":857},{"type":36,"tag":368,"props":3126,"children":3127},{"style":651},[3128],{"type":42,"value":64},{"type":36,"tag":368,"props":3130,"children":3131},{"style":391},[3132],{"type":42,"value":97},{"type":36,"tag":368,"props":3134,"children":3135},{"style":651},[3136],{"type":42,"value":1931},{"type":36,"tag":368,"props":3138,"children":3139},{"style":675},[3140],{"type":42,"value":917},{"type":36,"tag":368,"props":3142,"children":3143},{"style":391},[3144],{"type":42,"value":97},{"type":36,"tag":368,"props":3146,"children":3147},{"style":669},[3148],{"type":42,"value":3149},"toFormat",{"type":36,"tag":368,"props":3151,"children":3152},{"style":675},[3153],{"type":42,"value":857},{"type":36,"tag":368,"props":3155,"children":3156},{"style":391},[3157],{"type":42,"value":1216},{"type":36,"tag":368,"props":3159,"children":3160},{"style":402},[3161],{"type":42,"value":3162},"yyyy-MM-dd",{"type":36,"tag":368,"props":3164,"children":3165},{"style":391},[3166],{"type":42,"value":1216},{"type":36,"tag":368,"props":3168,"children":3169},{"style":675},[3170],{"type":42,"value":927},{"type":36,"tag":368,"props":3172,"children":3173},{"style":391},[3174],{"type":42,"value":683},{"type":36,"tag":368,"props":3176,"children":3177},{"class":370,"line":413},[3178,3182,3186,3190,3194,3198,3202,3207,3211,3216,3221,3225,3230,3235,3239,3243,3248,3252,3256,3261,3265,3269,3273,3277,3281],{"type":36,"tag":368,"props":3179,"children":3180},{"style":391},[3181],{"type":42,"value":648},{"type":36,"tag":368,"props":3183,"children":3184},{"style":651},[3185],{"type":42,"value":3070},{"type":36,"tag":368,"props":3187,"children":3188},{"style":391},[3189],{"type":42,"value":97},{"type":36,"tag":368,"props":3191,"children":3192},{"style":669},[3193],{"type":42,"value":3079},{"type":36,"tag":368,"props":3195,"children":3196},{"style":675},[3197],{"type":42,"value":716},{"type":36,"tag":368,"props":3199,"children":3200},{"style":391},[3201],{"type":42,"value":97},{"type":36,"tag":368,"props":3203,"children":3204},{"style":669},[3205],{"type":42,"value":3206},"minus",{"type":36,"tag":368,"props":3208,"children":3209},{"style":675},[3210],{"type":42,"value":857},{"type":36,"tag":368,"props":3212,"children":3213},{"style":391},[3214],{"type":42,"value":3215},"{",{"type":36,"tag":368,"props":3217,"children":3218},{"style":675},[3219],{"type":42,"value":3220}," days",{"type":36,"tag":368,"props":3222,"children":3223},{"style":391},[3224],{"type":42,"value":394},{"type":36,"tag":368,"props":3226,"children":3227},{"style":899},[3228],{"type":42,"value":3229}," 7",{"type":36,"tag":368,"props":3231,"children":3232},{"style":391},[3233],{"type":42,"value":3234}," }",{"type":36,"tag":368,"props":3236,"children":3237},{"style":675},[3238],{"type":42,"value":917},{"type":36,"tag":368,"props":3240,"children":3241},{"style":391},[3242],{"type":42,"value":97},{"type":36,"tag":368,"props":3244,"children":3245},{"style":669},[3246],{"type":42,"value":3247},"startOf",{"type":36,"tag":368,"props":3249,"children":3250},{"style":675},[3251],{"type":42,"value":857},{"type":36,"tag":368,"props":3253,"children":3254},{"style":391},[3255],{"type":42,"value":1216},{"type":36,"tag":368,"props":3257,"children":3258},{"style":402},[3259],{"type":42,"value":3260},"day",{"type":36,"tag":368,"props":3262,"children":3263},{"style":391},[3264],{"type":42,"value":1216},{"type":36,"tag":368,"props":3266,"children":3267},{"style":675},[3268],{"type":42,"value":917},{"type":36,"tag":368,"props":3270,"children":3271},{"style":391},[3272],{"type":42,"value":97},{"type":36,"tag":368,"props":3274,"children":3275},{"style":669},[3276],{"type":42,"value":3092},{"type":36,"tag":368,"props":3278,"children":3279},{"style":675},[3280],{"type":42,"value":678},{"type":36,"tag":368,"props":3282,"children":3283},{"style":391},[3284],{"type":42,"value":683},{"type":36,"tag":368,"props":3286,"children":3287},{"class":370,"line":770},[3288,3292,3296,3300,3304,3308,3312,3316,3321,3325,3329,3334,3338,3342,3347,3351,3355,3359,3363,3368],{"type":36,"tag":368,"props":3289,"children":3290},{"style":391},[3291],{"type":42,"value":648},{"type":36,"tag":368,"props":3293,"children":3294},{"style":651},[3295],{"type":42,"value":3070},{"type":36,"tag":368,"props":3297,"children":3298},{"style":391},[3299],{"type":42,"value":97},{"type":36,"tag":368,"props":3301,"children":3302},{"style":669},[3303],{"type":42,"value":3120},{"type":36,"tag":368,"props":3305,"children":3306},{"style":675},[3307],{"type":42,"value":857},{"type":36,"tag":368,"props":3309,"children":3310},{"style":651},[3311],{"type":42,"value":64},{"type":36,"tag":368,"props":3313,"children":3314},{"style":391},[3315],{"type":42,"value":97},{"type":36,"tag":368,"props":3317,"children":3318},{"style":651},[3319],{"type":42,"value":3320},"due",{"type":36,"tag":368,"props":3322,"children":3323},{"style":675},[3324],{"type":42,"value":917},{"type":36,"tag":368,"props":3326,"children":3327},{"style":391},[3328],{"type":42,"value":97},{"type":36,"tag":368,"props":3330,"children":3331},{"style":669},[3332],{"type":42,"value":3333},"diffNow",{"type":36,"tag":368,"props":3335,"children":3336},{"style":675},[3337],{"type":42,"value":857},{"type":36,"tag":368,"props":3339,"children":3340},{"style":391},[3341],{"type":42,"value":1216},{"type":36,"tag":368,"props":3343,"children":3344},{"style":402},[3345],{"type":42,"value":3346},"days",{"type":36,"tag":368,"props":3348,"children":3349},{"style":391},[3350],{"type":42,"value":1216},{"type":36,"tag":368,"props":3352,"children":3353},{"style":675},[3354],{"type":42,"value":917},{"type":36,"tag":368,"props":3356,"children":3357},{"style":391},[3358],{"type":42,"value":97},{"type":36,"tag":368,"props":3360,"children":3361},{"style":651},[3362],{"type":42,"value":3346},{"type":36,"tag":368,"props":3364,"children":3365},{"style":391},[3366],{"type":42,"value":3367}," }}",{"type":36,"tag":368,"props":3369,"children":3370},{"style":375},[3371],{"type":42,"value":3372},"    \u002F\u002F days from now (negative if past)\n",{"type":36,"tag":583,"props":3374,"children":3376},{"id":3375},"cross-node-references-preferred-over-json",[3377,3379,3384],{"type":42,"value":3378},"Cross-node references (preferred over ",{"type":36,"tag":51,"props":3380,"children":3382},{"className":3381},[],[3383],{"type":42,"value":64},{"type":42,"value":917},{"type":36,"tag":312,"props":3386,"children":3388},{"className":360,"code":3387,"language":362,"meta":320,"style":320},"{{ $('Webhook Trigger').item.json.body.customer_id }}\n{{ $('Lookup customer').item.json.email }}\n{{ $('Combine Inputs').item.json.coupon_code }}    \u002F\u002F NoOp convergence point\n",[3389],{"type":36,"tag":51,"props":3390,"children":3391},{"__ignoreMap":320},[3392,3462,3522],{"type":36,"tag":368,"props":3393,"children":3394},{"class":370,"line":371},[3395,3399,3403,3407,3411,3416,3420,3424,3428,3432,3436,3440,3444,3449,3453,3458],{"type":36,"tag":368,"props":3396,"children":3397},{"style":391},[3398],{"type":42,"value":648},{"type":36,"tag":368,"props":3400,"children":3401},{"style":669},[3402],{"type":42,"value":1372},{"type":36,"tag":368,"props":3404,"children":3405},{"style":675},[3406],{"type":42,"value":857},{"type":36,"tag":368,"props":3408,"children":3409},{"style":391},[3410],{"type":42,"value":1216},{"type":36,"tag":368,"props":3412,"children":3413},{"style":402},[3414],{"type":42,"value":3415},"Webhook Trigger",{"type":36,"tag":368,"props":3417,"children":3418},{"style":391},[3419],{"type":42,"value":1216},{"type":36,"tag":368,"props":3421,"children":3422},{"style":675},[3423],{"type":42,"value":917},{"type":36,"tag":368,"props":3425,"children":3426},{"style":391},[3427],{"type":42,"value":97},{"type":36,"tag":368,"props":3429,"children":3430},{"style":651},[3431],{"type":42,"value":1595},{"type":36,"tag":368,"props":3433,"children":3434},{"style":391},[3435],{"type":42,"value":97},{"type":36,"tag":368,"props":3437,"children":3438},{"style":651},[3439],{"type":42,"value":1442},{"type":36,"tag":368,"props":3441,"children":3442},{"style":391},[3443],{"type":42,"value":97},{"type":36,"tag":368,"props":3445,"children":3446},{"style":651},[3447],{"type":42,"value":3448},"body",{"type":36,"tag":368,"props":3450,"children":3451},{"style":391},[3452],{"type":42,"value":97},{"type":36,"tag":368,"props":3454,"children":3455},{"style":651},[3456],{"type":42,"value":3457},"customer_id",{"type":36,"tag":368,"props":3459,"children":3460},{"style":391},[3461],{"type":42,"value":767},{"type":36,"tag":368,"props":3463,"children":3464},{"class":370,"line":381},[3465,3469,3473,3477,3481,3486,3490,3494,3498,3502,3506,3510,3514,3518],{"type":36,"tag":368,"props":3466,"children":3467},{"style":391},[3468],{"type":42,"value":648},{"type":36,"tag":368,"props":3470,"children":3471},{"style":669},[3472],{"type":42,"value":1372},{"type":36,"tag":368,"props":3474,"children":3475},{"style":675},[3476],{"type":42,"value":857},{"type":36,"tag":368,"props":3478,"children":3479},{"style":391},[3480],{"type":42,"value":1216},{"type":36,"tag":368,"props":3482,"children":3483},{"style":402},[3484],{"type":42,"value":3485},"Lookup customer",{"type":36,"tag":368,"props":3487,"children":3488},{"style":391},[3489],{"type":42,"value":1216},{"type":36,"tag":368,"props":3491,"children":3492},{"style":675},[3493],{"type":42,"value":917},{"type":36,"tag":368,"props":3495,"children":3496},{"style":391},[3497],{"type":42,"value":97},{"type":36,"tag":368,"props":3499,"children":3500},{"style":651},[3501],{"type":42,"value":1595},{"type":36,"tag":368,"props":3503,"children":3504},{"style":391},[3505],{"type":42,"value":97},{"type":36,"tag":368,"props":3507,"children":3508},{"style":651},[3509],{"type":42,"value":1442},{"type":36,"tag":368,"props":3511,"children":3512},{"style":391},[3513],{"type":42,"value":97},{"type":36,"tag":368,"props":3515,"children":3516},{"style":651},[3517],{"type":42,"value":419},{"type":36,"tag":368,"props":3519,"children":3520},{"style":391},[3521],{"type":42,"value":767},{"type":36,"tag":368,"props":3523,"children":3524},{"class":370,"line":413},[3525,3529,3533,3537,3541,3545,3549,3553,3557,3561,3565,3569,3573,3578,3582],{"type":36,"tag":368,"props":3526,"children":3527},{"style":391},[3528],{"type":42,"value":648},{"type":36,"tag":368,"props":3530,"children":3531},{"style":669},[3532],{"type":42,"value":1372},{"type":36,"tag":368,"props":3534,"children":3535},{"style":675},[3536],{"type":42,"value":857},{"type":36,"tag":368,"props":3538,"children":3539},{"style":391},[3540],{"type":42,"value":1216},{"type":36,"tag":368,"props":3542,"children":3543},{"style":402},[3544],{"type":42,"value":308},{"type":36,"tag":368,"props":3546,"children":3547},{"style":391},[3548],{"type":42,"value":1216},{"type":36,"tag":368,"props":3550,"children":3551},{"style":675},[3552],{"type":42,"value":917},{"type":36,"tag":368,"props":3554,"children":3555},{"style":391},[3556],{"type":42,"value":97},{"type":36,"tag":368,"props":3558,"children":3559},{"style":651},[3560],{"type":42,"value":1595},{"type":36,"tag":368,"props":3562,"children":3563},{"style":391},[3564],{"type":42,"value":97},{"type":36,"tag":368,"props":3566,"children":3567},{"style":651},[3568],{"type":42,"value":1442},{"type":36,"tag":368,"props":3570,"children":3571},{"style":391},[3572],{"type":42,"value":97},{"type":36,"tag":368,"props":3574,"children":3575},{"style":651},[3576],{"type":42,"value":3577},"coupon_code",{"type":36,"tag":368,"props":3579,"children":3580},{"style":391},[3581],{"type":42,"value":3367},{"type":36,"tag":368,"props":3583,"children":3584},{"style":375},[3585],{"type":42,"value":3586},"    \u002F\u002F NoOp convergence point\n",{"type":36,"tag":45,"props":3588,"children":3589},{},[3590,3595,3597,3603,3605,3610,3612,3617],{"type":36,"tag":51,"props":3591,"children":3593},{"className":3592},[],[3594],{"type":42,"value":2817},{"type":42,"value":3596}," and ",{"type":36,"tag":51,"props":3598,"children":3600},{"className":3599},[],[3601],{"type":42,"value":3602},".first()",{"type":42,"value":3604}," are mostly equivalent for single-item nodes, so pick one. ",{"type":36,"tag":51,"props":3606,"children":3608},{"className":3607},[],[3609],{"type":42,"value":3602},{"type":42,"value":3611}," is more explicit, ",{"type":36,"tag":51,"props":3613,"children":3615},{"className":3614},[],[3616],{"type":42,"value":2817},{"type":42,"value":3618}," is shorter.",{"type":36,"tag":583,"props":3620,"children":3622},{"id":3621},"multi-line-logic-with-an-iife-arrow-function",[3623],{"type":42,"value":3624},"Multi-line logic with an IIFE arrow function",{"type":36,"tag":45,"props":3626,"children":3627},{},[3628],{"type":42,"value":3629},"When logic is too gnarly for one line but operates on a single item, wrap it in an immediately-invoked arrow function:",{"type":36,"tag":312,"props":3631,"children":3633},{"className":360,"code":3632,"language":362,"meta":320,"style":320},"{{ (() => {\n    \u002F\u002F Compute total including tax\n    const items = $json.line_items\n    const subtotal = items.reduce((sum, item) => sum + item.price * item.qty, 0)\n    const tax = subtotal * 0.08\n    return (subtotal + tax).toFixed(2)\n})() }}\n",[3634],{"type":36,"tag":51,"props":3635,"children":3636},{"__ignoreMap":320},[3637,3660,3668,3699,3806,3835,3887],{"type":36,"tag":368,"props":3638,"children":3639},{"class":370,"line":371},[3640,3644,3648,3652,3656],{"type":36,"tag":368,"props":3641,"children":3642},{"style":391},[3643],{"type":42,"value":648},{"type":36,"tag":368,"props":3645,"children":3646},{"style":675},[3647],{"type":42,"value":2983},{"type":36,"tag":368,"props":3649,"children":3650},{"style":391},[3651],{"type":42,"value":716},{"type":36,"tag":368,"props":3653,"children":3654},{"style":1140},[3655],{"type":42,"value":1143},{"type":36,"tag":368,"props":3657,"children":3658},{"style":391},[3659],{"type":42,"value":2201},{"type":36,"tag":368,"props":3661,"children":3662},{"class":370,"line":381},[3663],{"type":36,"tag":368,"props":3664,"children":3665},{"style":375},[3666],{"type":42,"value":3667},"    \u002F\u002F Compute total including tax\n",{"type":36,"tag":368,"props":3669,"children":3670},{"class":370,"line":413},[3671,3676,3681,3686,3690,3694],{"type":36,"tag":368,"props":3672,"children":3673},{"style":1140},[3674],{"type":42,"value":3675},"    const",{"type":36,"tag":368,"props":3677,"children":3678},{"style":651},[3679],{"type":42,"value":3680}," items",{"type":36,"tag":368,"props":3682,"children":3683},{"style":391},[3684],{"type":42,"value":3685}," =",{"type":36,"tag":368,"props":3687,"children":3688},{"style":651},[3689],{"type":42,"value":654},{"type":36,"tag":368,"props":3691,"children":3692},{"style":391},[3693],{"type":42,"value":97},{"type":36,"tag":368,"props":3695,"children":3696},{"style":651},[3697],{"type":42,"value":3698},"line_items\n",{"type":36,"tag":368,"props":3700,"children":3701},{"class":370,"line":770},[3702,3706,3711,3715,3719,3723,3727,3731,3735,3739,3743,3747,3751,3755,3759,3763,3767,3771,3776,3781,3785,3789,3794,3798,3802],{"type":36,"tag":368,"props":3703,"children":3704},{"style":1140},[3705],{"type":42,"value":3675},{"type":36,"tag":368,"props":3707,"children":3708},{"style":651},[3709],{"type":42,"value":3710}," subtotal",{"type":36,"tag":368,"props":3712,"children":3713},{"style":391},[3714],{"type":42,"value":3685},{"type":36,"tag":368,"props":3716,"children":3717},{"style":651},[3718],{"type":42,"value":3680},{"type":36,"tag":368,"props":3720,"children":3721},{"style":391},[3722],{"type":42,"value":97},{"type":36,"tag":368,"props":3724,"children":3725},{"style":669},[3726],{"type":42,"value":1283},{"type":36,"tag":368,"props":3728,"children":3729},{"style":675},[3730],{"type":42,"value":857},{"type":36,"tag":368,"props":3732,"children":3733},{"style":391},[3734],{"type":42,"value":857},{"type":36,"tag":368,"props":3736,"children":3737},{"style":1135},[3738],{"type":42,"value":1296},{"type":36,"tag":368,"props":3740,"children":3741},{"style":391},[3742],{"type":42,"value":907},{"type":36,"tag":368,"props":3744,"children":3745},{"style":1135},[3746],{"type":42,"value":1604},{"type":36,"tag":368,"props":3748,"children":3749},{"style":391},[3750],{"type":42,"value":917},{"type":36,"tag":368,"props":3752,"children":3753},{"style":1140},[3754],{"type":42,"value":1143},{"type":36,"tag":368,"props":3756,"children":3757},{"style":651},[3758],{"type":42,"value":1318},{"type":36,"tag":368,"props":3760,"children":3761},{"style":391},[3762],{"type":42,"value":802},{"type":36,"tag":368,"props":3764,"children":3765},{"style":651},[3766],{"type":42,"value":1604},{"type":36,"tag":368,"props":3768,"children":3769},{"style":391},[3770],{"type":42,"value":97},{"type":36,"tag":368,"props":3772,"children":3773},{"style":651},[3774],{"type":42,"value":3775},"price",{"type":36,"tag":368,"props":3777,"children":3778},{"style":391},[3779],{"type":42,"value":3780}," *",{"type":36,"tag":368,"props":3782,"children":3783},{"style":651},[3784],{"type":42,"value":1604},{"type":36,"tag":368,"props":3786,"children":3787},{"style":391},[3788],{"type":42,"value":97},{"type":36,"tag":368,"props":3790,"children":3791},{"style":651},[3792],{"type":42,"value":3793},"qty",{"type":36,"tag":368,"props":3795,"children":3796},{"style":391},[3797],{"type":42,"value":907},{"type":36,"tag":368,"props":3799,"children":3800},{"style":899},[3801],{"type":42,"value":1335},{"type":36,"tag":368,"props":3803,"children":3804},{"style":675},[3805],{"type":42,"value":1617},{"type":36,"tag":368,"props":3807,"children":3808},{"class":370,"line":843},[3809,3813,3818,3822,3826,3830],{"type":36,"tag":368,"props":3810,"children":3811},{"style":1140},[3812],{"type":42,"value":3675},{"type":36,"tag":368,"props":3814,"children":3815},{"style":651},[3816],{"type":42,"value":3817}," tax",{"type":36,"tag":368,"props":3819,"children":3820},{"style":391},[3821],{"type":42,"value":3685},{"type":36,"tag":368,"props":3823,"children":3824},{"style":651},[3825],{"type":42,"value":3710},{"type":36,"tag":368,"props":3827,"children":3828},{"style":391},[3829],{"type":42,"value":3780},{"type":36,"tag":368,"props":3831,"children":3832},{"style":899},[3833],{"type":42,"value":3834}," 0.08\n",{"type":36,"tag":368,"props":3836,"children":3837},{"class":370,"line":1497},[3838,3844,3848,3853,3857,3861,3865,3869,3874,3878,3883],{"type":36,"tag":368,"props":3839,"children":3841},{"style":3840},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[3842],{"type":42,"value":3843},"    return",{"type":36,"tag":368,"props":3845,"children":3846},{"style":675},[3847],{"type":42,"value":2983},{"type":36,"tag":368,"props":3849,"children":3850},{"style":651},[3851],{"type":42,"value":3852},"subtotal",{"type":36,"tag":368,"props":3854,"children":3855},{"style":391},[3856],{"type":42,"value":802},{"type":36,"tag":368,"props":3858,"children":3859},{"style":651},[3860],{"type":42,"value":3817},{"type":36,"tag":368,"props":3862,"children":3863},{"style":675},[3864],{"type":42,"value":917},{"type":36,"tag":368,"props":3866,"children":3867},{"style":391},[3868],{"type":42,"value":97},{"type":36,"tag":368,"props":3870,"children":3871},{"style":669},[3872],{"type":42,"value":3873},"toFixed",{"type":36,"tag":368,"props":3875,"children":3876},{"style":675},[3877],{"type":42,"value":857},{"type":36,"tag":368,"props":3879,"children":3880},{"style":899},[3881],{"type":42,"value":3882},"2",{"type":36,"tag":368,"props":3884,"children":3885},{"style":675},[3886],{"type":42,"value":1617},{"type":36,"tag":368,"props":3888,"children":3889},{"class":370,"line":1505},[3890,3894,3899],{"type":36,"tag":368,"props":3891,"children":3892},{"style":391},[3893],{"type":42,"value":922},{"type":36,"tag":368,"props":3895,"children":3896},{"style":675},[3897],{"type":42,"value":3898},")() ",{"type":36,"tag":368,"props":3900,"children":3901},{"style":391},[3902],{"type":42,"value":683},{"type":36,"tag":45,"props":3904,"children":3905},{},[3906,3908,3913,3914,3920,3921,3927,3929,3934,3936,3942,3943,3949,3950,3956,3957,3963,3964,3970],{"type":42,"value":3907},"Inside, you get the full expression scope (",{"type":36,"tag":51,"props":3909,"children":3911},{"className":3910},[],[3912],{"type":42,"value":64},{"type":42,"value":1067},{"type":36,"tag":51,"props":3915,"children":3917},{"className":3916},[],[3918],{"type":42,"value":3919},"$('Node Name')",{"type":42,"value":1067},{"type":36,"tag":51,"props":3922,"children":3924},{"className":3923},[],[3925],{"type":42,"value":3926},"$now",{"type":42,"value":3928},", Luxon) plus the JS you'd write in any function: ",{"type":36,"tag":51,"props":3930,"children":3932},{"className":3931},[],[3933],{"type":42,"value":2130},{"type":42,"value":3935},"\u002F",{"type":36,"tag":51,"props":3937,"children":3939},{"className":3938},[],[3940],{"type":42,"value":3941},"let",{"type":42,"value":1067},{"type":36,"tag":51,"props":3944,"children":3946},{"className":3945},[],[3947],{"type":42,"value":3948},"if",{"type":42,"value":3935},{"type":36,"tag":51,"props":3951,"children":3953},{"className":3952},[],[3954],{"type":42,"value":3955},"switch",{"type":42,"value":1067},{"type":36,"tag":51,"props":3958,"children":3960},{"className":3959},[],[3961],{"type":42,"value":3962},"try",{"type":42,"value":3935},{"type":36,"tag":51,"props":3965,"children":3967},{"className":3966},[],[3968],{"type":42,"value":3969},"catch",{"type":42,"value":3971},", regex.",{"type":36,"tag":45,"props":3973,"children":3974},{},[3975,3980,3982,3988,3990,3996],{"type":36,"tag":86,"props":3976,"children":3977},{},[3978],{"type":42,"value":3979},"Arguments don't work.",{"type":42,"value":3981}," Expressions have no caller to pass them, so ",{"type":36,"tag":51,"props":3983,"children":3985},{"className":3984},[],[3986],{"type":42,"value":3987},"(text) => text.replace(...)",{"type":42,"value":3989}," has nothing to invoke it with. Reference values from the outer scope directly. The function still needs the IIFE wrapping (",{"type":36,"tag":51,"props":3991,"children":3993},{"className":3992},[],[3994],{"type":42,"value":3995},"(...)()",{"type":42,"value":3997},") to actually execute.",{"type":36,"tag":312,"props":3999,"children":4001},{"className":360,"code":4000,"language":362,"meta":320,"style":320},"{{ (() => $json.text.replace(\u002F\\b(?:foo|bar)\\b\u002Fgi, 'baz'))() }}\n",[4002],{"type":36,"tag":51,"props":4003,"children":4004},{"__ignoreMap":320},[4005],{"type":36,"tag":368,"props":4006,"children":4007},{"class":370,"line":371},[4008,4012,4016,4020,4024,4028,4032,4036,4040,4045,4049,4053,4058,4063,4068,4073,4078,4082,4086,4090,4095,4099,4103,4108,4112,4117],{"type":36,"tag":368,"props":4009,"children":4010},{"style":391},[4011],{"type":42,"value":648},{"type":36,"tag":368,"props":4013,"children":4014},{"style":675},[4015],{"type":42,"value":2983},{"type":36,"tag":368,"props":4017,"children":4018},{"style":391},[4019],{"type":42,"value":716},{"type":36,"tag":368,"props":4021,"children":4022},{"style":1140},[4023],{"type":42,"value":1143},{"type":36,"tag":368,"props":4025,"children":4026},{"style":651},[4027],{"type":42,"value":654},{"type":36,"tag":368,"props":4029,"children":4030},{"style":391},[4031],{"type":42,"value":97},{"type":36,"tag":368,"props":4033,"children":4034},{"style":651},[4035],{"type":42,"value":42},{"type":36,"tag":368,"props":4037,"children":4038},{"style":391},[4039],{"type":42,"value":97},{"type":36,"tag":368,"props":4041,"children":4042},{"style":669},[4043],{"type":42,"value":4044},"replace",{"type":36,"tag":368,"props":4046,"children":4047},{"style":675},[4048],{"type":42,"value":857},{"type":36,"tag":368,"props":4050,"children":4051},{"style":391},[4052],{"type":42,"value":3935},{"type":36,"tag":368,"props":4054,"children":4055},{"style":3840},[4056],{"type":42,"value":4057},"\\b",{"type":36,"tag":368,"props":4059,"children":4060},{"style":391},[4061],{"type":42,"value":4062},"(?:",{"type":36,"tag":368,"props":4064,"children":4065},{"style":402},[4066],{"type":42,"value":4067},"foo",{"type":36,"tag":368,"props":4069,"children":4070},{"style":391},[4071],{"type":42,"value":4072},"|",{"type":36,"tag":368,"props":4074,"children":4075},{"style":402},[4076],{"type":42,"value":4077},"bar",{"type":36,"tag":368,"props":4079,"children":4080},{"style":391},[4081],{"type":42,"value":917},{"type":36,"tag":368,"props":4083,"children":4084},{"style":3840},[4085],{"type":42,"value":4057},{"type":36,"tag":368,"props":4087,"children":4088},{"style":391},[4089],{"type":42,"value":3935},{"type":36,"tag":368,"props":4091,"children":4092},{"style":899},[4093],{"type":42,"value":4094},"gi",{"type":36,"tag":368,"props":4096,"children":4097},{"style":391},[4098],{"type":42,"value":907},{"type":36,"tag":368,"props":4100,"children":4101},{"style":391},[4102],{"type":42,"value":807},{"type":36,"tag":368,"props":4104,"children":4105},{"style":402},[4106],{"type":42,"value":4107},"baz",{"type":36,"tag":368,"props":4109,"children":4110},{"style":391},[4111],{"type":42,"value":1216},{"type":36,"tag":368,"props":4113,"children":4114},{"style":675},[4115],{"type":42,"value":4116},"))() ",{"type":36,"tag":368,"props":4118,"children":4119},{"style":391},[4120],{"type":42,"value":683},{"type":36,"tag":45,"props":4122,"children":4123},{},[4124,4126,4131,4133,4139,4141,4146],{"type":42,"value":4125},"The outer ",{"type":36,"tag":51,"props":4127,"children":4129},{"className":4128},[],[4130],{"type":42,"value":857},{"type":42,"value":4132}," and trailing ",{"type":36,"tag":51,"props":4134,"children":4136},{"className":4135},[],[4137],{"type":42,"value":4138},")()",{"type":42,"value":4140}," are mandatory: the first pair brackets the function expression, the trailing ",{"type":36,"tag":51,"props":4142,"children":4144},{"className":4143},[],[4145],{"type":42,"value":716},{"type":42,"value":4147}," invokes it. Drop either and n8n errors and refuses to run the workflow.",{"type":36,"tag":45,"props":4149,"children":4150},{},[4151,4156],{"type":36,"tag":86,"props":4152,"children":4153},{},[4154],{"type":42,"value":4155},"Why this over a Code node?",{"type":42,"value":4157}," The Code node runs in a sandboxed VM: roughly 500-1000ms worst case. The expression IIFE runs in the same context as the surrounding expression: 1-10ms consistently. For pure single-item shaping, that's a 100x gap with no functional difference. This is a common poweruser method.",{"type":36,"tag":45,"props":4159,"children":4160},{},[4161,4163,4169,4171,4177,4179,4184,4185,4191],{"type":42,"value":4162},"A Code node still earns its place for multi-item aggregation (",{"type":36,"tag":51,"props":4164,"children":4166},{"className":4165},[],[4167],{"type":42,"value":4168},"$input.all()",{"type":42,"value":4170},"), external libraries, or async work. See ",{"type":36,"tag":51,"props":4172,"children":4174},{"className":4173},[],[4175],{"type":42,"value":4176},"n8n-code-nodes-official",{"type":42,"value":4178}," for the decision tree, and ",{"type":36,"tag":51,"props":4180,"children":4182},{"className":4181},[],[4183],{"type":42,"value":4176},{"type":42,"value":2757},{"type":36,"tag":51,"props":4186,"children":4188},{"className":4187},[],[4189],{"type":42,"value":4190},"ARROW_FUNCTIONS_IN_EDIT_FIELDS.md",{"type":42,"value":4192}," for longer examples and formatting rules.",{"type":36,"tag":583,"props":4194,"children":4196},{"id":4195},"native-js-available",[4197],{"type":42,"value":4198},"Native JS available",{"type":36,"tag":45,"props":4200,"children":4201},{},[4202,4208,4209,4215,4216,4222,4223,4229,4230,4236,4237,4243,4244,4250,4251,4257,4258,4264,4266,4272],{"type":36,"tag":51,"props":4203,"children":4205},{"className":4204},[],[4206],{"type":42,"value":4207},"String",{"type":42,"value":1067},{"type":36,"tag":51,"props":4210,"children":4212},{"className":4211},[],[4213],{"type":42,"value":4214},"Array",{"type":42,"value":1067},{"type":36,"tag":51,"props":4217,"children":4219},{"className":4218},[],[4220],{"type":42,"value":4221},"Number",{"type":42,"value":1067},{"type":36,"tag":51,"props":4224,"children":4226},{"className":4225},[],[4227],{"type":42,"value":4228},"Object",{"type":42,"value":1067},{"type":36,"tag":51,"props":4231,"children":4233},{"className":4232},[],[4234],{"type":42,"value":4235},"Map",{"type":42,"value":1067},{"type":36,"tag":51,"props":4238,"children":4240},{"className":4239},[],[4241],{"type":42,"value":4242},"Set",{"type":42,"value":1067},{"type":36,"tag":51,"props":4245,"children":4247},{"className":4246},[],[4248],{"type":42,"value":4249},"JSON.parse",{"type":42,"value":1067},{"type":36,"tag":51,"props":4252,"children":4254},{"className":4253},[],[4255],{"type":42,"value":4256},"JSON.stringify",{"type":42,"value":1067},{"type":36,"tag":51,"props":4259,"children":4261},{"className":4260},[],[4262],{"type":42,"value":4263},"Math",{"type":42,"value":4265},", regular expressions, ",{"type":36,"tag":51,"props":4267,"children":4269},{"className":4268},[],[4270],{"type":42,"value":4271},"Date",{"type":42,"value":4273}," (but only use Luxon).",{"type":36,"tag":76,"props":4275,"children":4277},{"id":4276},"useful-idioms",[4278],{"type":42,"value":4279},"Useful idioms",{"type":36,"tag":583,"props":4281,"children":4283},{"id":4282},"default-value-when-a-field-might-be-missing",[4284],{"type":42,"value":4285},"Default value when a field might be missing",{"type":36,"tag":312,"props":4287,"children":4289},{"className":360,"code":4288,"language":362,"meta":320,"style":320},"{{ $json.id || \"fallback-id-here\" }}\n",[4290],{"type":36,"tag":51,"props":4291,"children":4292},{"__ignoreMap":320},[4293],{"type":36,"tag":368,"props":4294,"children":4295},{"class":370,"line":371},[4296,4300,4304,4308,4312,4317,4322,4327,4332],{"type":36,"tag":368,"props":4297,"children":4298},{"style":391},[4299],{"type":42,"value":648},{"type":36,"tag":368,"props":4301,"children":4302},{"style":651},[4303],{"type":42,"value":654},{"type":36,"tag":368,"props":4305,"children":4306},{"style":391},[4307],{"type":42,"value":97},{"type":36,"tag":368,"props":4309,"children":4310},{"style":651},[4311],{"type":42,"value":1451},{"type":36,"tag":368,"props":4313,"children":4314},{"style":391},[4315],{"type":42,"value":4316}," ||",{"type":36,"tag":368,"props":4318,"children":4319},{"style":391},[4320],{"type":42,"value":4321}," \"",{"type":36,"tag":368,"props":4323,"children":4324},{"style":402},[4325],{"type":42,"value":4326},"fallback-id-here",{"type":36,"tag":368,"props":4328,"children":4329},{"style":391},[4330],{"type":42,"value":4331},"\"",{"type":36,"tag":368,"props":4333,"children":4334},{"style":391},[4335],{"type":42,"value":767},{"type":36,"tag":45,"props":4337,"children":4338},{},[4339],{"type":42,"value":4340},"Or with optional chaining:",{"type":36,"tag":312,"props":4342,"children":4344},{"className":360,"code":4343,"language":362,"meta":320,"style":320},"{{ $json.user?.profile?.id ?? \"anonymous\" }}\n",[4345],{"type":36,"tag":51,"props":4346,"children":4347},{"__ignoreMap":320},[4348],{"type":36,"tag":368,"props":4349,"children":4350},{"class":370,"line":371},[4351,4355,4359,4363,4367,4372,4377,4381,4385,4390,4394,4399,4403],{"type":36,"tag":368,"props":4352,"children":4353},{"style":391},[4354],{"type":42,"value":648},{"type":36,"tag":368,"props":4356,"children":4357},{"style":651},[4358],{"type":42,"value":654},{"type":36,"tag":368,"props":4360,"children":4361},{"style":391},[4362],{"type":42,"value":97},{"type":36,"tag":368,"props":4364,"children":4365},{"style":651},[4366],{"type":42,"value":788},{"type":36,"tag":368,"props":4368,"children":4369},{"style":391},[4370],{"type":42,"value":4371},"?.",{"type":36,"tag":368,"props":4373,"children":4374},{"style":651},[4375],{"type":42,"value":4376},"profile",{"type":36,"tag":368,"props":4378,"children":4379},{"style":391},[4380],{"type":42,"value":4371},{"type":36,"tag":368,"props":4382,"children":4383},{"style":651},[4384],{"type":42,"value":1451},{"type":36,"tag":368,"props":4386,"children":4387},{"style":391},[4388],{"type":42,"value":4389}," ??",{"type":36,"tag":368,"props":4391,"children":4392},{"style":391},[4393],{"type":42,"value":4321},{"type":36,"tag":368,"props":4395,"children":4396},{"style":402},[4397],{"type":42,"value":4398},"anonymous",{"type":36,"tag":368,"props":4400,"children":4401},{"style":391},[4402],{"type":42,"value":4331},{"type":36,"tag":368,"props":4404,"children":4405},{"style":391},[4406],{"type":42,"value":767},{"type":36,"tag":45,"props":4408,"children":4409},{},[4410,4412,4418],{"type":42,"value":4411},"Especially useful for filter values feeding queries: pass a default that matches no rows rather than letting the query fail with ",{"type":36,"tag":51,"props":4413,"children":4415},{"className":4414},[],[4416],{"type":42,"value":4417},"undefined",{"type":42,"value":97},{"type":36,"tag":583,"props":4420,"children":4422},{"id":4421},"embedding-json-in-a-text-field-which-serializer",[4423],{"type":42,"value":4424},"Embedding JSON in a text field: which serializer",{"type":36,"tag":45,"props":4426,"children":4427},{},[4428],{"type":42,"value":4429},"Two serializers, two contexts:",{"type":36,"tag":130,"props":4431,"children":4432},{},[4433,4526],{"type":36,"tag":134,"props":4434,"children":4435},{},[4436,4445,4447,4452,4454],{"type":36,"tag":86,"props":4437,"children":4438},{},[4439],{"type":36,"tag":51,"props":4440,"children":4442},{"className":4441},[],[4443],{"type":42,"value":4444},".toJsonString()",{"type":42,"value":4446}," for compact JSON where formatting doesn't matter. Canonical case: ",{"type":36,"tag":86,"props":4448,"children":4449},{},[4450],{"type":42,"value":4451},"AI prompts",{"type":42,"value":4453},". Smaller, easier on tokens, easier to scan in a prompt template.\n",{"type":36,"tag":312,"props":4455,"children":4457},{"className":360,"code":4456,"language":362,"meta":320,"style":320},"{{ $('Get Data').item.json.toJsonString() }}\n",[4458],{"type":36,"tag":51,"props":4459,"children":4460},{"__ignoreMap":320},[4461],{"type":36,"tag":368,"props":4462,"children":4463},{"class":370,"line":371},[4464,4468,4472,4476,4480,4485,4489,4493,4497,4501,4505,4509,4513,4518,4522],{"type":36,"tag":368,"props":4465,"children":4466},{"style":391},[4467],{"type":42,"value":648},{"type":36,"tag":368,"props":4469,"children":4470},{"style":669},[4471],{"type":42,"value":1372},{"type":36,"tag":368,"props":4473,"children":4474},{"style":675},[4475],{"type":42,"value":857},{"type":36,"tag":368,"props":4477,"children":4478},{"style":391},[4479],{"type":42,"value":1216},{"type":36,"tag":368,"props":4481,"children":4482},{"style":402},[4483],{"type":42,"value":4484},"Get Data",{"type":36,"tag":368,"props":4486,"children":4487},{"style":391},[4488],{"type":42,"value":1216},{"type":36,"tag":368,"props":4490,"children":4491},{"style":675},[4492],{"type":42,"value":917},{"type":36,"tag":368,"props":4494,"children":4495},{"style":391},[4496],{"type":42,"value":97},{"type":36,"tag":368,"props":4498,"children":4499},{"style":651},[4500],{"type":42,"value":1595},{"type":36,"tag":368,"props":4502,"children":4503},{"style":391},[4504],{"type":42,"value":97},{"type":36,"tag":368,"props":4506,"children":4507},{"style":651},[4508],{"type":42,"value":1442},{"type":36,"tag":368,"props":4510,"children":4511},{"style":391},[4512],{"type":42,"value":97},{"type":36,"tag":368,"props":4514,"children":4515},{"style":669},[4516],{"type":42,"value":4517},"toJsonString",{"type":36,"tag":368,"props":4519,"children":4520},{"style":675},[4521],{"type":42,"value":678},{"type":36,"tag":368,"props":4523,"children":4524},{"style":391},[4525],{"type":42,"value":683},{"type":36,"tag":134,"props":4527,"children":4528},{},[4529,4538,4540,4545,4547],{"type":36,"tag":86,"props":4530,"children":4531},{},[4532],{"type":36,"tag":51,"props":4533,"children":4535},{"className":4534},[],[4536],{"type":42,"value":4537},"JSON.stringify(value, null, 2)",{"type":42,"value":4539}," for pretty-printed JSON where formatting matters. Canonical case: ",{"type":36,"tag":86,"props":4541,"children":4542},{},[4543],{"type":42,"value":4544},"email bodies, Slack messages, debug output",{"type":42,"value":4546},", anywhere a human reads the result.\n",{"type":36,"tag":312,"props":4548,"children":4550},{"className":360,"code":4549,"language":362,"meta":320,"style":320},"{{ JSON.stringify($('Source Node').item.json, null, 2) }}\n",[4551],{"type":36,"tag":51,"props":4552,"children":4553},{"__ignoreMap":320},[4554],{"type":36,"tag":368,"props":4555,"children":4556},{"class":370,"line":371},[4557,4561,4566,4570,4575,4579,4584,4588,4592,4597,4601,4605,4609,4613,4617,4621,4625,4630,4635,4639],{"type":36,"tag":368,"props":4558,"children":4559},{"style":391},[4560],{"type":42,"value":648},{"type":36,"tag":368,"props":4562,"children":4563},{"style":651},[4564],{"type":42,"value":4565}," JSON",{"type":36,"tag":368,"props":4567,"children":4568},{"style":391},[4569],{"type":42,"value":97},{"type":36,"tag":368,"props":4571,"children":4572},{"style":669},[4573],{"type":42,"value":4574},"stringify",{"type":36,"tag":368,"props":4576,"children":4577},{"style":675},[4578],{"type":42,"value":857},{"type":36,"tag":368,"props":4580,"children":4581},{"style":669},[4582],{"type":42,"value":4583},"$",{"type":36,"tag":368,"props":4585,"children":4586},{"style":675},[4587],{"type":42,"value":857},{"type":36,"tag":368,"props":4589,"children":4590},{"style":391},[4591],{"type":42,"value":1216},{"type":36,"tag":368,"props":4593,"children":4594},{"style":402},[4595],{"type":42,"value":4596},"Source Node",{"type":36,"tag":368,"props":4598,"children":4599},{"style":391},[4600],{"type":42,"value":1216},{"type":36,"tag":368,"props":4602,"children":4603},{"style":675},[4604],{"type":42,"value":917},{"type":36,"tag":368,"props":4606,"children":4607},{"style":391},[4608],{"type":42,"value":97},{"type":36,"tag":368,"props":4610,"children":4611},{"style":651},[4612],{"type":42,"value":1595},{"type":36,"tag":368,"props":4614,"children":4615},{"style":391},[4616],{"type":42,"value":97},{"type":36,"tag":368,"props":4618,"children":4619},{"style":651},[4620],{"type":42,"value":1442},{"type":36,"tag":368,"props":4622,"children":4623},{"style":391},[4624],{"type":42,"value":907},{"type":36,"tag":368,"props":4626,"children":4627},{"style":391},[4628],{"type":42,"value":4629}," null,",{"type":36,"tag":368,"props":4631,"children":4632},{"style":899},[4633],{"type":42,"value":4634}," 2",{"type":36,"tag":368,"props":4636,"children":4637},{"style":675},[4638],{"type":42,"value":927},{"type":36,"tag":368,"props":4640,"children":4641},{"style":391},[4642],{"type":42,"value":683},{"type":36,"tag":45,"props":4644,"children":4645},{},[4646],{"type":42,"value":4647},"Pick deliberately. Pretty-printing inside an LLM prompt wastes tokens and clutters the model's context. Compact JSON in an email is unreadable.",{"type":36,"tag":583,"props":4649,"children":4651},{"id":4650},"jsonstringify-and-jsonparse-where-they-belong",[4652,4657,4658,4663],{"type":36,"tag":51,"props":4653,"children":4655},{"className":4654},[],[4656],{"type":42,"value":4256},{"type":42,"value":3596},{"type":36,"tag":51,"props":4659,"children":4661},{"className":4660},[],[4662],{"type":42,"value":4249},{"type":42,"value":4664},": where they belong",{"type":36,"tag":45,"props":4666,"children":4667},{},[4668,4673,4674,4679,4681],{"type":36,"tag":51,"props":4669,"children":4671},{"className":4670},[],[4672],{"type":42,"value":4256},{"type":42,"value":3596},{"type":36,"tag":51,"props":4675,"children":4677},{"className":4676},[],[4678],{"type":42,"value":4249},{"type":42,"value":4680}," are common in expressions. Both are fine. The key discipline: ",{"type":36,"tag":86,"props":4682,"children":4683},{},[4684],{"type":42,"value":4685},"stringify and parse are storage-layer operations, not interface-layer operations.",{"type":36,"tag":130,"props":4687,"children":4688},{},[4689,4714,4724],{"type":36,"tag":134,"props":4690,"children":4691},{},[4692,4697,4699,4705,4707,4713],{"type":36,"tag":86,"props":4693,"children":4694},{},[4695],{"type":42,"value":4696},"Stringify when you're writing into a storage column that doesn't natively hold the type.",{"type":42,"value":4698}," The canonical case: a Data Tables ",{"type":36,"tag":51,"props":4700,"children":4702},{"className":4701},[],[4703],{"type":42,"value":4704},"_object",{"type":42,"value":4706},"-postfixed string column holding what's actually an array or object. See ",{"type":36,"tag":51,"props":4708,"children":4710},{"className":4709},[],[4711],{"type":42,"value":4712},"n8n-data-tables-official",{"type":42,"value":97},{"type":36,"tag":134,"props":4715,"children":4716},{},[4717,4722],{"type":36,"tag":86,"props":4718,"children":4719},{},[4720],{"type":42,"value":4721},"Parse when you're reading back out of that storage column.",{"type":42,"value":4723}," Inside the workflow that owns the storage.",{"type":36,"tag":134,"props":4725,"children":4726},{},[4727,4732,4734,4739],{"type":36,"tag":86,"props":4728,"children":4729},{},[4730],{"type":42,"value":4731},"Don't propagate the stringified shape across boundaries.",{"type":42,"value":4733}," Sub-workflow returns, webhook responses, agent tool results, downstream consumers: all of those should receive the natural shape (arrays as arrays, objects as objects), not a stringified shell that the caller has to remember to ",{"type":36,"tag":51,"props":4735,"children":4737},{"className":4736},[],[4738],{"type":42,"value":4249},{"type":42,"value":97},{"type":36,"tag":45,"props":4741,"children":4742},{},[4743,4745,4750],{"type":42,"value":4744},"The classic slip: a sub-workflow has a \"fresh\" path (data just produced by an LLM, already an array) and a \"cached\" path (data just read from a ",{"type":36,"tag":51,"props":4746,"children":4748},{"className":4747},[],[4749],{"type":42,"value":4704},{"type":42,"value":4751}," column, still a string). The wrong instinct is to stringify the fresh path \"to match\" the cached one. The right instinct is to parse the cached path so both branches produce the same natural shape on the way out.",{"type":36,"tag":45,"props":4753,"children":4754},{},[4755,4757,4762,4764,4769],{"type":42,"value":4756},"Storage representation belongs inside the workflow that owns the storage. Outside that boundary, talk in natural shapes. ",{"type":36,"tag":51,"props":4758,"children":4760},{"className":4759},[],[4761],{"type":42,"value":529},{"type":42,"value":4763}," SKILL.md \"Return natural shapes, not storage shapes\" covers this from the sub-workflow side, and ",{"type":36,"tag":51,"props":4765,"children":4767},{"className":4766},[],[4768],{"type":42,"value":4712},{"type":42,"value":4770}," covers it from the storage side.",{"type":36,"tag":583,"props":4772,"children":4774},{"id":4773},"returning-the-right-type-when-to-wrap-in",[4775,4777],{"type":42,"value":4776},"Returning the right type: when to wrap in ",{"type":36,"tag":51,"props":4778,"children":4780},{"className":4779},[],[4781],{"type":42,"value":4782},"={{ ... }}",{"type":36,"tag":45,"props":4784,"children":4785},{},[4786,4788,4793,4795,4800],{"type":42,"value":4787},"Some node fields will treat your value as a string literal unless you tell n8n to evaluate it as an expression. Wrapping in ",{"type":36,"tag":51,"props":4789,"children":4791},{"className":4790},[],[4792],{"type":42,"value":4782},{"type":42,"value":4794}," (the ",{"type":36,"tag":51,"props":4796,"children":4798},{"className":4797},[],[4799],{"type":42,"value":2140},{"type":42,"value":4801}," prefix turns the field into expression mode) returns the actual type the inner code produces:",{"type":36,"tag":312,"props":4803,"children":4805},{"className":360,"code":4804,"language":362,"meta":320,"style":320},"\u002F\u002F String literal (default behavior)\nfoo: 'plain string'\n\n\u002F\u002F Number\nfoo: '={{ 100 }}'\n\n\u002F\u002F Boolean\nfoo: '={{ true }}'\n\n\u002F\u002F Object (the `={{ ... }}` is what makes the receiver see an object, not a string)\nfoo: '={{ { \"valid\": true, \"items\": [] } }}'\n\n\u002F\u002F Array\nfoo: '={{ [\"a\", \"b\", \"c\"] }}'\n\n\u002F\u002F Reference to another node's value (preserves whatever type that value already is)\nfoo: '={{ $(\"Source Node\").item.json.payload }}'\n",[4806],{"type":36,"tag":51,"props":4807,"children":4808},{"__ignoreMap":320},[4809,4817,4842,4849,4857,4881,4888,4896,4920,4927,4935,4959,4966,4974,4998,5005,5013],{"type":36,"tag":368,"props":4810,"children":4811},{"class":370,"line":371},[4812],{"type":36,"tag":368,"props":4813,"children":4814},{"style":375},[4815],{"type":42,"value":4816},"\u002F\u002F String literal (default behavior)\n",{"type":36,"tag":368,"props":4818,"children":4819},{"class":370,"line":381},[4820,4824,4828,4832,4837],{"type":36,"tag":368,"props":4821,"children":4822},{"style":385},[4823],{"type":42,"value":4067},{"type":36,"tag":368,"props":4825,"children":4826},{"style":391},[4827],{"type":42,"value":394},{"type":36,"tag":368,"props":4829,"children":4830},{"style":391},[4831],{"type":42,"value":807},{"type":36,"tag":368,"props":4833,"children":4834},{"style":402},[4835],{"type":42,"value":4836},"plain string",{"type":36,"tag":368,"props":4838,"children":4839},{"style":391},[4840],{"type":42,"value":4841},"'\n",{"type":36,"tag":368,"props":4843,"children":4844},{"class":370,"line":413},[4845],{"type":36,"tag":368,"props":4846,"children":4847},{"emptyLinePlaceholder":1349},[4848],{"type":42,"value":1352},{"type":36,"tag":368,"props":4850,"children":4851},{"class":370,"line":770},[4852],{"type":36,"tag":368,"props":4853,"children":4854},{"style":375},[4855],{"type":42,"value":4856},"\u002F\u002F Number\n",{"type":36,"tag":368,"props":4858,"children":4859},{"class":370,"line":843},[4860,4864,4868,4872,4877],{"type":36,"tag":368,"props":4861,"children":4862},{"style":385},[4863],{"type":42,"value":4067},{"type":36,"tag":368,"props":4865,"children":4866},{"style":391},[4867],{"type":42,"value":394},{"type":36,"tag":368,"props":4869,"children":4870},{"style":391},[4871],{"type":42,"value":807},{"type":36,"tag":368,"props":4873,"children":4874},{"style":402},[4875],{"type":42,"value":4876},"={{ 100 }}",{"type":36,"tag":368,"props":4878,"children":4879},{"style":391},[4880],{"type":42,"value":4841},{"type":36,"tag":368,"props":4882,"children":4883},{"class":370,"line":1497},[4884],{"type":36,"tag":368,"props":4885,"children":4886},{"emptyLinePlaceholder":1349},[4887],{"type":42,"value":1352},{"type":36,"tag":368,"props":4889,"children":4890},{"class":370,"line":1505},[4891],{"type":36,"tag":368,"props":4892,"children":4893},{"style":375},[4894],{"type":42,"value":4895},"\u002F\u002F Boolean\n",{"type":36,"tag":368,"props":4897,"children":4898},{"class":370,"line":1514},[4899,4903,4907,4911,4916],{"type":36,"tag":368,"props":4900,"children":4901},{"style":385},[4902],{"type":42,"value":4067},{"type":36,"tag":368,"props":4904,"children":4905},{"style":391},[4906],{"type":42,"value":394},{"type":36,"tag":368,"props":4908,"children":4909},{"style":391},[4910],{"type":42,"value":807},{"type":36,"tag":368,"props":4912,"children":4913},{"style":402},[4914],{"type":42,"value":4915},"={{ true }}",{"type":36,"tag":368,"props":4917,"children":4918},{"style":391},[4919],{"type":42,"value":4841},{"type":36,"tag":368,"props":4921,"children":4922},{"class":370,"line":1523},[4923],{"type":36,"tag":368,"props":4924,"children":4925},{"emptyLinePlaceholder":1349},[4926],{"type":42,"value":1352},{"type":36,"tag":368,"props":4928,"children":4929},{"class":370,"line":1576},[4930],{"type":36,"tag":368,"props":4931,"children":4932},{"style":375},[4933],{"type":42,"value":4934},"\u002F\u002F Object (the `={{ ... }}` is what makes the receiver see an object, not a string)\n",{"type":36,"tag":368,"props":4936,"children":4937},{"class":370,"line":1620},[4938,4942,4946,4950,4955],{"type":36,"tag":368,"props":4939,"children":4940},{"style":385},[4941],{"type":42,"value":4067},{"type":36,"tag":368,"props":4943,"children":4944},{"style":391},[4945],{"type":42,"value":394},{"type":36,"tag":368,"props":4947,"children":4948},{"style":391},[4949],{"type":42,"value":807},{"type":36,"tag":368,"props":4951,"children":4952},{"style":402},[4953],{"type":42,"value":4954},"={{ { \"valid\": true, \"items\": [] } }}",{"type":36,"tag":368,"props":4956,"children":4957},{"style":391},[4958],{"type":42,"value":4841},{"type":36,"tag":368,"props":4960,"children":4961},{"class":370,"line":1680},[4962],{"type":36,"tag":368,"props":4963,"children":4964},{"emptyLinePlaceholder":1349},[4965],{"type":42,"value":1352},{"type":36,"tag":368,"props":4967,"children":4968},{"class":370,"line":1702},[4969],{"type":36,"tag":368,"props":4970,"children":4971},{"style":375},[4972],{"type":42,"value":4973},"\u002F\u002F Array\n",{"type":36,"tag":368,"props":4975,"children":4976},{"class":370,"line":2362},[4977,4981,4985,4989,4994],{"type":36,"tag":368,"props":4978,"children":4979},{"style":385},[4980],{"type":42,"value":4067},{"type":36,"tag":368,"props":4982,"children":4983},{"style":391},[4984],{"type":42,"value":394},{"type":36,"tag":368,"props":4986,"children":4987},{"style":391},[4988],{"type":42,"value":807},{"type":36,"tag":368,"props":4990,"children":4991},{"style":402},[4992],{"type":42,"value":4993},"={{ [\"a\", \"b\", \"c\"] }}",{"type":36,"tag":368,"props":4995,"children":4996},{"style":391},[4997],{"type":42,"value":4841},{"type":36,"tag":368,"props":4999,"children":5000},{"class":370,"line":2371},[5001],{"type":36,"tag":368,"props":5002,"children":5003},{"emptyLinePlaceholder":1349},[5004],{"type":42,"value":1352},{"type":36,"tag":368,"props":5006,"children":5007},{"class":370,"line":2389},[5008],{"type":36,"tag":368,"props":5009,"children":5010},{"style":375},[5011],{"type":42,"value":5012},"\u002F\u002F Reference to another node's value (preserves whatever type that value already is)\n",{"type":36,"tag":368,"props":5014,"children":5015},{"class":370,"line":2419},[5016,5020,5024,5028,5033],{"type":36,"tag":368,"props":5017,"children":5018},{"style":385},[5019],{"type":42,"value":4067},{"type":36,"tag":368,"props":5021,"children":5022},{"style":391},[5023],{"type":42,"value":394},{"type":36,"tag":368,"props":5025,"children":5026},{"style":391},[5027],{"type":42,"value":807},{"type":36,"tag":368,"props":5029,"children":5030},{"style":402},[5031],{"type":42,"value":5032},"={{ $(\"Source Node\").item.json.payload }}",{"type":36,"tag":368,"props":5034,"children":5035},{"style":391},[5036],{"type":42,"value":4841},{"type":36,"tag":45,"props":5038,"children":5039},{},[5040,5042,5048,5050,5056,5058,5063],{"type":42,"value":5041},"When the type matters: object\u002Farray fields on Set \u002F Edit Fields (with the column's ",{"type":36,"tag":51,"props":5043,"children":5045},{"className":5044},[],[5046],{"type":42,"value":5047},"Type",{"type":42,"value":5049}," set to Object or Array), JSON body parameters on HTTP Request, structured inputs to a sub-workflow's typed ",{"type":36,"tag":51,"props":5051,"children":5053},{"className":5052},[],[5054],{"type":42,"value":5055},"workflowInputs.values[type]",{"type":42,"value":5057},", agent tool parameters, anywhere the receiving node validates the type. Without the ",{"type":36,"tag":51,"props":5059,"children":5061},{"className":5060},[],[5062],{"type":42,"value":4782},{"type":42,"value":5064}," wrapper, you'd be passing a string and the receiver either coerces or errors.",{"type":36,"tag":45,"props":5066,"children":5067},{},[5068,5078],{"type":36,"tag":86,"props":5069,"children":5070},{},[5071,5073],{"type":42,"value":5072},"Reference by node name, not ",{"type":36,"tag":51,"props":5074,"children":5076},{"className":5075},[],[5077],{"type":42,"value":64},{"type":42,"value":5079},", per non-negotiable #1 above:",{"type":36,"tag":312,"props":5081,"children":5083},{"className":360,"code":5082,"language":362,"meta":320,"style":320},"\u002F\u002F WRONG\nfoo: '={{ $json.payload }}'\n\n\u002F\u002F RIGHT\nfoo: '={{ $(\"Source Node\").item.json.payload }}'\n",[5084],{"type":36,"tag":51,"props":5085,"children":5086},{"__ignoreMap":320},[5087,5095,5119,5126,5134],{"type":36,"tag":368,"props":5088,"children":5089},{"class":370,"line":371},[5090],{"type":36,"tag":368,"props":5091,"children":5092},{"style":375},[5093],{"type":42,"value":5094},"\u002F\u002F WRONG\n",{"type":36,"tag":368,"props":5096,"children":5097},{"class":370,"line":381},[5098,5102,5106,5110,5115],{"type":36,"tag":368,"props":5099,"children":5100},{"style":385},[5101],{"type":42,"value":4067},{"type":36,"tag":368,"props":5103,"children":5104},{"style":391},[5105],{"type":42,"value":394},{"type":36,"tag":368,"props":5107,"children":5108},{"style":391},[5109],{"type":42,"value":807},{"type":36,"tag":368,"props":5111,"children":5112},{"style":402},[5113],{"type":42,"value":5114},"={{ $json.payload }}",{"type":36,"tag":368,"props":5116,"children":5117},{"style":391},[5118],{"type":42,"value":4841},{"type":36,"tag":368,"props":5120,"children":5121},{"class":370,"line":413},[5122],{"type":36,"tag":368,"props":5123,"children":5124},{"emptyLinePlaceholder":1349},[5125],{"type":42,"value":1352},{"type":36,"tag":368,"props":5127,"children":5128},{"class":370,"line":770},[5129],{"type":36,"tag":368,"props":5130,"children":5131},{"style":375},[5132],{"type":42,"value":5133},"\u002F\u002F RIGHT\n",{"type":36,"tag":368,"props":5135,"children":5136},{"class":370,"line":843},[5137,5141,5145,5149,5153],{"type":36,"tag":368,"props":5138,"children":5139},{"style":385},[5140],{"type":42,"value":4067},{"type":36,"tag":368,"props":5142,"children":5143},{"style":391},[5144],{"type":42,"value":394},{"type":36,"tag":368,"props":5146,"children":5147},{"style":391},[5148],{"type":42,"value":807},{"type":36,"tag":368,"props":5150,"children":5151},{"style":402},[5152],{"type":42,"value":5032},{"type":36,"tag":368,"props":5154,"children":5155},{"style":391},[5156],{"type":42,"value":4841},{"type":36,"tag":45,"props":5158,"children":5159},{},[5160,5162,5167],{"type":42,"value":5161},"The exception: if ",{"type":36,"tag":51,"props":5163,"children":5165},{"className":5164},[],[5166],{"type":42,"value":64},{"type":42,"value":5168}," is genuinely the right thing (no intermediate transforms, no convergence) and the field is a per-item slot on a node that's directly downstream of one source. Even then, named references are more refactor-safe.",{"type":36,"tag":583,"props":5170,"children":5172},{"id":5171},"multi-line-expression-with-explanatory-comment",[5173],{"type":42,"value":5174},"Multi-line expression with explanatory comment",{"type":36,"tag":312,"props":5176,"children":5178},{"className":360,"code":5177,"language":362,"meta":320,"style":320},"{{\n  \u002F\u002F Default to avoid query errors when user_id is missing.\n  \u002F\u002F The fallback UUID is a known-empty row.\n  $json.id || \"305f7106-6988-4651-b26a-18979641b7b5\"\n}}\n",[5179],{"type":36,"tag":51,"props":5180,"children":5181},{"__ignoreMap":320},[5182,5189,5197,5205,5239],{"type":36,"tag":368,"props":5183,"children":5184},{"class":370,"line":371},[5185],{"type":36,"tag":368,"props":5186,"children":5187},{"style":391},[5188],{"type":42,"value":1520},{"type":36,"tag":368,"props":5190,"children":5191},{"class":370,"line":381},[5192],{"type":36,"tag":368,"props":5193,"children":5194},{"style":375},[5195],{"type":42,"value":5196},"  \u002F\u002F Default to avoid query errors when user_id is missing.\n",{"type":36,"tag":368,"props":5198,"children":5199},{"class":370,"line":413},[5200],{"type":36,"tag":368,"props":5201,"children":5202},{"style":375},[5203],{"type":42,"value":5204},"  \u002F\u002F The fallback UUID is a known-empty row.\n",{"type":36,"tag":368,"props":5206,"children":5207},{"class":370,"line":770},[5208,5213,5217,5221,5225,5229,5234],{"type":36,"tag":368,"props":5209,"children":5210},{"style":651},[5211],{"type":42,"value":5212},"  $json",{"type":36,"tag":368,"props":5214,"children":5215},{"style":391},[5216],{"type":42,"value":97},{"type":36,"tag":368,"props":5218,"children":5219},{"style":651},[5220],{"type":42,"value":1451},{"type":36,"tag":368,"props":5222,"children":5223},{"style":391},[5224],{"type":42,"value":4316},{"type":36,"tag":368,"props":5226,"children":5227},{"style":391},[5228],{"type":42,"value":4321},{"type":36,"tag":368,"props":5230,"children":5231},{"style":402},[5232],{"type":42,"value":5233},"305f7106-6988-4651-b26a-18979641b7b5",{"type":36,"tag":368,"props":5235,"children":5236},{"style":391},[5237],{"type":42,"value":5238},"\"\n",{"type":36,"tag":368,"props":5240,"children":5241},{"class":370,"line":843},[5242],{"type":36,"tag":368,"props":5243,"children":5244},{"style":391},[5245],{"type":42,"value":683},{"type":36,"tag":45,"props":5247,"children":5248},{},[5249,5254],{"type":36,"tag":86,"props":5250,"children":5251},{},[5252],{"type":42,"value":5253},"Encouraged",{"type":42,"value":5255}," when logic is non-obvious. The comment will be there for the next reader.",{"type":36,"tag":76,"props":5257,"children":5259},{"id":5258},"what-expressions-cant-do",[5260],{"type":42,"value":5261},"What expressions CAN'T do",{"type":36,"tag":130,"props":5263,"children":5264},{},[5265,5278],{"type":36,"tag":134,"props":5266,"children":5267},{},[5268,5270,5276],{"type":42,"value":5269},"Use external libraries (no ",{"type":36,"tag":51,"props":5271,"children":5273},{"className":5272},[],[5274],{"type":42,"value":5275},"require",{"type":42,"value":5277},").",{"type":36,"tag":134,"props":5279,"children":5280},{},[5281],{"type":42,"value":5282},"Async \u002F await.",{"type":36,"tag":45,"props":5284,"children":5285},{},[5286,5291,5293,5298,5300,5305,5306,5312,5313,5319],{"type":36,"tag":51,"props":5287,"children":5289},{"className":5288},[],[5290],{"type":42,"value":64},{"type":42,"value":5292}," itself is the current item only, but expressions ",{"type":36,"tag":173,"props":5294,"children":5295},{},[5296],{"type":42,"value":5297},"can",{"type":42,"value":5299}," reach across items via ",{"type":36,"tag":51,"props":5301,"children":5303},{"className":5302},[],[5304],{"type":42,"value":4168},{"type":42,"value":1067},{"type":36,"tag":51,"props":5307,"children":5309},{"className":5308},[],[5310],{"type":42,"value":5311},"$input.all()[3]",{"type":42,"value":1067},{"type":36,"tag":51,"props":5314,"children":5316},{"className":5315},[],[5317],{"type":42,"value":5318},"$('Source Node').all()",{"type":42,"value":5320},", etc. See \"Method chains\" above.",{"type":36,"tag":45,"props":5322,"children":5323},{},[5324,5326,5331],{"type":42,"value":5325},"For those, see ",{"type":36,"tag":51,"props":5327,"children":5329},{"className":5328},[],[5330],{"type":42,"value":4176},{"type":42,"value":97},{"type":36,"tag":76,"props":5333,"children":5335},{"id":5334},"decision-expression-edit-fields-or-code-node",[5336],{"type":42,"value":5337},"Decision: expression, Edit Fields, or Code node?",{"type":36,"tag":45,"props":5339,"children":5340},{},[5341,5343,5348],{"type":42,"value":5342},"Per ",{"type":36,"tag":51,"props":5344,"children":5346},{"className":5345},[],[5347],{"type":42,"value":4176},{"type":42,"value":5349},"'s decision tree:",{"type":36,"tag":312,"props":5351,"children":5354},{"className":5352,"code":5353,"language":42},[315],"1. Single-field transform → expression in the field\n2. Multi-step pure logic on one item → arrow function in Edit Fields\n3. Multi-source aggregation, libraries, or stateful → Code node\n",[5355],{"type":36,"tag":51,"props":5356,"children":5357},{"__ignoreMap":320},[5358],{"type":42,"value":5353},{"type":36,"tag":45,"props":5360,"children":5361},{},[5362],{"type":42,"value":5363},"Expression is the default. Reach past it only when input or scope demands it.",{"type":36,"tag":76,"props":5365,"children":5367},{"id":5366},"the-extra-node-smell",[5368],{"type":42,"value":5369},"The \"extra node\" smell",{"type":36,"tag":45,"props":5371,"children":5372},{},[5373],{"type":42,"value":5374},"Common reaches-for-extra-nodes that should stay in expressions:",{"type":36,"tag":5376,"props":5377,"children":5378},"table",{},[5379,5398],{"type":36,"tag":5380,"props":5381,"children":5382},"thead",{},[5383],{"type":36,"tag":5384,"props":5385,"children":5386},"tr",{},[5387,5393],{"type":36,"tag":5388,"props":5389,"children":5390},"th",{},[5391],{"type":42,"value":5392},"Adding this node",{"type":36,"tag":5388,"props":5394,"children":5395},{},[5396],{"type":42,"value":5397},"Better as",{"type":36,"tag":5399,"props":5400,"children":5401},"tbody",{},[5402,5422,5435,5448,5461],{"type":36,"tag":5384,"props":5403,"children":5404},{},[5405,5411],{"type":36,"tag":5406,"props":5407,"children":5408},"td",{},[5409],{"type":42,"value":5410},"DateTime node to format a date",{"type":36,"tag":5406,"props":5412,"children":5413},{},[5414,5420],{"type":36,"tag":51,"props":5415,"children":5417},{"className":5416},[],[5418],{"type":42,"value":5419},"DateTime.fromISO(...).toFormat(...)",{"type":42,"value":5421}," in the consumer's expression",{"type":36,"tag":5384,"props":5423,"children":5424},{},[5425,5430],{"type":36,"tag":5406,"props":5426,"children":5427},{},[5428],{"type":42,"value":5429},"Set node to build an email body",{"type":36,"tag":5406,"props":5431,"children":5432},{},[5433],{"type":42,"value":5434},"Inline the expression in the email node's body field",{"type":36,"tag":5384,"props":5436,"children":5437},{},[5438,5443],{"type":36,"tag":5406,"props":5439,"children":5440},{},[5441],{"type":42,"value":5442},"Set node to compute a derived field used once",{"type":36,"tag":5406,"props":5444,"children":5445},{},[5446],{"type":42,"value":5447},"Inline at the consumer",{"type":36,"tag":5384,"props":5449,"children":5450},{},[5451,5456],{"type":36,"tag":5406,"props":5452,"children":5453},{},[5454],{"type":42,"value":5455},"Two nodes (Set + IF) to compute then test",{"type":36,"tag":5406,"props":5457,"children":5458},{},[5459],{"type":42,"value":5460},"One IF with the computation in its condition expression",{"type":36,"tag":5384,"props":5462,"children":5463},{},[5464,5475],{"type":36,"tag":5406,"props":5465,"children":5466},{},[5467,5469],{"type":42,"value":5468},"Code node to call ",{"type":36,"tag":51,"props":5470,"children":5472},{"className":5471},[],[5473],{"type":42,"value":5474},".toUpperCase()",{"type":36,"tag":5406,"props":5476,"children":5477},{},[5478],{"type":42,"value":5479},"Just the expression",{"type":36,"tag":45,"props":5481,"children":5482},{},[5483],{"type":42,"value":5484},"Adding nodes for transforms means more visual clutter, slower workflows, harder reading.",{"type":36,"tag":45,"props":5486,"children":5487},{},[5488],{"type":42,"value":5489},"When extra nodes ARE right:",{"type":36,"tag":130,"props":5491,"children":5492},{},[5493,5505,5510],{"type":36,"tag":134,"props":5494,"children":5495},{},[5496,5498,5503],{"type":42,"value":5497},"The transform is ",{"type":36,"tag":173,"props":5499,"children":5500},{},[5501],{"type":42,"value":5502},"reused",{"type":42,"value":5504}," across multiple downstream consumers.",{"type":36,"tag":134,"props":5506,"children":5507},{},[5508],{"type":42,"value":5509},"The transform is heavy (Code node territory).",{"type":36,"tag":134,"props":5511,"children":5512},{},[5513,5515,5519],{"type":42,"value":5514},"The transform is the ",{"type":36,"tag":173,"props":5516,"children":5517},{},[5518],{"type":42,"value":177},{"type":42,"value":5520}," of a section (a clear \"compute X\" step).",{"type":36,"tag":76,"props":5522,"children":5524},{"id":5523},"anti-patterns",[5525],{"type":42,"value":5526},"Anti-patterns",{"type":36,"tag":5376,"props":5528,"children":5529},{},[5530,5551],{"type":36,"tag":5380,"props":5531,"children":5532},{},[5533],{"type":36,"tag":5384,"props":5534,"children":5535},{},[5536,5541,5546],{"type":36,"tag":5388,"props":5537,"children":5538},{},[5539],{"type":42,"value":5540},"Anti-pattern",{"type":36,"tag":5388,"props":5542,"children":5543},{},[5544],{"type":42,"value":5545},"What goes wrong",{"type":36,"tag":5388,"props":5547,"children":5548},{},[5549],{"type":42,"value":5550},"Fix",{"type":36,"tag":5399,"props":5552,"children":5553},{},[5554,5580,5598,5631,5653,5671,5699,5717,5761,5786,5811],{"type":36,"tag":5384,"props":5555,"children":5556},{},[5557,5562,5567],{"type":36,"tag":5406,"props":5558,"children":5559},{},[5560],{"type":42,"value":5561},"Set node that exists to extract one field from a webhook body for one downstream consumer",{"type":36,"tag":5406,"props":5563,"children":5564},{},[5565],{"type":42,"value":5566},"Extra node for what should be inlined, fragile to refactor",{"type":36,"tag":5406,"props":5568,"children":5569},{},[5570,5572,5578],{"type":42,"value":5571},"Delete the Set node, reference ",{"type":36,"tag":51,"props":5573,"children":5575},{"className":5574},[],[5576],{"type":42,"value":5577},"$('Webhook').item.json.body.x",{"type":42,"value":5579}," directly in the consumer",{"type":36,"tag":5384,"props":5581,"children":5582},{},[5583,5588,5593],{"type":36,"tag":5406,"props":5584,"children":5585},{},[5586],{"type":42,"value":5587},"Multiple consecutive Set nodes each defining one field",{"type":36,"tag":5406,"props":5589,"children":5590},{},[5591],{"type":42,"value":5592},"Workflow padding",{"type":36,"tag":5406,"props":5594,"children":5595},{},[5596],{"type":42,"value":5597},"Collapse. Most aren't needed, and for the ones that are, group into one Set node",{"type":36,"tag":5384,"props":5599,"children":5600},{},[5601,5613,5618],{"type":36,"tag":5406,"props":5602,"children":5603},{},[5604,5606,5611],{"type":42,"value":5605},"Using ",{"type":36,"tag":51,"props":5607,"children":5609},{"className":5608},[],[5610],{"type":42,"value":209},{"type":42,"value":5612}," deep in a workflow with multiple branches and intermediate transforms",{"type":36,"tag":5406,"props":5614,"children":5615},{},[5616],{"type":42,"value":5617},"Reference breaks when an intermediate is added or context is cleared",{"type":36,"tag":5406,"props":5619,"children":5620},{},[5621,5623,5629],{"type":42,"value":5622},"Use ",{"type":36,"tag":51,"props":5624,"children":5626},{"className":5625},[],[5627],{"type":42,"value":5628},"$('Source Node').item.json.x",{"type":42,"value":5630},". Add a NoOp convergence point if branches merge.",{"type":36,"tag":5384,"props":5632,"children":5633},{},[5634,5639,5644],{"type":36,"tag":5406,"props":5635,"children":5636},{},[5637],{"type":42,"value":5638},"Adding a DateTime node to format a timestamp",{"type":36,"tag":5406,"props":5640,"children":5641},{},[5642],{"type":42,"value":5643},"Extra node for what's a 1-line Luxon expression",{"type":36,"tag":5406,"props":5645,"children":5646},{},[5647],{"type":36,"tag":51,"props":5648,"children":5650},{"className":5649},[],[5651],{"type":42,"value":5652},"{{ DateTime.fromISO($('Source').item.json.x).toFormat('yyyy-MM-dd') }}",{"type":36,"tag":5384,"props":5654,"children":5655},{},[5656,5661,5666],{"type":36,"tag":5406,"props":5657,"children":5658},{},[5659],{"type":42,"value":5660},"Set node to build email HTML, then read it in the Email node",{"type":36,"tag":5406,"props":5662,"children":5663},{},[5664],{"type":42,"value":5665},"Two nodes for what's one expression",{"type":36,"tag":5406,"props":5667,"children":5668},{},[5669],{"type":42,"value":5670},"Build the HTML directly in the email node's body field",{"type":36,"tag":5384,"props":5672,"children":5673},{},[5674,5685,5690],{"type":36,"tag":5406,"props":5675,"children":5676},{},[5677,5683],{"type":36,"tag":51,"props":5678,"children":5680},{"className":5679},[],[5681],{"type":42,"value":5682},"new Date($json.created_at)",{"type":42,"value":5684}," instead of Luxon",{"type":36,"tag":5406,"props":5686,"children":5687},{},[5688],{"type":42,"value":5689},"Loses formatting\u002Fmanipulation features",{"type":36,"tag":5406,"props":5691,"children":5692},{},[5693],{"type":36,"tag":51,"props":5694,"children":5696},{"className":5695},[],[5697],{"type":42,"value":5698},"DateTime.fromISO($('Source').item.json.created_at)",{"type":36,"tag":5384,"props":5700,"children":5701},{},[5702,5707,5712],{"type":36,"tag":5406,"props":5703,"children":5704},{},[5705],{"type":42,"value":5706},"One-line expression that's actually 200 chars",{"type":36,"tag":5406,"props":5708,"children":5709},{},[5710],{"type":42,"value":5711},"Unreadable",{"type":36,"tag":5406,"props":5713,"children":5714},{},[5715],{"type":42,"value":5716},"Multi-line with arrow function, indented, with comments",{"type":36,"tag":5384,"props":5718,"children":5719},{},[5720,5739,5744],{"type":36,"tag":5406,"props":5721,"children":5722},{},[5723,5729,5731,5737],{"type":36,"tag":51,"props":5724,"children":5726},{"className":5725},[],[5727],{"type":42,"value":5728},"$json.foo.bar.baz",{"type":42,"value":5730}," without checking ",{"type":36,"tag":51,"props":5732,"children":5734},{"className":5733},[],[5735],{"type":42,"value":5736},"$json.foo",{"type":42,"value":5738}," exists",{"type":36,"tag":5406,"props":5740,"children":5741},{},[5742],{"type":42,"value":5743},"Crashes on missing intermediate",{"type":36,"tag":5406,"props":5745,"children":5746},{},[5747,5748,5753,5755],{"type":42,"value":5622},{"type":36,"tag":51,"props":5749,"children":5751},{"className":5750},[],[5752],{"type":42,"value":4371},{"type":42,"value":5754}," chain: ",{"type":36,"tag":51,"props":5756,"children":5758},{"className":5757},[],[5759],{"type":42,"value":5760},"$('Source').item.json.foo?.bar?.baz",{"type":36,"tag":5384,"props":5762,"children":5763},{},[5764,5769,5774],{"type":36,"tag":5406,"props":5765,"children":5766},{},[5767],{"type":42,"value":5768},"Hardcoding values in expressions that should be config",{"type":36,"tag":5406,"props":5770,"children":5771},{},[5772],{"type":42,"value":5773},"Magic strings",{"type":36,"tag":5406,"props":5775,"children":5776},{},[5777,5778,5784],{"type":42,"value":5622},{"type":36,"tag":51,"props":5779,"children":5781},{"className":5780},[],[5782],{"type":42,"value":5783},"$vars.X",{"type":42,"value":5785}," (n8n Variables, paid plans) or a Data Table",{"type":36,"tag":5384,"props":5787,"children":5788},{},[5789,5801,5806],{"type":36,"tag":5406,"props":5790,"children":5791},{},[5792,5794,5799],{"type":42,"value":5793},"Branches converge with ",{"type":36,"tag":51,"props":5795,"children":5797},{"className":5796},[],[5798],{"type":42,"value":64},{"type":42,"value":5800}," references downstream",{"type":36,"tag":5406,"props":5802,"children":5803},{},[5804],{"type":42,"value":5805},"Whichever branch fired last wins, non-deterministic",{"type":36,"tag":5406,"props":5807,"children":5808},{},[5809],{"type":42,"value":5810},"Insert a NoOp (\"Combine Inputs\") at the merge, reference by name",{"type":36,"tag":5384,"props":5812,"children":5813},{},[5814,5826,5831],{"type":36,"tag":5406,"props":5815,"children":5816},{},[5817,5818,5824],{"type":42,"value":5605},{"type":36,"tag":51,"props":5819,"children":5821},{"className":5820},[],[5822],{"type":42,"value":5823},"$env.X",{"type":42,"value":5825}," in any expression",{"type":36,"tag":5406,"props":5827,"children":5828},{},[5829],{"type":42,"value":5830},"Doesn't work; throws at runtime",{"type":36,"tag":5406,"props":5832,"children":5833},{},[5834,5836,5841],{"type":42,"value":5835},"For config use ",{"type":36,"tag":51,"props":5837,"children":5839},{"className":5838},[],[5840],{"type":42,"value":5783},{"type":42,"value":5842}," (paid plans) or a Data Table. For secrets use the credential system",{"type":36,"tag":5844,"props":5845,"children":5846},"style",{},[5847],{"type":42,"value":5848},"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":5850,"total":2362},[5851,5865,5880,5895,5913,5927,5938],{"slug":5852,"name":5852,"fn":5853,"description":5854,"org":5855,"tags":5856,"stars":20,"repoUrl":21,"updatedAt":5864},"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},[5857,5860,5863],{"name":5858,"slug":5859,"type":13},"Agents","agents",{"name":5861,"slug":5862,"type":13},"LLM","llm",{"name":18,"slug":19,"type":13},"2026-07-08T05:44:47.938896",{"slug":5866,"name":5866,"fn":5867,"description":5868,"org":5869,"tags":5870,"stars":20,"repoUrl":21,"updatedAt":5879},"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},[5871,5874,5877,5878],{"name":5872,"slug":5873,"type":13},"Automation","automation",{"name":5875,"slug":5876,"type":13},"File Uploads","file-uploads",{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-08T05:45:01.884342",{"slug":4176,"name":4176,"fn":5881,"description":5882,"org":5883,"tags":5884,"stars":20,"repoUrl":21,"updatedAt":5894},"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},[5885,5888,5891],{"name":5886,"slug":5887,"type":13},"Engineering","engineering",{"name":5889,"slug":5890,"type":13},"JavaScript","javascript",{"name":5892,"slug":5893,"type":13},"Python","python","2026-07-08T05:44:49.656127",{"slug":5896,"name":5896,"fn":5897,"description":5898,"org":5899,"tags":5900,"stars":20,"repoUrl":21,"updatedAt":5912},"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},[5901,5904,5905,5906,5909],{"name":5902,"slug":5903,"type":13},"Authentication","authentication",{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":5907,"slug":5908,"type":13},"OAuth","oauth",{"name":5910,"slug":5911,"type":13},"Security","security","2026-07-08T05:45:07.766252",{"slug":4712,"name":4712,"fn":5914,"description":5915,"org":5916,"tags":5917,"stars":20,"repoUrl":21,"updatedAt":5926},"manage n8n Data Tables","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},[5918,5921,5924,5925],{"name":5919,"slug":5920,"type":13},"Data Modeling","data-modeling",{"name":5922,"slug":5923,"type":13},"Database","database",{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-08T05:44:52.048039",{"slug":5928,"name":5928,"fn":5929,"description":5930,"org":5931,"tags":5932,"stars":20,"repoUrl":21,"updatedAt":5937},"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},[5933,5934,5935,5936],{"name":5872,"slug":5873,"type":13},{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-08T05:45:05.897341",{"slug":5939,"name":5939,"fn":5940,"description":5941,"org":5942,"tags":5943,"stars":20,"repoUrl":21,"updatedAt":5950},"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},[5944,5945,5946,5949],{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":5947,"slug":5948,"type":13},"Operations","operations",{"name":18,"slug":19,"type":13},"2026-07-08T05:44:59.710099",{"items":5952,"total":6092},[5953,5970,5983,5994,6004,6015,6028,6045,6054,6066,6076,6086],{"slug":5954,"name":5954,"fn":5955,"description":5956,"org":5957,"tags":5958,"stars":5967,"repoUrl":5968,"updatedAt":5969},"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},[5959,5962,5963,5966],{"name":5960,"slug":5961,"type":13},"Evals","evals",{"name":8,"slug":8,"type":13},{"name":5964,"slug":5965,"type":13},"Testing","testing",{"name":18,"slug":19,"type":13},198156,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fn8n","2026-07-24T05:37:07.398695",{"slug":5971,"name":5971,"fn":5972,"description":5973,"org":5974,"tags":5975,"stars":5967,"repoUrl":5968,"updatedAt":5982},"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},[5976,5977,5980,5981],{"name":5872,"slug":5873,"type":13},{"name":5978,"slug":5979,"type":13},"Configuration","configuration",{"name":8,"slug":8,"type":13},{"name":5907,"slug":5908,"type":13},"2026-06-30T07:40:45.54",{"slug":5984,"name":5984,"fn":5914,"description":5985,"org":5986,"tags":5987,"stars":5967,"repoUrl":5968,"updatedAt":5993},"data-table-manager","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},[5988,5991,5992],{"name":5989,"slug":5990,"type":13},"Data Engineering","data-engineering",{"name":5922,"slug":5923,"type":13},{"name":8,"slug":8,"type":13},"2026-07-27T06:07:14.648144",{"slug":5995,"name":5995,"fn":5996,"description":5997,"org":5998,"tags":5999,"stars":5967,"repoUrl":5968,"updatedAt":5982},"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},[6000,6001,6002,6003],{"name":5872,"slug":5873,"type":13},{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"slug":6005,"name":6005,"fn":6006,"description":6007,"org":6008,"tags":6009,"stars":5967,"repoUrl":5968,"updatedAt":6014},"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},[6010,6011,6012,6013],{"name":5858,"slug":5859,"type":13},{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-30T05:30:06.772347",{"slug":6016,"name":6016,"fn":6017,"description":6018,"org":6019,"tags":6020,"stars":5967,"repoUrl":5968,"updatedAt":6027},"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},[6021,6022,6025,6026],{"name":5872,"slug":5873,"type":13},{"name":6023,"slug":6024,"type":13},"CLI","cli",{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-04-06T18:38:40.360123",{"slug":6029,"name":6029,"fn":6030,"description":6031,"org":6032,"tags":6033,"stars":5967,"repoUrl":5968,"updatedAt":6044},"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},[6034,6037,6038,6041],{"name":6035,"slug":6036,"type":13},"Documentation","documentation",{"name":8,"slug":8,"type":13},{"name":6039,"slug":6040,"type":13},"Reference","reference",{"name":6042,"slug":6043,"type":13},"Search","search","2026-07-27T06:07:15.692906",{"slug":6046,"name":6046,"fn":6047,"description":6048,"org":6049,"tags":6050,"stars":5967,"repoUrl":5968,"updatedAt":5982},"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},[6051,6052,6053],{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},{"slug":6055,"name":6055,"fn":6056,"description":6057,"org":6058,"tags":6059,"stars":5967,"repoUrl":5968,"updatedAt":6065},"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},[6060,6061,6062,6064],{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":6063,"slug":6055,"type":13},"Planning",{"name":18,"slug":19,"type":13},"2026-07-27T06:07:16.673218",{"slug":6067,"name":6067,"fn":6068,"description":6069,"org":6070,"tags":6071,"stars":5967,"repoUrl":5968,"updatedAt":6075},"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},[6072,6073,6074],{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-24T05:37:08.421329",{"slug":6077,"name":6077,"fn":6078,"description":6079,"org":6080,"tags":6081,"stars":5967,"repoUrl":5968,"updatedAt":6085},"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},[6082,6083,6084],{"name":5872,"slug":5873,"type":13},{"name":8,"slug":8,"type":13},{"name":18,"slug":19,"type":13},"2026-07-30T05:30:07.798011",{"slug":5852,"name":5852,"fn":5853,"description":5854,"org":6087,"tags":6088,"stars":20,"repoUrl":21,"updatedAt":5864},{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[6089,6090,6091],{"name":5858,"slug":5859,"type":13},{"name":5861,"slug":5862,"type":13},{"name":18,"slug":19,"type":13},25]