[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-n8n-n8n-binary-and-data-official":3,"mdc-e47ce8-key":33,"related-repo-n8n-n8n-binary-and-data-official":1480,"related-org-n8n-n8n-binary-and-data-official":1578},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"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},"n8n","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fn8n.png","n8n-io",[12,14,17,20],{"name":8,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Automation","automation",{"name":18,"slug":19,"type":13},"File Uploads","file-uploads",{"name":21,"slug":22,"type":13},"Workflow Automation","workflow-automation",319,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills","2026-07-08T05:45:01.884342",null,30,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fn8n-binary-and-data-official","---\nname: n8n-binary-and-data-official\ndescription: 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.\n---\n\n# n8n Binary and Data\n\nn8n handles two kinds of data: JSON (in `$json`) and binary (in `$binary`), flowing side-by-side. Binary has sharp edges around agent tools, storage, and display contexts (chat surfaces, message rendering).\n\nFor tabular storage (Data Tables), see the **`n8n-data-tables-official`** skill.\n\n## Non-negotiables\n\n1. **Binary is in `$binary`, not `$json`.** Don't read file contents from `$json`.\n2. **Binary cannot cross the agent tool boundary in either direction.** Tool parameters are JSON only (via `fromAi()`), and tool results are JSON only. Pre-stage binary in storage and pass keys\u002FURLs through JSON. The agent's `passthroughBinaryImages: true` lets the LLM *see* uploaded images for vision, but it does NOT enable tools to receive them. See `references\u002FAGENT_TOOL_BINARY.md`.\n\n## Strong defaults\n\n- **Merge nodes keep binary in context.** When a side computation strips binary, merge it back rather than re-fetching. See `references\u002FMERGE_FOR_CONTEXT.md`.\n\n## Binary basics\n\nIn n8n, each item has two slots:\n\n```ts\n{\n    json: { ... },           \u002F\u002F your data\n    binary: {                \u002F\u002F your files\n        data: {              \u002F\u002F 'data' is the typical key; can be any name\n            data: '\u003Cbase64>',\n            mimeType: 'application\u002Fpdf',\n            fileName: 'invoice.pdf',\n            fileExtension: 'pdf',\n        },\n    },\n}\n```\n\n`$binary.\u003Ckey>` reads the named property. Most file-handling nodes have a `binaryPropertyName` parameter, the key inside `$binary`.\n\n### Setting binary\n\nFile-producing nodes (HTTP Request with binary response, Read Files, etc.) populate `$binary` automatically. To produce binary in a Code node:\n\n```ts\nreturn [{\n    json: { ... },\n    binary: {\n        data: {\n            data: Buffer.from(content).toString('base64'),\n            mimeType: 'text\u002Fplain',\n            fileName: 'output.txt',\n        },\n    },\n}]\n```\n\n### Reading binary\n\n```ts\n\u002F\u002F In a Code node\nconst buffer = await this.helpers.getBinaryDataBuffer(0, 'data')\nconst text = buffer.toString('utf-8')\n```\n\nMost workflows don't need to read binary directly. Pass it through to consumer nodes (email attachments, file uploads, etc.).\n\nSee `references\u002FBINARY_BASICS.md` for more.\n\n## Agent tool gymnastics\n\nAgent tools (sub-workflows wired into a LangChain Agent, or workflows exposed as MCP tools) have a constraint: parameters and results are JSON, not binary. Affects both directions.\n\n**Inbound (user uploads → tool consumes):** the chat trigger gives `files[]`. The agent can have `passthroughBinaryImages: true` for vision, but `fromAi()` can't pass binary to a tool. So:\n\n1. Pre-stage uploaded files: hash a key, upload to private storage.\n2. Inject the keys into the agent's system prompt: \"Files passed in: [{originalFileName, fileName}]. Use EXACTLY the `fileName` field when calling tools.\"\n3. The tool's `fromAi('imageName', '...', 'string')` receives the key. The sub-workflow downloads from storage.\n\n**Outbound (tool produces → agent returns):** a tool generates a file. It can't return raw binary.\n\n1. Generate binary internally.\n2. Upload to storage, get back URL\u002Fkey.\n3. Return JSON: `{ ok: true, file_id: '...', url: '...' }`.\n4. The agent embeds the URL in its response, or another tool fetches by key.\n\nFor the full pattern including the async-via-webhook variant for long-running tools, see `references\u002FAGENT_TOOL_BINARY.md`.\n\n## Merge for keeping binary in context\n\nA JSON-only operation (Edit Fields, Code, IF) often strips binary from the item. To keep it:\n\n```\n[Source with binary] ─┬─→ [Edit Fields: transform JSON] ─┐\n                      │                                    ├─→ [Merge: by position] ─→ [Email with attachment]\n                      └─────────────────────────────────────┘\n```\n\nMerge combines the streams, and binary survives. See `references\u002FMERGE_FOR_CONTEXT.md`.\n\n## CDN requirement for chat surfaces\n\nWhen a workflow generates an image and the user wants it embedded in a chat message (Slack, Discord, Teams, Telegram, embedded webhook chat, etc.):\n\n- **Binary on the item isn't enough.** Chat surfaces don't read `$binary`; they render messages that reference images by URL (or via platform-specific file upload APIs).\n- **The image must live somewhere a URL can fetch.** Upload to a CDN or object store first.\n- **The user configures this storage.** Not built into n8n.\n\nCommon options span object storage (S3, R2, GCS, Azure Blob, Vercel Blob, Supabase Storage) and drive-style services (Dropbox, Google Drive, OneDrive, Box). Ask the user what they use rather than defaulting to S3.\n\nSee `references\u002FCDN_REQUIREMENT.md`.\n\n## Data Tables\n\nFor Data Tables, see the **`n8n-data-tables-official`** skill. Distinct surface with its own gotchas (default columns, no foreign keys, no JSON column type, manual-mapping UI quirk).\n\n## Reference files\n\n| File | Read when |\n|---|---|\n| `references\u002FBINARY_BASICS.md` | First time handling binary, or reading\u002Fwriting the `$binary` slot |\n| `references\u002FAGENT_TOOL_BINARY.md` | Agent tool needs a user-uploaded file, or produces a file (the boundary in either direction) |\n| `references\u002FMERGE_FOR_CONTEXT.md` | Binary disappears after a JSON transform and needs to re-attach |\n| `references\u002FCDN_REQUIREMENT.md` | Showing images in a chat surface or other places that need URL-referenced images |\n\n## Anti-patterns\n\n| Anti-pattern | What goes wrong | Fix |\n|---|---|---|\n| Trying to read file content from `$json` | Binary isn't in `$json` | Use `$binary` |\n| Building an agent tool that returns binary directly | Tool output is JSON-only, so binary doesn't survive | Upload to storage, return key\u002FURL in JSON (see `AGENT_TOOL_BINARY.md`) |\n| Trying to pass uploaded chat files into a tool via `fromAi` | `fromAi` doesn't carry binary, so the tool gets nothing | Pre-stage uploads to storage, inject keys in the system prompt, and have the tool download by key |\n| Setting `passthroughBinaryImages: true` and assuming tools can now see the file | The flag only affects what the LLM sees, not what tools receive | Still need the upload-and-pass-key pattern for tools |\n| Losing binary after a JSON transform | The transform's output item doesn't have binary | Use Merge to combine the JSON output with the binary stream |\n| Storing image in n8n binary and expecting a chat surface to display | Chat surfaces need URL-accessible images (or a platform-native file upload), not raw `$binary` | Upload to CDN, embed URL or use the platform's file API |\n| Hardcoding binary base64 in a Code node | Massive workflow JSON, slow, leaky | Reference binary via `$binary` properly, or upload to storage and reference by URL |\n\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,47,70,87,94,170,176,197,203,208,462,487,494,506,738,744,885,890,903,909,914,946,987,997,1027,1038,1044,1049,1059,1070,1076,1081,1121,1126,1137,1143,1158,1164,1263,1269,1474],{"type":39,"tag":40,"props":41,"children":43},"element","h1",{"id":42},"n8n-binary-and-data",[44],{"type":45,"value":46},"text","n8n Binary and Data",{"type":39,"tag":48,"props":49,"children":50},"p",{},[51,53,60,62,68],{"type":45,"value":52},"n8n handles two kinds of data: JSON (in ",{"type":39,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"$json",{"type":45,"value":61},") and binary (in ",{"type":39,"tag":54,"props":63,"children":65},{"className":64},[],[66],{"type":45,"value":67},"$binary",{"type":45,"value":69},"), flowing side-by-side. Binary has sharp edges around agent tools, storage, and display contexts (chat surfaces, message rendering).",{"type":39,"tag":48,"props":71,"children":72},{},[73,75,85],{"type":45,"value":74},"For tabular storage (Data Tables), see the ",{"type":39,"tag":76,"props":77,"children":78},"strong",{},[79],{"type":39,"tag":54,"props":80,"children":82},{"className":81},[],[83],{"type":45,"value":84},"n8n-data-tables-official",{"type":45,"value":86}," skill.",{"type":39,"tag":88,"props":89,"children":91},"h2",{"id":90},"non-negotiables",[92],{"type":45,"value":93},"Non-negotiables",{"type":39,"tag":95,"props":96,"children":97},"ol",{},[98,129],{"type":39,"tag":99,"props":100,"children":101},"li",{},[102,121,123,128],{"type":39,"tag":76,"props":103,"children":104},{},[105,107,112,114,119],{"type":45,"value":106},"Binary is in ",{"type":39,"tag":54,"props":108,"children":110},{"className":109},[],[111],{"type":45,"value":67},{"type":45,"value":113},", not ",{"type":39,"tag":54,"props":115,"children":117},{"className":116},[],[118],{"type":45,"value":59},{"type":45,"value":120},".",{"type":45,"value":122}," Don't read file contents from ",{"type":39,"tag":54,"props":124,"children":126},{"className":125},[],[127],{"type":45,"value":59},{"type":45,"value":120},{"type":39,"tag":99,"props":130,"children":131},{},[132,137,139,145,147,153,155,161,163,169],{"type":39,"tag":76,"props":133,"children":134},{},[135],{"type":45,"value":136},"Binary cannot cross the agent tool boundary in either direction.",{"type":45,"value":138}," Tool parameters are JSON only (via ",{"type":39,"tag":54,"props":140,"children":142},{"className":141},[],[143],{"type":45,"value":144},"fromAi()",{"type":45,"value":146},"), and tool results are JSON only. Pre-stage binary in storage and pass keys\u002FURLs through JSON. The agent's ",{"type":39,"tag":54,"props":148,"children":150},{"className":149},[],[151],{"type":45,"value":152},"passthroughBinaryImages: true",{"type":45,"value":154}," lets the LLM ",{"type":39,"tag":156,"props":157,"children":158},"em",{},[159],{"type":45,"value":160},"see",{"type":45,"value":162}," uploaded images for vision, but it does NOT enable tools to receive them. See ",{"type":39,"tag":54,"props":164,"children":166},{"className":165},[],[167],{"type":45,"value":168},"references\u002FAGENT_TOOL_BINARY.md",{"type":45,"value":120},{"type":39,"tag":88,"props":171,"children":173},{"id":172},"strong-defaults",[174],{"type":45,"value":175},"Strong defaults",{"type":39,"tag":177,"props":178,"children":179},"ul",{},[180],{"type":39,"tag":99,"props":181,"children":182},{},[183,188,190,196],{"type":39,"tag":76,"props":184,"children":185},{},[186],{"type":45,"value":187},"Merge nodes keep binary in context.",{"type":45,"value":189}," When a side computation strips binary, merge it back rather than re-fetching. See ",{"type":39,"tag":54,"props":191,"children":193},{"className":192},[],[194],{"type":45,"value":195},"references\u002FMERGE_FOR_CONTEXT.md",{"type":45,"value":120},{"type":39,"tag":88,"props":198,"children":200},{"id":199},"binary-basics",[201],{"type":45,"value":202},"Binary basics",{"type":39,"tag":48,"props":204,"children":205},{},[206],{"type":45,"value":207},"In n8n, each item has two slots:",{"type":39,"tag":209,"props":210,"children":215},"pre",{"className":211,"code":212,"language":213,"meta":214,"style":214},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n    json: { ... },           \u002F\u002F your data\n    binary: {                \u002F\u002F your files\n        data: {              \u002F\u002F 'data' is the typical key; can be any name\n            data: '\u003Cbase64>',\n            mimeType: 'application\u002Fpdf',\n            fileName: 'invoice.pdf',\n            fileExtension: 'pdf',\n        },\n    },\n}\n","ts","",[216],{"type":39,"tag":54,"props":217,"children":218},{"__ignoreMap":214},[219,231,267,289,311,345,375,405,435,444,453],{"type":39,"tag":220,"props":221,"children":224},"span",{"class":222,"line":223},"line",1,[225],{"type":39,"tag":220,"props":226,"children":228},{"style":227},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[229],{"type":45,"value":230},"{\n",{"type":39,"tag":220,"props":232,"children":234},{"class":222,"line":233},2,[235,241,246,251,256,261],{"type":39,"tag":220,"props":236,"children":238},{"style":237},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[239],{"type":45,"value":240},"    json",{"type":39,"tag":220,"props":242,"children":243},{"style":227},[244],{"type":45,"value":245},":",{"type":39,"tag":220,"props":247,"children":248},{"style":227},[249],{"type":45,"value":250}," {",{"type":39,"tag":220,"props":252,"children":253},{"style":227},[254],{"type":45,"value":255}," ...",{"type":39,"tag":220,"props":257,"children":258},{"style":227},[259],{"type":45,"value":260}," },",{"type":39,"tag":220,"props":262,"children":264},{"style":263},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[265],{"type":45,"value":266},"           \u002F\u002F your data\n",{"type":39,"tag":220,"props":268,"children":270},{"class":222,"line":269},3,[271,276,280,284],{"type":39,"tag":220,"props":272,"children":273},{"style":237},[274],{"type":45,"value":275},"    binary",{"type":39,"tag":220,"props":277,"children":278},{"style":227},[279],{"type":45,"value":245},{"type":39,"tag":220,"props":281,"children":282},{"style":227},[283],{"type":45,"value":250},{"type":39,"tag":220,"props":285,"children":286},{"style":263},[287],{"type":45,"value":288},"                \u002F\u002F your files\n",{"type":39,"tag":220,"props":290,"children":292},{"class":222,"line":291},4,[293,298,302,306],{"type":39,"tag":220,"props":294,"children":295},{"style":237},[296],{"type":45,"value":297},"        data",{"type":39,"tag":220,"props":299,"children":300},{"style":227},[301],{"type":45,"value":245},{"type":39,"tag":220,"props":303,"children":304},{"style":227},[305],{"type":45,"value":250},{"type":39,"tag":220,"props":307,"children":308},{"style":263},[309],{"type":45,"value":310},"              \u002F\u002F 'data' is the typical key; can be any name\n",{"type":39,"tag":220,"props":312,"children":314},{"class":222,"line":313},5,[315,320,324,329,335,340],{"type":39,"tag":220,"props":316,"children":317},{"style":237},[318],{"type":45,"value":319},"            data",{"type":39,"tag":220,"props":321,"children":322},{"style":227},[323],{"type":45,"value":245},{"type":39,"tag":220,"props":325,"children":326},{"style":227},[327],{"type":45,"value":328}," '",{"type":39,"tag":220,"props":330,"children":332},{"style":331},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[333],{"type":45,"value":334},"\u003Cbase64>",{"type":39,"tag":220,"props":336,"children":337},{"style":227},[338],{"type":45,"value":339},"'",{"type":39,"tag":220,"props":341,"children":342},{"style":227},[343],{"type":45,"value":344},",\n",{"type":39,"tag":220,"props":346,"children":348},{"class":222,"line":347},6,[349,354,358,362,367,371],{"type":39,"tag":220,"props":350,"children":351},{"style":237},[352],{"type":45,"value":353},"            mimeType",{"type":39,"tag":220,"props":355,"children":356},{"style":227},[357],{"type":45,"value":245},{"type":39,"tag":220,"props":359,"children":360},{"style":227},[361],{"type":45,"value":328},{"type":39,"tag":220,"props":363,"children":364},{"style":331},[365],{"type":45,"value":366},"application\u002Fpdf",{"type":39,"tag":220,"props":368,"children":369},{"style":227},[370],{"type":45,"value":339},{"type":39,"tag":220,"props":372,"children":373},{"style":227},[374],{"type":45,"value":344},{"type":39,"tag":220,"props":376,"children":378},{"class":222,"line":377},7,[379,384,388,392,397,401],{"type":39,"tag":220,"props":380,"children":381},{"style":237},[382],{"type":45,"value":383},"            fileName",{"type":39,"tag":220,"props":385,"children":386},{"style":227},[387],{"type":45,"value":245},{"type":39,"tag":220,"props":389,"children":390},{"style":227},[391],{"type":45,"value":328},{"type":39,"tag":220,"props":393,"children":394},{"style":331},[395],{"type":45,"value":396},"invoice.pdf",{"type":39,"tag":220,"props":398,"children":399},{"style":227},[400],{"type":45,"value":339},{"type":39,"tag":220,"props":402,"children":403},{"style":227},[404],{"type":45,"value":344},{"type":39,"tag":220,"props":406,"children":408},{"class":222,"line":407},8,[409,414,418,422,427,431],{"type":39,"tag":220,"props":410,"children":411},{"style":237},[412],{"type":45,"value":413},"            fileExtension",{"type":39,"tag":220,"props":415,"children":416},{"style":227},[417],{"type":45,"value":245},{"type":39,"tag":220,"props":419,"children":420},{"style":227},[421],{"type":45,"value":328},{"type":39,"tag":220,"props":423,"children":424},{"style":331},[425],{"type":45,"value":426},"pdf",{"type":39,"tag":220,"props":428,"children":429},{"style":227},[430],{"type":45,"value":339},{"type":39,"tag":220,"props":432,"children":433},{"style":227},[434],{"type":45,"value":344},{"type":39,"tag":220,"props":436,"children":438},{"class":222,"line":437},9,[439],{"type":39,"tag":220,"props":440,"children":441},{"style":227},[442],{"type":45,"value":443},"        },\n",{"type":39,"tag":220,"props":445,"children":447},{"class":222,"line":446},10,[448],{"type":39,"tag":220,"props":449,"children":450},{"style":227},[451],{"type":45,"value":452},"    },\n",{"type":39,"tag":220,"props":454,"children":456},{"class":222,"line":455},11,[457],{"type":39,"tag":220,"props":458,"children":459},{"style":227},[460],{"type":45,"value":461},"}\n",{"type":39,"tag":48,"props":463,"children":464},{},[465,471,473,479,481,486],{"type":39,"tag":54,"props":466,"children":468},{"className":467},[],[469],{"type":45,"value":470},"$binary.\u003Ckey>",{"type":45,"value":472}," reads the named property. Most file-handling nodes have a ",{"type":39,"tag":54,"props":474,"children":476},{"className":475},[],[477],{"type":45,"value":478},"binaryPropertyName",{"type":45,"value":480}," parameter, the key inside ",{"type":39,"tag":54,"props":482,"children":484},{"className":483},[],[485],{"type":45,"value":67},{"type":45,"value":120},{"type":39,"tag":488,"props":489,"children":491},"h3",{"id":490},"setting-binary",[492],{"type":45,"value":493},"Setting binary",{"type":39,"tag":48,"props":495,"children":496},{},[497,499,504],{"type":45,"value":498},"File-producing nodes (HTTP Request with binary response, Read Files, etc.) populate ",{"type":39,"tag":54,"props":500,"children":502},{"className":501},[],[503],{"type":45,"value":67},{"type":45,"value":505}," automatically. To produce binary in a Code node:",{"type":39,"tag":209,"props":507,"children":509},{"className":211,"code":508,"language":213,"meta":214,"style":214},"return [{\n    json: { ... },\n    binary: {\n        data: {\n            data: Buffer.from(content).toString('base64'),\n            mimeType: 'text\u002Fplain',\n            fileName: 'output.txt',\n        },\n    },\n}]\n",[510],{"type":39,"tag":54,"props":511,"children":512},{"__ignoreMap":214},[513,532,557,573,588,655,683,711,718,725],{"type":39,"tag":220,"props":514,"children":515},{"class":222,"line":223},[516,522,528],{"type":39,"tag":220,"props":517,"children":519},{"style":518},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[520],{"type":45,"value":521},"return",{"type":39,"tag":220,"props":523,"children":525},{"style":524},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[526],{"type":45,"value":527}," [",{"type":39,"tag":220,"props":529,"children":530},{"style":227},[531],{"type":45,"value":230},{"type":39,"tag":220,"props":533,"children":534},{"class":222,"line":233},[535,540,544,548,552],{"type":39,"tag":220,"props":536,"children":538},{"style":537},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[539],{"type":45,"value":240},{"type":39,"tag":220,"props":541,"children":542},{"style":227},[543],{"type":45,"value":245},{"type":39,"tag":220,"props":545,"children":546},{"style":227},[547],{"type":45,"value":250},{"type":39,"tag":220,"props":549,"children":550},{"style":227},[551],{"type":45,"value":255},{"type":39,"tag":220,"props":553,"children":554},{"style":227},[555],{"type":45,"value":556}," },\n",{"type":39,"tag":220,"props":558,"children":559},{"class":222,"line":269},[560,564,568],{"type":39,"tag":220,"props":561,"children":562},{"style":537},[563],{"type":45,"value":275},{"type":39,"tag":220,"props":565,"children":566},{"style":227},[567],{"type":45,"value":245},{"type":39,"tag":220,"props":569,"children":570},{"style":227},[571],{"type":45,"value":572}," {\n",{"type":39,"tag":220,"props":574,"children":575},{"class":222,"line":291},[576,580,584],{"type":39,"tag":220,"props":577,"children":578},{"style":537},[579],{"type":45,"value":297},{"type":39,"tag":220,"props":581,"children":582},{"style":227},[583],{"type":45,"value":245},{"type":39,"tag":220,"props":585,"children":586},{"style":227},[587],{"type":45,"value":572},{"type":39,"tag":220,"props":589,"children":590},{"class":222,"line":313},[591,595,599,604,608,614,619,623,628,633,637,642,646,651],{"type":39,"tag":220,"props":592,"children":593},{"style":537},[594],{"type":45,"value":319},{"type":39,"tag":220,"props":596,"children":597},{"style":227},[598],{"type":45,"value":245},{"type":39,"tag":220,"props":600,"children":601},{"style":524},[602],{"type":45,"value":603}," Buffer",{"type":39,"tag":220,"props":605,"children":606},{"style":227},[607],{"type":45,"value":120},{"type":39,"tag":220,"props":609,"children":611},{"style":610},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[612],{"type":45,"value":613},"from",{"type":39,"tag":220,"props":615,"children":616},{"style":524},[617],{"type":45,"value":618},"(content)",{"type":39,"tag":220,"props":620,"children":621},{"style":227},[622],{"type":45,"value":120},{"type":39,"tag":220,"props":624,"children":625},{"style":610},[626],{"type":45,"value":627},"toString",{"type":39,"tag":220,"props":629,"children":630},{"style":524},[631],{"type":45,"value":632},"(",{"type":39,"tag":220,"props":634,"children":635},{"style":227},[636],{"type":45,"value":339},{"type":39,"tag":220,"props":638,"children":639},{"style":331},[640],{"type":45,"value":641},"base64",{"type":39,"tag":220,"props":643,"children":644},{"style":227},[645],{"type":45,"value":339},{"type":39,"tag":220,"props":647,"children":648},{"style":524},[649],{"type":45,"value":650},")",{"type":39,"tag":220,"props":652,"children":653},{"style":227},[654],{"type":45,"value":344},{"type":39,"tag":220,"props":656,"children":657},{"class":222,"line":347},[658,662,666,670,675,679],{"type":39,"tag":220,"props":659,"children":660},{"style":537},[661],{"type":45,"value":353},{"type":39,"tag":220,"props":663,"children":664},{"style":227},[665],{"type":45,"value":245},{"type":39,"tag":220,"props":667,"children":668},{"style":227},[669],{"type":45,"value":328},{"type":39,"tag":220,"props":671,"children":672},{"style":331},[673],{"type":45,"value":674},"text\u002Fplain",{"type":39,"tag":220,"props":676,"children":677},{"style":227},[678],{"type":45,"value":339},{"type":39,"tag":220,"props":680,"children":681},{"style":227},[682],{"type":45,"value":344},{"type":39,"tag":220,"props":684,"children":685},{"class":222,"line":377},[686,690,694,698,703,707],{"type":39,"tag":220,"props":687,"children":688},{"style":537},[689],{"type":45,"value":383},{"type":39,"tag":220,"props":691,"children":692},{"style":227},[693],{"type":45,"value":245},{"type":39,"tag":220,"props":695,"children":696},{"style":227},[697],{"type":45,"value":328},{"type":39,"tag":220,"props":699,"children":700},{"style":331},[701],{"type":45,"value":702},"output.txt",{"type":39,"tag":220,"props":704,"children":705},{"style":227},[706],{"type":45,"value":339},{"type":39,"tag":220,"props":708,"children":709},{"style":227},[710],{"type":45,"value":344},{"type":39,"tag":220,"props":712,"children":713},{"class":222,"line":407},[714],{"type":39,"tag":220,"props":715,"children":716},{"style":227},[717],{"type":45,"value":443},{"type":39,"tag":220,"props":719,"children":720},{"class":222,"line":437},[721],{"type":39,"tag":220,"props":722,"children":723},{"style":227},[724],{"type":45,"value":452},{"type":39,"tag":220,"props":726,"children":727},{"class":222,"line":446},[728,733],{"type":39,"tag":220,"props":729,"children":730},{"style":227},[731],{"type":45,"value":732},"}",{"type":39,"tag":220,"props":734,"children":735},{"style":524},[736],{"type":45,"value":737},"]\n",{"type":39,"tag":488,"props":739,"children":741},{"id":740},"reading-binary",[742],{"type":45,"value":743},"Reading binary",{"type":39,"tag":209,"props":745,"children":747},{"className":211,"code":746,"language":213,"meta":214,"style":214},"\u002F\u002F In a Code node\nconst buffer = await this.helpers.getBinaryDataBuffer(0, 'data')\nconst text = buffer.toString('utf-8')\n",[748],{"type":39,"tag":54,"props":749,"children":750},{"__ignoreMap":214},[751,759,835],{"type":39,"tag":220,"props":752,"children":753},{"class":222,"line":223},[754],{"type":39,"tag":220,"props":755,"children":756},{"style":263},[757],{"type":45,"value":758},"\u002F\u002F In a Code node\n",{"type":39,"tag":220,"props":760,"children":761},{"class":222,"line":233},[762,768,773,778,783,788,793,797,802,806,812,817,821,826,830],{"type":39,"tag":220,"props":763,"children":765},{"style":764},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[766],{"type":45,"value":767},"const",{"type":39,"tag":220,"props":769,"children":770},{"style":524},[771],{"type":45,"value":772}," buffer ",{"type":39,"tag":220,"props":774,"children":775},{"style":227},[776],{"type":45,"value":777},"=",{"type":39,"tag":220,"props":779,"children":780},{"style":518},[781],{"type":45,"value":782}," await",{"type":39,"tag":220,"props":784,"children":785},{"style":227},[786],{"type":45,"value":787}," this.",{"type":39,"tag":220,"props":789,"children":790},{"style":524},[791],{"type":45,"value":792},"helpers",{"type":39,"tag":220,"props":794,"children":795},{"style":227},[796],{"type":45,"value":120},{"type":39,"tag":220,"props":798,"children":799},{"style":610},[800],{"type":45,"value":801},"getBinaryDataBuffer",{"type":39,"tag":220,"props":803,"children":804},{"style":524},[805],{"type":45,"value":632},{"type":39,"tag":220,"props":807,"children":809},{"style":808},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[810],{"type":45,"value":811},"0",{"type":39,"tag":220,"props":813,"children":814},{"style":227},[815],{"type":45,"value":816},",",{"type":39,"tag":220,"props":818,"children":819},{"style":227},[820],{"type":45,"value":328},{"type":39,"tag":220,"props":822,"children":823},{"style":331},[824],{"type":45,"value":825},"data",{"type":39,"tag":220,"props":827,"children":828},{"style":227},[829],{"type":45,"value":339},{"type":39,"tag":220,"props":831,"children":832},{"style":524},[833],{"type":45,"value":834},")\n",{"type":39,"tag":220,"props":836,"children":837},{"class":222,"line":269},[838,842,847,851,856,860,864,868,872,877,881],{"type":39,"tag":220,"props":839,"children":840},{"style":764},[841],{"type":45,"value":767},{"type":39,"tag":220,"props":843,"children":844},{"style":524},[845],{"type":45,"value":846}," text ",{"type":39,"tag":220,"props":848,"children":849},{"style":227},[850],{"type":45,"value":777},{"type":39,"tag":220,"props":852,"children":853},{"style":524},[854],{"type":45,"value":855}," buffer",{"type":39,"tag":220,"props":857,"children":858},{"style":227},[859],{"type":45,"value":120},{"type":39,"tag":220,"props":861,"children":862},{"style":610},[863],{"type":45,"value":627},{"type":39,"tag":220,"props":865,"children":866},{"style":524},[867],{"type":45,"value":632},{"type":39,"tag":220,"props":869,"children":870},{"style":227},[871],{"type":45,"value":339},{"type":39,"tag":220,"props":873,"children":874},{"style":331},[875],{"type":45,"value":876},"utf-8",{"type":39,"tag":220,"props":878,"children":879},{"style":227},[880],{"type":45,"value":339},{"type":39,"tag":220,"props":882,"children":883},{"style":524},[884],{"type":45,"value":834},{"type":39,"tag":48,"props":886,"children":887},{},[888],{"type":45,"value":889},"Most workflows don't need to read binary directly. Pass it through to consumer nodes (email attachments, file uploads, etc.).",{"type":39,"tag":48,"props":891,"children":892},{},[893,895,901],{"type":45,"value":894},"See ",{"type":39,"tag":54,"props":896,"children":898},{"className":897},[],[899],{"type":45,"value":900},"references\u002FBINARY_BASICS.md",{"type":45,"value":902}," for more.",{"type":39,"tag":88,"props":904,"children":906},{"id":905},"agent-tool-gymnastics",[907],{"type":45,"value":908},"Agent tool gymnastics",{"type":39,"tag":48,"props":910,"children":911},{},[912],{"type":45,"value":913},"Agent tools (sub-workflows wired into a LangChain Agent, or workflows exposed as MCP tools) have a constraint: parameters and results are JSON, not binary. Affects both directions.",{"type":39,"tag":48,"props":915,"children":916},{},[917,922,924,930,932,937,939,944],{"type":39,"tag":76,"props":918,"children":919},{},[920],{"type":45,"value":921},"Inbound (user uploads → tool consumes):",{"type":45,"value":923}," the chat trigger gives ",{"type":39,"tag":54,"props":925,"children":927},{"className":926},[],[928],{"type":45,"value":929},"files[]",{"type":45,"value":931},". The agent can have ",{"type":39,"tag":54,"props":933,"children":935},{"className":934},[],[936],{"type":45,"value":152},{"type":45,"value":938}," for vision, but ",{"type":39,"tag":54,"props":940,"children":942},{"className":941},[],[943],{"type":45,"value":144},{"type":45,"value":945}," can't pass binary to a tool. So:",{"type":39,"tag":95,"props":947,"children":948},{},[949,954,974],{"type":39,"tag":99,"props":950,"children":951},{},[952],{"type":45,"value":953},"Pre-stage uploaded files: hash a key, upload to private storage.",{"type":39,"tag":99,"props":955,"children":956},{},[957,959,964,966,972],{"type":45,"value":958},"Inject the keys into the agent's system prompt: \"Files passed in: ",{"type":39,"tag":220,"props":960,"children":961},{},[962],{"type":45,"value":963},"{originalFileName, fileName}",{"type":45,"value":965},". Use EXACTLY the ",{"type":39,"tag":54,"props":967,"children":969},{"className":968},[],[970],{"type":45,"value":971},"fileName",{"type":45,"value":973}," field when calling tools.\"",{"type":39,"tag":99,"props":975,"children":976},{},[977,979,985],{"type":45,"value":978},"The tool's ",{"type":39,"tag":54,"props":980,"children":982},{"className":981},[],[983],{"type":45,"value":984},"fromAi('imageName', '...', 'string')",{"type":45,"value":986}," receives the key. The sub-workflow downloads from storage.",{"type":39,"tag":48,"props":988,"children":989},{},[990,995],{"type":39,"tag":76,"props":991,"children":992},{},[993],{"type":45,"value":994},"Outbound (tool produces → agent returns):",{"type":45,"value":996}," a tool generates a file. It can't return raw binary.",{"type":39,"tag":95,"props":998,"children":999},{},[1000,1005,1010,1022],{"type":39,"tag":99,"props":1001,"children":1002},{},[1003],{"type":45,"value":1004},"Generate binary internally.",{"type":39,"tag":99,"props":1006,"children":1007},{},[1008],{"type":45,"value":1009},"Upload to storage, get back URL\u002Fkey.",{"type":39,"tag":99,"props":1011,"children":1012},{},[1013,1015,1021],{"type":45,"value":1014},"Return JSON: ",{"type":39,"tag":54,"props":1016,"children":1018},{"className":1017},[],[1019],{"type":45,"value":1020},"{ ok: true, file_id: '...', url: '...' }",{"type":45,"value":120},{"type":39,"tag":99,"props":1023,"children":1024},{},[1025],{"type":45,"value":1026},"The agent embeds the URL in its response, or another tool fetches by key.",{"type":39,"tag":48,"props":1028,"children":1029},{},[1030,1032,1037],{"type":45,"value":1031},"For the full pattern including the async-via-webhook variant for long-running tools, see ",{"type":39,"tag":54,"props":1033,"children":1035},{"className":1034},[],[1036],{"type":45,"value":168},{"type":45,"value":120},{"type":39,"tag":88,"props":1039,"children":1041},{"id":1040},"merge-for-keeping-binary-in-context",[1042],{"type":45,"value":1043},"Merge for keeping binary in context",{"type":39,"tag":48,"props":1045,"children":1046},{},[1047],{"type":45,"value":1048},"A JSON-only operation (Edit Fields, Code, IF) often strips binary from the item. To keep it:",{"type":39,"tag":209,"props":1050,"children":1054},{"className":1051,"code":1053,"language":45},[1052],"language-text","[Source with binary] ─┬─→ [Edit Fields: transform JSON] ─┐\n                      │                                    ├─→ [Merge: by position] ─→ [Email with attachment]\n                      └─────────────────────────────────────┘\n",[1055],{"type":39,"tag":54,"props":1056,"children":1057},{"__ignoreMap":214},[1058],{"type":45,"value":1053},{"type":39,"tag":48,"props":1060,"children":1061},{},[1062,1064,1069],{"type":45,"value":1063},"Merge combines the streams, and binary survives. See ",{"type":39,"tag":54,"props":1065,"children":1067},{"className":1066},[],[1068],{"type":45,"value":195},{"type":45,"value":120},{"type":39,"tag":88,"props":1071,"children":1073},{"id":1072},"cdn-requirement-for-chat-surfaces",[1074],{"type":45,"value":1075},"CDN requirement for chat surfaces",{"type":39,"tag":48,"props":1077,"children":1078},{},[1079],{"type":45,"value":1080},"When a workflow generates an image and the user wants it embedded in a chat message (Slack, Discord, Teams, Telegram, embedded webhook chat, etc.):",{"type":39,"tag":177,"props":1082,"children":1083},{},[1084,1101,1111],{"type":39,"tag":99,"props":1085,"children":1086},{},[1087,1092,1094,1099],{"type":39,"tag":76,"props":1088,"children":1089},{},[1090],{"type":45,"value":1091},"Binary on the item isn't enough.",{"type":45,"value":1093}," Chat surfaces don't read ",{"type":39,"tag":54,"props":1095,"children":1097},{"className":1096},[],[1098],{"type":45,"value":67},{"type":45,"value":1100},"; they render messages that reference images by URL (or via platform-specific file upload APIs).",{"type":39,"tag":99,"props":1102,"children":1103},{},[1104,1109],{"type":39,"tag":76,"props":1105,"children":1106},{},[1107],{"type":45,"value":1108},"The image must live somewhere a URL can fetch.",{"type":45,"value":1110}," Upload to a CDN or object store first.",{"type":39,"tag":99,"props":1112,"children":1113},{},[1114,1119],{"type":39,"tag":76,"props":1115,"children":1116},{},[1117],{"type":45,"value":1118},"The user configures this storage.",{"type":45,"value":1120}," Not built into n8n.",{"type":39,"tag":48,"props":1122,"children":1123},{},[1124],{"type":45,"value":1125},"Common options span object storage (S3, R2, GCS, Azure Blob, Vercel Blob, Supabase Storage) and drive-style services (Dropbox, Google Drive, OneDrive, Box). Ask the user what they use rather than defaulting to S3.",{"type":39,"tag":48,"props":1127,"children":1128},{},[1129,1130,1136],{"type":45,"value":894},{"type":39,"tag":54,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":45,"value":1135},"references\u002FCDN_REQUIREMENT.md",{"type":45,"value":120},{"type":39,"tag":88,"props":1138,"children":1140},{"id":1139},"data-tables",[1141],{"type":45,"value":1142},"Data Tables",{"type":39,"tag":48,"props":1144,"children":1145},{},[1146,1148,1156],{"type":45,"value":1147},"For Data Tables, see the ",{"type":39,"tag":76,"props":1149,"children":1150},{},[1151],{"type":39,"tag":54,"props":1152,"children":1154},{"className":1153},[],[1155],{"type":45,"value":84},{"type":45,"value":1157}," skill. Distinct surface with its own gotchas (default columns, no foreign keys, no JSON column type, manual-mapping UI quirk).",{"type":39,"tag":88,"props":1159,"children":1161},{"id":1160},"reference-files",[1162],{"type":45,"value":1163},"Reference files",{"type":39,"tag":1165,"props":1166,"children":1167},"table",{},[1168,1187],{"type":39,"tag":1169,"props":1170,"children":1171},"thead",{},[1172],{"type":39,"tag":1173,"props":1174,"children":1175},"tr",{},[1176,1182],{"type":39,"tag":1177,"props":1178,"children":1179},"th",{},[1180],{"type":45,"value":1181},"File",{"type":39,"tag":1177,"props":1183,"children":1184},{},[1185],{"type":45,"value":1186},"Read when",{"type":39,"tag":1188,"props":1189,"children":1190},"tbody",{},[1191,1215,1231,1247],{"type":39,"tag":1173,"props":1192,"children":1193},{},[1194,1203],{"type":39,"tag":1195,"props":1196,"children":1197},"td",{},[1198],{"type":39,"tag":54,"props":1199,"children":1201},{"className":1200},[],[1202],{"type":45,"value":900},{"type":39,"tag":1195,"props":1204,"children":1205},{},[1206,1208,1213],{"type":45,"value":1207},"First time handling binary, or reading\u002Fwriting the ",{"type":39,"tag":54,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":45,"value":67},{"type":45,"value":1214}," slot",{"type":39,"tag":1173,"props":1216,"children":1217},{},[1218,1226],{"type":39,"tag":1195,"props":1219,"children":1220},{},[1221],{"type":39,"tag":54,"props":1222,"children":1224},{"className":1223},[],[1225],{"type":45,"value":168},{"type":39,"tag":1195,"props":1227,"children":1228},{},[1229],{"type":45,"value":1230},"Agent tool needs a user-uploaded file, or produces a file (the boundary in either direction)",{"type":39,"tag":1173,"props":1232,"children":1233},{},[1234,1242],{"type":39,"tag":1195,"props":1235,"children":1236},{},[1237],{"type":39,"tag":54,"props":1238,"children":1240},{"className":1239},[],[1241],{"type":45,"value":195},{"type":39,"tag":1195,"props":1243,"children":1244},{},[1245],{"type":45,"value":1246},"Binary disappears after a JSON transform and needs to re-attach",{"type":39,"tag":1173,"props":1248,"children":1249},{},[1250,1258],{"type":39,"tag":1195,"props":1251,"children":1252},{},[1253],{"type":39,"tag":54,"props":1254,"children":1256},{"className":1255},[],[1257],{"type":45,"value":1135},{"type":39,"tag":1195,"props":1259,"children":1260},{},[1261],{"type":45,"value":1262},"Showing images in a chat surface or other places that need URL-referenced images",{"type":39,"tag":88,"props":1264,"children":1266},{"id":1265},"anti-patterns",[1267],{"type":45,"value":1268},"Anti-patterns",{"type":39,"tag":1165,"props":1270,"children":1271},{},[1272,1293],{"type":39,"tag":1169,"props":1273,"children":1274},{},[1275],{"type":39,"tag":1173,"props":1276,"children":1277},{},[1278,1283,1288],{"type":39,"tag":1177,"props":1279,"children":1280},{},[1281],{"type":45,"value":1282},"Anti-pattern",{"type":39,"tag":1177,"props":1284,"children":1285},{},[1286],{"type":45,"value":1287},"What goes wrong",{"type":39,"tag":1177,"props":1289,"children":1290},{},[1291],{"type":45,"value":1292},"Fix",{"type":39,"tag":1188,"props":1294,"children":1295},{},[1296,1329,1354,1383,1408,1426,1449],{"type":39,"tag":1173,"props":1297,"children":1298},{},[1299,1309,1319],{"type":39,"tag":1195,"props":1300,"children":1301},{},[1302,1304],{"type":45,"value":1303},"Trying to read file content from ",{"type":39,"tag":54,"props":1305,"children":1307},{"className":1306},[],[1308],{"type":45,"value":59},{"type":39,"tag":1195,"props":1310,"children":1311},{},[1312,1314],{"type":45,"value":1313},"Binary isn't in ",{"type":39,"tag":54,"props":1315,"children":1317},{"className":1316},[],[1318],{"type":45,"value":59},{"type":39,"tag":1195,"props":1320,"children":1321},{},[1322,1324],{"type":45,"value":1323},"Use ",{"type":39,"tag":54,"props":1325,"children":1327},{"className":1326},[],[1328],{"type":45,"value":67},{"type":39,"tag":1173,"props":1330,"children":1331},{},[1332,1337,1342],{"type":39,"tag":1195,"props":1333,"children":1334},{},[1335],{"type":45,"value":1336},"Building an agent tool that returns binary directly",{"type":39,"tag":1195,"props":1338,"children":1339},{},[1340],{"type":45,"value":1341},"Tool output is JSON-only, so binary doesn't survive",{"type":39,"tag":1195,"props":1343,"children":1344},{},[1345,1347,1353],{"type":45,"value":1346},"Upload to storage, return key\u002FURL in JSON (see ",{"type":39,"tag":54,"props":1348,"children":1350},{"className":1349},[],[1351],{"type":45,"value":1352},"AGENT_TOOL_BINARY.md",{"type":45,"value":650},{"type":39,"tag":1173,"props":1355,"children":1356},{},[1357,1368,1378],{"type":39,"tag":1195,"props":1358,"children":1359},{},[1360,1362],{"type":45,"value":1361},"Trying to pass uploaded chat files into a tool via ",{"type":39,"tag":54,"props":1363,"children":1365},{"className":1364},[],[1366],{"type":45,"value":1367},"fromAi",{"type":39,"tag":1195,"props":1369,"children":1370},{},[1371,1376],{"type":39,"tag":54,"props":1372,"children":1374},{"className":1373},[],[1375],{"type":45,"value":1367},{"type":45,"value":1377}," doesn't carry binary, so the tool gets nothing",{"type":39,"tag":1195,"props":1379,"children":1380},{},[1381],{"type":45,"value":1382},"Pre-stage uploads to storage, inject keys in the system prompt, and have the tool download by key",{"type":39,"tag":1173,"props":1384,"children":1385},{},[1386,1398,1403],{"type":39,"tag":1195,"props":1387,"children":1388},{},[1389,1391,1396],{"type":45,"value":1390},"Setting ",{"type":39,"tag":54,"props":1392,"children":1394},{"className":1393},[],[1395],{"type":45,"value":152},{"type":45,"value":1397}," and assuming tools can now see the file",{"type":39,"tag":1195,"props":1399,"children":1400},{},[1401],{"type":45,"value":1402},"The flag only affects what the LLM sees, not what tools receive",{"type":39,"tag":1195,"props":1404,"children":1405},{},[1406],{"type":45,"value":1407},"Still need the upload-and-pass-key pattern for tools",{"type":39,"tag":1173,"props":1409,"children":1410},{},[1411,1416,1421],{"type":39,"tag":1195,"props":1412,"children":1413},{},[1414],{"type":45,"value":1415},"Losing binary after a JSON transform",{"type":39,"tag":1195,"props":1417,"children":1418},{},[1419],{"type":45,"value":1420},"The transform's output item doesn't have binary",{"type":39,"tag":1195,"props":1422,"children":1423},{},[1424],{"type":45,"value":1425},"Use Merge to combine the JSON output with the binary stream",{"type":39,"tag":1173,"props":1427,"children":1428},{},[1429,1434,1444],{"type":39,"tag":1195,"props":1430,"children":1431},{},[1432],{"type":45,"value":1433},"Storing image in n8n binary and expecting a chat surface to display",{"type":39,"tag":1195,"props":1435,"children":1436},{},[1437,1439],{"type":45,"value":1438},"Chat surfaces need URL-accessible images (or a platform-native file upload), not raw ",{"type":39,"tag":54,"props":1440,"children":1442},{"className":1441},[],[1443],{"type":45,"value":67},{"type":39,"tag":1195,"props":1445,"children":1446},{},[1447],{"type":45,"value":1448},"Upload to CDN, embed URL or use the platform's file API",{"type":39,"tag":1173,"props":1450,"children":1451},{},[1452,1457,1462],{"type":39,"tag":1195,"props":1453,"children":1454},{},[1455],{"type":45,"value":1456},"Hardcoding binary base64 in a Code node",{"type":39,"tag":1195,"props":1458,"children":1459},{},[1460],{"type":45,"value":1461},"Massive workflow JSON, slow, leaky",{"type":39,"tag":1195,"props":1463,"children":1464},{},[1465,1467,1472],{"type":45,"value":1466},"Reference binary via ",{"type":39,"tag":54,"props":1468,"children":1470},{"className":1469},[],[1471],{"type":45,"value":67},{"type":45,"value":1473}," properly, or upload to storage and reference by URL",{"type":39,"tag":1475,"props":1476,"children":1477},"style",{},[1478],{"type":45,"value":1479},"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":1481,"total":1577},[1482,1496,1503,1519,1537,1551,1564],{"slug":1483,"name":1483,"fn":1484,"description":1485,"org":1486,"tags":1487,"stars":23,"repoUrl":24,"updatedAt":1495},"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},[1488,1491,1494],{"name":1489,"slug":1490,"type":13},"Agents","agents",{"name":1492,"slug":1493,"type":13},"LLM","llm",{"name":21,"slug":22,"type":13},"2026-07-08T05:44:47.938896",{"slug":4,"name":4,"fn":5,"description":6,"org":1497,"tags":1498,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[1499,1500,1501,1502],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"slug":1504,"name":1504,"fn":1505,"description":1506,"org":1507,"tags":1508,"stars":23,"repoUrl":24,"updatedAt":1518},"n8n-code-nodes-official","write custom logic in n8n","Use when the user reaches for a Code node, mentions writing JavaScript or Python in n8n, or any custom logic comes up in workflow design. Triggers on \"Code node\", \"Code\", \"JavaScript\", \"Python\", \"custom logic\", \"transform data\", \"$input\", \"$json transformation\", \"loop in code\", \"write a function\", or any time the obvious answer seems to be \"just put it in code.\"",{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[1509,1512,1515],{"name":1510,"slug":1511,"type":13},"Engineering","engineering",{"name":1513,"slug":1514,"type":13},"JavaScript","javascript",{"name":1516,"slug":1517,"type":13},"Python","python","2026-07-08T05:44:49.656127",{"slug":1520,"name":1520,"fn":1521,"description":1522,"org":1523,"tags":1524,"stars":23,"repoUrl":24,"updatedAt":1536},"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},[1525,1528,1529,1530,1533],{"name":1526,"slug":1527,"type":13},"Authentication","authentication",{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":1531,"slug":1532,"type":13},"OAuth","oauth",{"name":1534,"slug":1535,"type":13},"Security","security","2026-07-08T05:45:07.766252",{"slug":84,"name":84,"fn":1538,"description":1539,"org":1540,"tags":1541,"stars":23,"repoUrl":24,"updatedAt":1550},"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},[1542,1545,1548,1549],{"name":1543,"slug":1544,"type":13},"Data Modeling","data-modeling",{"name":1546,"slug":1547,"type":13},"Database","database",{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-07-08T05:44:52.048039",{"slug":1552,"name":1552,"fn":1553,"description":1554,"org":1555,"tags":1556,"stars":23,"repoUrl":24,"updatedAt":1563},"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},[1557,1558,1561,1562],{"name":15,"slug":16,"type":13},{"name":1559,"slug":1560,"type":13},"Debugging","debugging",{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-07-08T05:45:05.897341",{"slug":1565,"name":1565,"fn":1566,"description":1567,"org":1568,"tags":1569,"stars":23,"repoUrl":24,"updatedAt":1576},"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},[1570,1571,1572,1575],{"name":1559,"slug":1560,"type":13},{"name":8,"slug":8,"type":13},{"name":1573,"slug":1574,"type":13},"Operations","operations",{"name":21,"slug":22,"type":13},"2026-07-08T05:44:59.710099",14,{"items":1579,"total":1719},[1580,1597,1610,1621,1631,1642,1655,1672,1681,1693,1703,1713],{"slug":1581,"name":1581,"fn":1582,"description":1583,"org":1584,"tags":1585,"stars":1594,"repoUrl":1595,"updatedAt":1596},"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},[1586,1589,1590,1593],{"name":1587,"slug":1588,"type":13},"Evals","evals",{"name":8,"slug":8,"type":13},{"name":1591,"slug":1592,"type":13},"Testing","testing",{"name":21,"slug":22,"type":13},198156,"https:\u002F\u002Fgithub.com\u002Fn8n-io\u002Fn8n","2026-07-24T05:37:07.398695",{"slug":1598,"name":1598,"fn":1599,"description":1600,"org":1601,"tags":1602,"stars":1594,"repoUrl":1595,"updatedAt":1609},"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},[1603,1604,1607,1608],{"name":15,"slug":16,"type":13},{"name":1605,"slug":1606,"type":13},"Configuration","configuration",{"name":8,"slug":8,"type":13},{"name":1531,"slug":1532,"type":13},"2026-06-30T07:40:45.54",{"slug":1611,"name":1611,"fn":1538,"description":1612,"org":1613,"tags":1614,"stars":1594,"repoUrl":1595,"updatedAt":1620},"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},[1615,1618,1619],{"name":1616,"slug":1617,"type":13},"Data Engineering","data-engineering",{"name":1546,"slug":1547,"type":13},{"name":8,"slug":8,"type":13},"2026-07-27T06:07:14.648144",{"slug":1622,"name":1622,"fn":1623,"description":1624,"org":1625,"tags":1626,"stars":1594,"repoUrl":1595,"updatedAt":1609},"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},[1627,1628,1629,1630],{"name":15,"slug":16,"type":13},{"name":1559,"slug":1560,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"slug":1632,"name":1632,"fn":1633,"description":1634,"org":1635,"tags":1636,"stars":1594,"repoUrl":1595,"updatedAt":1641},"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},[1637,1638,1639,1640],{"name":1489,"slug":1490,"type":13},{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-07-30T05:30:06.772347",{"slug":1643,"name":1643,"fn":1644,"description":1645,"org":1646,"tags":1647,"stars":1594,"repoUrl":1595,"updatedAt":1654},"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},[1648,1649,1652,1653],{"name":15,"slug":16,"type":13},{"name":1650,"slug":1651,"type":13},"CLI","cli",{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-04-06T18:38:40.360123",{"slug":1656,"name":1656,"fn":1657,"description":1658,"org":1659,"tags":1660,"stars":1594,"repoUrl":1595,"updatedAt":1671},"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},[1661,1664,1665,1668],{"name":1662,"slug":1663,"type":13},"Documentation","documentation",{"name":8,"slug":8,"type":13},{"name":1666,"slug":1667,"type":13},"Reference","reference",{"name":1669,"slug":1670,"type":13},"Search","search","2026-07-27T06:07:15.692906",{"slug":1673,"name":1673,"fn":1674,"description":1675,"org":1676,"tags":1677,"stars":1594,"repoUrl":1595,"updatedAt":1609},"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},[1678,1679,1680],{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"slug":1682,"name":1682,"fn":1683,"description":1684,"org":1685,"tags":1686,"stars":1594,"repoUrl":1595,"updatedAt":1692},"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},[1687,1688,1689,1691],{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":1690,"slug":1682,"type":13},"Planning",{"name":21,"slug":22,"type":13},"2026-07-27T06:07:16.673218",{"slug":1694,"name":1694,"fn":1695,"description":1696,"org":1697,"tags":1698,"stars":1594,"repoUrl":1595,"updatedAt":1702},"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},[1699,1700,1701],{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-07-24T05:37:08.421329",{"slug":1704,"name":1704,"fn":1705,"description":1706,"org":1707,"tags":1708,"stars":1594,"repoUrl":1595,"updatedAt":1712},"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},[1709,1710,1711],{"name":15,"slug":16,"type":13},{"name":8,"slug":8,"type":13},{"name":21,"slug":22,"type":13},"2026-07-30T05:30:07.798011",{"slug":1483,"name":1483,"fn":1484,"description":1485,"org":1714,"tags":1715,"stars":23,"repoUrl":24,"updatedAt":1495},{"slug":8,"name":8,"logoUrl":9,"githubOrg":10},[1716,1717,1718],{"name":1489,"slug":1490,"type":13},{"name":1492,"slug":1493,"type":13},{"name":21,"slug":22,"type":13},25]