// guides · n8n error index

n8n Webhook file upload not working? Binary data keys, 25 tests

Where n8n puts a file sent to a Webhook: the binary key is the form field name (not data), file0 and file1 for several files, .bin for octet-stream, base64 stays text, 422 on a wrong Content-Type. 25 real requests on n8n 2.43.7.

Updated 2026-10-25 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Find the real binary key: it is the form field name, not data

    We sent 25 requests to a published Webhook node (v2, POST) on n8n 2.43.7. A multipart file always landed in the item's binary data under the form field name: -F "file=@a.csv" gave binary.file, -F "doc=@b.pdf" gave binary.doc. Nodes after the Webhook (Extract from File, Read/Write Files, HTTP Request, Google Drive) default their binary field to data, so they say the binary data is missing. Open the Webhook output, switch to the Binary tab, and type that exact name in the next node's Input Binary Field. Only a raw (non-multipart) body lands in data.

  2. Several files become file0, file1

    Two files sent in the same field, or in file[], arrived as binary.file0 and binary.file1: n8n adds an index and drops the brackets. The Webhook option Field Name for Binary Data does the same even for one file: set to file, a single upload became file0, and two uploads in fields file and doc became file0 and file1, so the original field names were lost. Point the next node at file0, or handle any key in a Code node with Object.keys($input.item.binary) (snippet below).

  3. Fix the .bin extension and application/octet-stream

    curl and many clients send a file part as application/octet-stream unless told otherwise. For a.csv, n8n kept the file name but recorded mimeType application/octet-stream and extension bin, which can make Extract from File or an upload to Drive treat it as an unknown file. With -F "file=@a.csv;type=text/csv" it got text/csv and csv. Set the type on the sending side; ;filename=report.pdf also overrides the name, and accented names with spaces were kept.

  4. Raw body uploads land in data with a random name

    A file sent as the whole request body (--data-binary @file with Content-Type: application/octet-stream or text/csv, no multipart) arrived as binary.data with a random UUID as the file name and the mimeType taken from the Content-Type. If you need the real name, have the sender put it in a header or query parameter and set it later. With the Raw Body option on, a JSON request gave both the parsed $json.body and binary.data, a CSV request gave only binary.data, and multipart uploads were unchanged.

  5. Base64 in JSON is just text

    A file sent as a base64 string inside JSON ({"file":"aGVsbG8s..."}) stayed a plain string in $json.body.file; no binary was created. Add a Convert to File node with the operation Move Base64 String to File and the source field body.file (not run in this test; see n8n Convert to File not working).

  6. A file that arrives as text: the part has no filename

    curl -F "file=<a.csv" (with < instead of @) sends the contents without a filename. n8n treated it as a text field: $json.body.file held the CSV text and there was no binary at all. Use @, or make sure your client sets a filename on the part.

  7. 422 "Failed to parse request body" and 404 method errors

    A CSV sent with Content-Type: application/json was rejected with 422 Failed to parse request body and the hint Unexpected token 'h' ... is not valid JSON, and the workflow never ran, so nothing shows in Executions. Send the right Content-Type, or multipart/form-data for files. A POST to a GET webhook got 404 This webhook is not registered for POST requests. Did you mean to make a GET request?; set the node's HTTP Method to POST for uploads. Other 404s: n8n webhook not working (404).

  8. Large files

    In our setup (n8n started with npm defaults, binary data in memory mode) 15 MB and 17 MB multipart files and a 17 MB raw body were all accepted. A 17 MB JSON body instead failed with There was a problem executing the workflow. Later tests isolated the cause: JSON bodies above N8N_PAYLOAD_SIZE_MAX (16 MB by default) fail with exactly this message and PayloadTooLargeError in the log (payload limits tested). Send big files as multipart or raw binary, not as JSON or base64, and put a reverse proxy limit (nginx client_max_body_size) above your largest file.

Code node: read the file whatever its key

This returns one item per uploaded file, each with its binary under data, so every later node works with its default setting:

const out = [];
for (const item of $input.all()) {
  for (const key of Object.keys(item.binary || {})) {
    out.push({ json: { field: key, fileName: item.binary[key].fileName }, binary: { data: item.binary[key] } });
  }
}
return out;

We ran an echo Code node on every request in this test; this exact split snippet was not run. To read the bytes in a Code node use await this.helpers.getBinaryDataBuffer(0, key), see n8n binary data not found.

Test your upload with curl

curl -X POST "https://n8n.example.com/webhook/upload" \
  -F "file=@invoice.pdf;type=application/pdf" \
  -F "customer=Bob"

Then open the execution: the file is in binary.file and customer in $json.body.customer.

What we ran

On 25 October 2026 we sent 25 curl (8.14.1) requests to self-hosted n8n 2.43.7 under n8n start, production /webhook/ URLs, Webhook node v2, workflows published via the CLI, Respond When Last Node Finishes, and a Code node that echoed the body and the binary keys and metadata.

RequestWhat n8n produced
One file in field file (curl -F "file=@a.csv")binary.file, mimeType application/octet-stream, extension bin
Two files in fields file and docbinary.file and binary.doc
Two files in the same field filebinary.file0 and binary.file1
Two files in file[]binary.file0 and binary.file1 (brackets dropped)
File plus text fields name=Bob, tags=a, tags=bbinary.file; $json.body = {"name":"Bob","tags":["a","b"]}
Option Field Name for Binary Data = file, one filebinary.file0 (not file)
Same option, files in fields file and docbinary.file0 and binary.file1, field names lost
Raw body, Content-Type: application/octet-streambinary.data, fileName a random UUID
Raw body, Content-Type: text/csvbinary.data, mimeType text/csv, UUID fileName
Raw Body option on, JSON request$json.body parsed and binary.data (application/json)
Raw Body option on, CSV requestbinary.data only, no body key
Raw Body option on, multipart uploadUnchanged: binary.file
Base64 string inside JSONPlain string in $json.body.file, no binary
Multipart part without a filename (-F "file=<a.csv")Text: $json.body.file = the file contents, no binary
Form-urlencoded bodyBody fields only
POST to a GET webhook404 This webhook is not registered for POST requests. Did you mean to make a GET request?
PUT to a POST webhook404 This webhook is not registered for PUT requests. Did you mean to make a POST request?
CSV sent with Content-Type: application/json422 Failed to parse request body, workflow never runs
File sent with ;type=text/csvmimeType text/csv, extension csv
File sent with ;filename=report.pdffileName report.pdf kept
File name with accents and a space (résumé été.csv)Kept as is
15 MB multipart file200, stored
17 MB multipart file200, stored
17 MB raw octet-stream body200, binary.data
17 MB JSON bodyThere was a problem executing the workflow (cause not isolated)

Checklist

Good to know

What we did not test

The test URL and editor upload, n8n Cloud, the filesystem or S3 binary data modes, queue mode, the Form Trigger file field, and the exact size limit for JSON bodies.

FAQ

Where does n8n put a file sent to a webhook?

In the item's binary data under the form field name: a file sent as field file is binary.file. Raw (non-multipart) bodies go to binary.data. Several files in one field become file0, file1.

Why does the node after my n8n webhook say no binary data found?

It looks for the default key data, but the Webhook stored the file under the form field name, for example file or file0. Set Input Binary Field to that exact key.

Why does my uploaded file get a .bin extension in n8n?

The client sent it as application/octet-stream. n8n keeps the name but records extension bin. Send the real type, for example curl -F "file=@a.csv;type=text/csv".

How do I send a base64 file to an n8n webhook?

n8n keeps base64 in JSON as text. Add a Convert to File node (Move Base64 String to File) on body.file, or send the file as multipart instead.

What does Failed to parse request body mean on an n8n webhook?

The Content-Type does not match the body, for example CSV sent as application/json. n8n answers 422 and the workflow never runs.

How large a file can an n8n webhook receive?

In our test 17 MB multipart and raw uploads worked, but a 17 MB JSON body failed. Send large files as multipart or raw binary.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.