Steps
Open the input of the failing node
Click the node that shows the error, open its input and switch to the Binary tab. If there's no file there, the problem is earlier in the workflow. If there is one, note its field name (usually
data).Match the field name
Nodes that read files ask for an input binary field,
databy default. If the file arrives under another name, n8n saysThe item has no binary field 'data'. Type the real name, such asfileorattachment_0.Find the node that dropped the file
Walk back one node at a time. In our tests Edit Fields dropped it unless Include Other Input Fields was on, and a Code node dropped it unless it returned
binary: item.binary. Both still ran green.Read file content the right way in Code
Use
await this.helpers.getBinaryDataBuffer(0, 'data'). Thedatastring on the item can be just a storage reference (filesystem-v2), so decoding it as base64 gives garbage.Check the allowed folder for files on disk
If Read/Write Files from Disk says
Access to the file is not allowed., put the file in~/.n8n-filesor setN8N_RESTRICT_FILE_ACCESS_TOto your folder, then run the node again.
Every binary data error we triggered
On 19 October 2026 we ran 25 workflows on n8n 2.43.7. Most download a small CSV with an HTTP Request node (Response Format: File), pass it through one node, then read it with Extract From File. Each row is one or two runs.
| What we did | What n8n showed | Fix |
|---|---|---|
| Code node made plain JSON items, then Extract From File | This operation expects the node's input data to contain a binary file 'data', but none was found [item 0] | The item never had a file. Only nodes that download or read files make binary data: HTTP Request with Response Format File, Read/Write Files from Disk, an email attachment, or Convert to File. |
HTTP Request saved the file as file, Extract From File asked for data | The item has no binary field 'data' [item 0], hint: Check that the parameter where you specified the input binary field name is correct | Put the real name in Input Binary Field (here file). With that one change it read both CSV rows. Email nodes often call it attachment_0. |
| Edit Fields (Set) v3.5 between download and extract, defaults | Edit Fields output only {"source":"shop"}, the file was gone, then the same none was found error | Turn on Include Other Input Fields. With it on, the file came through and the extract worked. |
| Edit Fields v3.5, Include Other Input Fields on plus the Strip Binary Data option | File dropped again, same error | Leave Strip Binary Data off if a later node needs the file. |
| Old Edit Fields v3.3, defaults | File dropped, same error | On v3.3 and older add the option Include Binary Data; that kept it in our run. |
Code node returned { json: {...} } per item | Code ran fine, the next node had no file, same error | Return the binary too: { json: {...}, binary: item.binary }. That one change fixed it. |
Code node decoded binary.data.data as base64 | Got the string filesystem-v2 and garbage after decoding, not the CSV | n8n keeps files on disk and leaves only a reference in the item. Read the content with await this.helpers.getBinaryDataBuffer(0, 'data'); that returned the full CSV text. |
Code node asked getBinaryDataBuffer for a field that doesn't exist | The execution failed with an empty error, {}, and no message, even inside try/catch | Check the names first: Object.keys($input.first().binary || {}) returned ["data"] in our run. |
Read/Write Files from Disk, write to /tmp/... or read /tmp/... | Access to the file is not allowed. on both | In n8n 2.43.7 these nodes only reach ~/.n8n-files by default (the config default for N8N_RESTRICT_FILE_ACCESS_TO). Use that folder, or set N8N_RESTRICT_FILE_ACCESS_TO to your folder; both worked. |
| Read a file name that doesn't exist | No file(s) found, No file matching the selector "..." found | Check the path and that it's inside the allowed folder. In Docker it's the path inside the container. |
The usual cause: a node in the middle dropped the file
Binary data travels on the item next to the JSON, under a field name, normally data. The download worked in every one of our failing runs. What broke it was the node between the download and the node that needed the file: Edit Fields with its default settings, or a Code node that built new items. Both ran green and only the next node failed. So when you see none was found, open the input of the failing node, check the Binary tab, and walk back one node at a time until you find where the file disappears.
In a Code node, keep the file explicitly:
// Code node (Run Once for All Items): change the JSON, keep the file
return $input.all().map(item => ({
json: { ...item.json, checked: true },
binary: item.binary, // without this line the file is gone
}));
Reading a file inside a Code node
Don't decode binary.data.data yourself. With the default storage in n8n 2.x it isn't the file: in our run it was the text filesystem-v2, and the real file sat on disk. The helper returns the actual bytes:
// Code node: read the file's content as text
const buf = await this.helpers.getBinaryDataBuffer(0, 'data'); // item 0, field 'data'
return [{ json: { text: buf.toString('utf8') } }];
// Which binary fields does the item have?
return [{ json: { fields: Object.keys($input.first().binary || {}) } }];Our item showed fileName: items.csv, mimeType: text/csv and fileSize: 27 B. To go the other way, from JSON rows to a file, use Convert to File: our two rows became one item with a data file named File.csv.
Files on disk: Access to the file is not allowed
Read/Write Files from Disk refused both a write and a read in /tmp. A write to ~/.n8n-files worked with no settings, and so did /tmp once we set N8N_RESTRICT_FILE_ACCESS_TO:
# Read/Write Files from Disk outside ~/.n8n-files (n8n 2.x)
N8N_RESTRICT_FILE_ACCESS_TO=/data/files # several: /data/in;/data/out
# Docker: mount the folder too
volumes:
- ./files:/home/node/.n8n-files
Good to know
- File sent to a Webhook and the next node finds nothing? The binary key is the form field name (
file,file0), notdata: see n8n Webhook file upload and binary data (25 tested requests). - Unzipped a file and now
datais missing? Decompress names the filesfile_0,file_1: see n8n Compression node not working. - Making a file from JSON items? Convert to File drops every other field and stores the file in
dataunless you change Put Output File in Field: see n8n Convert to File not working (38 real runs). - Hashing a file with the Crypto node removes the binary from the output item, so the next node finds none: see n8n Crypto node not working.
- Extract From File gave the CSV prices as text (
"12"), not numbers. Convert them before you compare or add. CSV read as one column, a BOM in the first key or broken accents: see n8n Extract From File (CSV) not working (32 real runs). - Expression errors on the JSON side (
undefined, wrong item) are a different problem: see n8n expression errors. - Downloads that fail before you get a file (401, 404, timeouts): n8n HTTP Request node errors. Code node return-format errors: n8n Code node errors.
What we didn't test
- Email triggers (Gmail, IMAP) and their
attachment_0naming, Google Drive, S3, and theN8N_DEFAULT_BINARY_DATA_MODEsetting. - Large files, queue mode with binary data, and Docker itself. The Docker volume line above follows n8n's docs, not our runs.
Set up fields with Edit Fields and the rest of your data vanished too? See n8n Edit Fields (Set) node not working (29 real runs).
Start from a working agent
FAQ
What does "This operation expects the node's input data to contain a binary file 'data', but none was found" mean in n8n?
The item reaching that node has no file at all. Either no earlier node made one (only downloads, file reads, email attachments and Convert to File do), or a node in between dropped it. In our tests Edit Fields with default settings and a Code node returning only json both dropped the file without an error of their own.
What does "The item has no binary field 'data'" mean?
The item has a file, but under a different name than the node expects. Open the input's Binary tab to see the real field name, for example file or attachment_0, and enter it in the node's Input Binary Field.
Why does n8n Edit Fields (Set) remove my binary data?
Edit Fields v3.4 and later keep the file only when Include Other Input Fields is on and Strip Binary Data is off. Older v3.3 needs the Include Binary Data option. With defaults, our file disappeared.
How do I read a binary file in an n8n Code node?
Use await this.helpers.getBinaryDataBuffer(itemIndex, 'data'), which returns a Buffer, then for example buf.toString('utf8'). Don't decode item.binary.data.data: in n8n 2.x it can be a reference such as filesystem-v2 instead of the file content.
Why does Read/Write Files from Disk say "Access to the file is not allowed"?
In n8n 2.43.7 the node can only use ~/.n8n-files by default. Move the file there or set N8N_RESTRICT_FILE_ACCESS_TO to the folders you need (separate several with ;). In Docker, mount that folder into the container too.
Related guides
- n8n Execute Command and Read/Write Files errors: 61 real runs, fixed
- n8n Extract From File (CSV) not working: delimiter, BOM, encoding and errors, 32 runs
- n8n Compression node not working: zip, unzip, file_0 and invalid zip data, 42 runs
- n8n Email Trigger attachments: fix attachment_0 and "none was found", 12 tests
- n8n Sort node not sorting correctly: numbers, dates and nulls, 33 runs
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes