n8n-binary-and-data
Was er macht
Dieses Tool hilft dir, Dateien und Binärdaten (wie Bilder oder PDFs) in n8n zu verwalten. Es sorgt dafür, dass diese Dateien korrekt gesendet, empfangen, umgewandelt und übertragen werden, und hält sie getrennt von normalen Daten (Text und Zahlen).
Wann du ihn nutzt
- ✓Wenn du eine Datei als E-Mail-Anhang verschicken möchtest.
- ✓Wenn du eine Datei zu einem externen Dienst hochlädst.
- ✓Wenn ein Bild im Chat angezeigt werden soll.
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-binary-and-data/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wie schicke ich ein Bild, das ich in einem Chat erhalten habe, an einen Speicherdienst?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Das Tool trennt Dateidaten (binär) von Text- und Zahlendaten. Dateien werden getrennt behandelt und können korrekt gesendet oder empfangen werden, auch wenn du fortgeschrittene Funktionen wie KI-Agenten nutzt.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
n8n Binary and Data
When to Use
Use this skill when an n8n workflow reads, transforms, stores, uploads, downloads, or transmits files and binary fields, including multimodal agent inputs and chat attachments.
Treat uploaded files and generated URLs as potentially sensitive. Obtain approval before sending data to a new external host, use the narrowest retention and access scope available, avoid logging bytes or base64 payloads, and do not embed credentials in URLs or workflow fields.
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
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>.$jsonholds metadata at most. Reading$json.datafor file contents gives you nothing.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
references/AGENT_TOOL_BINARY.md.Chat surfaces render images by URL, not by
$binary. Slack, Discord, Teams, Telegram, embedded webhook chat — none of them read the binary slot. The image has to live somewhere a URL can fetch it. Seereferences/CDN_REQUIREMENT.md.
The two slots
Each item is shaped like this:
{
"json": { "customerId": 42, "status": "sent" },
"binary": {
"invoice": {
"data": "<base64-encoded bytes>",
"mimeType": "application/pdf",
"fileName": "invoice-42.pdf",
"fileExtension": "pdf"
}
}
}
The key inside binary (invoice here) is the binary property name. Most file-handling nodes have a binaryPropertyName parameter that points at it — the producer names the slot, the consumer references it by that name. The default key across most nodes is data, so when nothing tells you otherwise, assume $binary.data.
$json and $binary are separate namespaces. An expression like {{ $binary.invoice.fileName }} reads file metadata; {{ $json.customerId }} reads data. They never mix.
This split also explains a webhook gotcha: a Webhook trigger receiving multipart/form-data puts the uploaded file in $binary and the accompanying form fields in $json.body — so an uploaded file is not somewhere under $json at all. (The $json.body nesting for webhooks is n8n-expression-syntax territory.)
See references/BINARY_BASICS.md for the full slot anatomy, mime types, and size limits.
Producing binary
You rarely build a $binary slot by hand — nodes populate it for you:
| Source | How binary appears |
|---|---|
HTTP Request with responseFormat: "file" |
Response body lands in $binary.data (or the name you set) |
| Read/Write Files from Disk | File contents read into $binary |
| Storage downloads (S3, Google Drive, Dropbox, etc.) | Downloaded file in $binary.<key> |
| Email triggers with attachments | Each attachment arrives in $binary |
| Provider AI media nodes (image/audio gen) | Set options.binaryPropertyOutput so the bytes land where the next node looks |
For an HTTP download, the one field that matters is responseFormat. Confirm it with get_node on nodes-base.httpRequest — leaving it as the default JSON/string format is the classic reason a downloaded file ends up as garbled text in $json instead of clean bytes in $binary.
Reading and writing binary in a Code node
Most workflows never need to crack open the bytes — they just pass binary through to a consumer (email attachment, file upload, Slack file). When you do need the raw bytes, do it in a Code node.
Read with getBinaryDataBuffer — do not try to base64-decode $binary.<key>.data by hand:
// Code node, "Run Once for Each Item"
…
Häufige Fragen
Wo werden die Dateidaten gespeichert?
Der eigentliche Dateiinhalt (etwa ein PDF oder Bild) liegt im Bereich '$binary', nicht in '$json', das für normale Daten gedacht ist.
Kann ich eine Datei direkt an ein KI-Tool schicken?
Nein, KI-Tools verstehen nur Text (JSON). Du musst die Datei zuerst speichern und dann den Link (URL) an die KI schicken.
Warum werden meine Bilder nicht im Chat angezeigt?
Chats brauchen einen Link (URL), um Bilder anzuzeigen. Sie lesen keine rohen Dateidaten. Du musst das Bild speichern und den Link angeben.
Details
Originalbeschreibung des Autors
Handle n8n files and binary data across uploads, downloads, transforms, multimodal inputs, agent tools, and chat surfaces.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #5267
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
diffs
394kLässt deinen Agenten einen echten, teilbaren Diff seiner Änderungen als Viewer-Link oder Bilddatei erstellen, statt einer handgeschriebenen Zusammenfassung.
coding-agent
394kHilft deinem Agenten, eine größere Programmieraufgabe als Hintergrund-Worker an Codex, Claude Code oder OpenCode zu übergeben und danach den Fortschritt zu prüfen.
gh-issues
394kHilft deinem Agenten, GitHub-Issues zu finden, die zu bearbeitenden auszuwählen und Pull Requests mit Korrekturen zu öffnen, einschließlich der Nacharbeit an Review-Kommentaren.