n8n-binary-and-data
Fungsinya
Tool ini membantu mengelola file dan data biner (seperti gambar atau PDF) di dalam n8n. Tool ini memastikan file tersebut dikirim, diterima, diubah, dan diteruskan dengan benar, sekaligus memisahkannya dari data biasa (teks/angka).
Kapan dipakai
- βSaat Anda perlu mengirim file sebagai lampiran email.
- βSaat mengunggah file ke layanan eksternal.
- βSaat gambar perlu ditampilkan di chat.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-binary-and-data/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara mengirim gambar yang diterima dari chat ke layanan penyimpanan?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini memisahkan data file (biner) dari data teks/angka. Tool ini memastikan file ditangani secara terpisah dan dapat dikirim atau diterima dengan benar, bahkan saat menggunakan fitur lanjutan seperti AI agent.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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"
β¦
Pertanyaan umum
Di mana data file disimpan?
Isi file yang sebenarnya (seperti PDF atau gambar) berada di '$binary', bukan di '$json' yang untuk data biasa.
Bisakah saya mengirim file langsung ke tool AI?
Tidak, tool AI hanya memahami teks (JSON). Anda perlu menyimpan file terlebih dahulu, lalu mengirim link (URL)-nya ke AI.
Mengapa gambar saya tidak muncul di chat?
Chat membutuhkan link (URL) untuk menampilkan gambar, karena chat tidak membaca data file mentah. Anda harus menyimpan gambar lalu memberikan linknya.
Detail
Deskripsi asli dari pembuat
Handle n8n files and binary data across uploads, downloads, transforms, multimodal inputs, agent tools, and chat surfaces.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #5267
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
diffs
394kMemungkinkan agent Anda menghasilkan diff perubahan yang nyata dan dapat dibagikan sebagai tautan viewer atau file gambar, bukan ringkasan yang ditulis manual.
coding-agent
394kMembantu agent Anda menyerahkan pekerjaan pemrograman besar ke Codex, Claude Code, atau OpenCode di latar belakang, lalu memeriksa kemajuannya.
gh-issues
394kMembantu agent Anda menemukan issue GitHub, memilih yang dikerjakan, dan membuka pull request perbaikan, termasuk tindak lanjut komentar tinjauan.