मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग48k · #5267

n8n-binary-and-data

यह क्या करती है

यह टूल n8n में फ़ाइलों और binary data (जैसे इमेज या PDF) को मैनेज करने में मदद करता है। यह सुनिश्चित करता है कि ये फ़ाइलें सही तरीके से भेजी, प्राप्त, बदली और ट्रांसमिट की जाएँ, और इन्हें सामान्य डेटा (टेक्स्ट/नंबर) से अलग रखा जाए।

कब इस्तेमाल करें

  • ✓जब किसी फ़ाइल को ईमेल attachment के रूप में भेजना हो।
  • ✓किसी बाहरी सेवा पर फ़ाइल अपलोड करते समय।
  • ✓जब चैट में कोई इमेज दिखानी हो।

Skill का लिंक

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-binary-and-data/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/n8n-binary-and-data/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“चैट में मिली इमेज को स्टोरेज सेवा पर कैसे भेजूँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

टूल फ़ाइल डेटा (binary) को टेक्स्ट/नंबर वाले डेटा से अलग रखता है। यह सुनिश्चित करता है कि फ़ाइलें अलग से संभाली जाएँ और सही तरीके से भेजी या प्राप्त की जाएँ, भले ही AI agents जैसे उन्नत फ़ीचर इस्तेमाल हो रहे हों।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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

  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 references/AGENT_TOOL_BINARY.md.

  3. 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. See references/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"

…
अक्सर पूछे जाने वाले सवाल

फ़ाइल डेटा कहाँ स्टोर होता है?

असली फ़ाइल सामग्री (जैसे PDF या इमेज) '$binary' नाम की जगह में होती है, '$json' में नहीं, जो सामान्य डेटा के लिए है।

क्या मैं फ़ाइल सीधे AI tool को भेज सकता हूँ?

नहीं, AI tools सिर्फ़ टेक्स्ट (JSON) समझते हैं। आपको पहले फ़ाइल को सेव करना होगा और फिर उसका लिंक (URL) AI को देना होगा।

मेरी इमेज चैट में क्यों नहीं दिख रही?

चैट में इमेज दिखाने के लिए लिंक (URL) चाहिए होता है; वे raw फ़ाइल डेटा नहीं पढ़ते। आपको इमेज को सेव करके उसका लिंक देना होगा।

जानकारी

लेखक का मूल विवरण

Handle n8n files and binary data across uploads, downloads, transforms, multimodal inputs, agent tools, and chat surfaces.

repo: sickn33/agentic-awesome-skills

लोकप्रियता

GitHub स्टार
48k
रैंकिंग में स्थान
#5267
लाइसेंस
MIT
अपडेट की गई
15/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

00-andruia-consultant

48k

आपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।

AI और एजेंटएजेंट

007

48k

आपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।

कोडिंगसिक्योरिटी

10-andruia-skill-smith

48k

आपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।

AI और एजेंटएजेंट

20-andruia-niche-intelligence

48k

आपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।

लेखन और डॉक्यूमेंटरिसर्च

मिलती-जुलती skills