Individual skill
n8n-binary-and-data
Handle files and binary data in n8n correctly. Use when working with files, images, PDFs, attachments, uploads or downloads, base64, vision/multimodal input, or when an AI agent needs a file as tool input or output — and whenever the user mentions $binary, binaryPropertyName, "read the PDF", "attach the file", "send the image", Merge losing binary, or a CDN for chat images. Covers the $binary vs $json split, reading/writing binary, keeping binary alive across transforms with Merge, the agent-tool binary boundary, and the CDN/URL requirement for chat surfaces.
skills/n8n-binary-and-data/SKILL.md
Source commit e037563e101749e630e6688d121d04529fe6ee7b
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 9, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 6,610
- Repository last updated
- Oct 24, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-agents Repository topic
- n8n Repository topic
- workflow-automation Repository topic
- writing Derived category
- data Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENT_TOOL_BINARY.mddoc · 14,807 bytesBINARY_BASICS.mddoc · 9,323 bytesCDN_REQUIREMENT.mddoc · 6,263 bytesMERGE_FOR_CONTEXT.mddoc · 7,337 bytesREADME.mddoc · 8,578 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytesSKILL.mdcore · 15,901 bytes
Read excerpt
# n8n Binary and Data
Every n8n item carries two independent slots: `$json` for structured data and `$binary` for file bytes. They travel side by side through the workflow. File contents — the actual PDF, image, or zip — live in `$binary`, never in `$json`. Get that split wrong and you read an empty field, lose a file mid-flow, or hand an AI agent a tool input it can't use.
This skill covers where binary lives, how to read and write it, how to keep it from being silently stripped, the hard wall between binary and the AI-agent tool boundary, and why chat surfaces need a URL instead of raw bytes.
---
## The three rules that prevent 90% of binary bugs
1. **File contents are in `$binary`, not `$json`.** After an HTTP download, a "Read Files", or an email-attachment trigger, the bytes sit in `$binary.<key>`. `$json` holds metadata at most. Reading `$json.data` for file contents gives you nothing.
2. **Binary cannot cross the AI-agent tool boundary — in either direction.** Tool arguments and tool return values are JSON only. An uploaded image can't be passed into a tool as a file, and a tool can't return raw bytes. Pre-stage to storage and pass a key or URL through JSON instead. See `AGENT_TOOL_BINARY.md`.