Skip to content
New: a free website for your business, live in 48 to 72 hoursWorkflow automation on n8n and Claude, built for your businessFixed price, agreed before we start · Live in 5 to 10 business days30-day money-back guarantee on every planProfessional firms · Agencies · E-commerceYou own every workflow, in your own n8nClaude API: your data is not used for trainingHuman approval on every sensitive stepFree automation audit, no obligation
PURIST
30 days
Money-back window
14 h/wk
Modeled time saved
99.97%
Uptime SLA
< 7 days
Deploy time
PURIST AI
Claude Opus 4.7 · n8n v1.71 · <80ms
What type of business are you running? I'll show you exactly which processes we'd automate first and your estimated ROI.
Powered by n8n + Claude Opus 4.7 Get my free automation plan →
Upload and Download Files With the n8n HTTP Request Node
Guides 7 min read · 1,515 words

Upload and Download Files With the n8n HTTP Request Node

Downloading and uploading files with the HTTP Request node, with the two upload modes explained and fixes for the three errors that cause most failed uploads.

Steve, founder of PURIST

November 6, 2026

PURIST: Stuck on n8n? Our n8n experts fix and build workflows like this one, at a fixed price →

Moving files between systems is one of the most common automation jobs: an invoice PDF from an email to accounting software, a photo from a form to cloud storage, a CSV export from one tool to another. When there is no native node for the destination, the HTTP Request node does it, as long as you choose the right body type.

In short. To download, set Response Format to File: the file lands in a binary property (usually data). To upload, choose Body Content Type: Form-Data with a parameter of type n8n Binary File for multipart APIs (the most common), or n8n Binary File as the whole body for APIs that expect raw bytes. The file name sent comes from the binary data, not from the field name.

Upload and Download Files With the n8n HTTP Request Node: workflow diagram
Download as a file, set the file name, upload as multipart form-data. Illustration: PURIST.

Download a file

  1. 1 Method GET, URL of the file or of the API's download endpoint.
  2. 2 Add Option > Response Format > File.
  3. 3 Put Output in Field: data (or any name you will reference later).

The output item now carries the file in binary.data, with a MIME type and, when the server provides one, a file name. Pass it to Google Drive, an email node, Extract from File, or another HTTP Request.

If the API returns JSON with a link instead of the file, make two requests: one to get the link, one to download it.

Upload as multipart form-data

This is what most "upload a file" endpoints expect. It is the same format a browser uses for a file input.

  1. 1 Method POST (or what the API says).
  2. 2 Send Body on, Body Content Type: Form-Data.
  3. 3 Add a body parameter, Type: n8n Binary File.
  4. 4 Name: the form field name from the API documentation, often file.
  5. 5 Input Data Field Name: the binary property holding the file, such as data.
  6. 6 Add other text fields the API requires (folder ID, description) as normal parameters.
Upload and Download Files With the n8n HTTP Request Node: node settings
HTTP Request settings for a multipart upload that APIs accept. Illustration: PURIST.

Upload as a raw binary body

Some APIs (certain storage services, "PUT the bytes to this URL" uploads) want the file as the entire body. Choose Body Content Type: n8n Binary File and the binary property. n8n sets Content-Type to the file's MIME type, or application/octet-stream if it has none, and does not add a multipart envelope.

The API documentation showsBody Content Type
curl -F "file=@invoice.pdf"Form-Data, parameter type n8n Binary File
curl --data-binary @invoice.pdfn8n Binary File
A JSON body with a base64 stringJSON, with the base64 value built in a Code node

Not sure? Paste the API's cURL example into our cURL to n8n converter to see which body type it maps to.

Fix: 415 Unsupported Media Type

The documentation explains it: the API expects multipart/form-data, but you sent the file as the whole body. Switch Body Content Type to Form-Data and add the file as an n8n Binary File parameter.

Fix: the API says the file is missing, or uses the wrong name

With Form-Data, n8n takes the part's file name from the binary data, not from the Name field. Name only sets the form field. If the binary has no file name, n8n sends file. APIs that identify uploads by file name or extension then reject it, often with a 400.

Set the name before the HTTP Request node, either with the File Name option of the Convert to File node, or in a Code node as the documentation shows:

javascript
for (const item of $input.all()) {
  item.binary.data.fileName = 'invoice-812.pdf';
  item.binary.data.mimeType = 'application/pdf';
}
return $input.all();

Fix: wrong binary property name

"No binary data property 'data' exists on item" means the file is stored under another key. Open the previous node's output, look at the Binary tab, and copy the exact property name into Input Data Field Name.

Large files

  • Webhooks receiving files are limited to 16 MB by default (N8N_PAYLOAD_SIZE_MAX on self-hosted).
  • Big downloads use memory and disk; run them in batches rather than hundreds at once.
  • Raise the request Timeout for slow storage endpoints. See HTTP Request timeouts.

Worked example: invoice attachments from email to your accounting tool

Suppliers email PDF invoices. You want each PDF uploaded to your accounting software's "documents" endpoint, which expects multipart form-data with a field named file and a type field.

  1. 1 Email trigger (IMAP or Gmail) with attachments downloaded. Each attachment arrives as binary data (often attachment_0, attachment_1).
  2. 2 Split attachments into items if several PDFs arrive in one email. A short Code node does it:
javascript
const out = [];
for (const item of $input.all()) {
  for (const [key, file] of Object.entries(item.binary ?? {})) {
    if (file.mimeType !== 'application/pdf') continue;
    out.push({ json: { from: item.json.from, subject: item.json.subject }, binary: { data: file } });
  }
}
return out;
  1. 1 HTTP Request: POST to the documents endpoint, Body Content Type: Form-Data, parameter file of type n8n Binary File with Input Data Field Name data, parameter type = invoice.
  2. 2 IF on the response: store the document ID, or route failures to an alert.

Every PDF becomes its own item, keeps its original file name, and is uploaded with the field names the API expects.

Downloads: choosing the response format

Response FormatUse when
AutodetectMost cases; n8n detects JSON, text or file
FileYou know the response is a file, and want it in a named binary property
JSONThe API returns JSON with a wrong content type
TextYou want the raw body as a string

For pre-signed download links (S3, Google Cloud Storage and similar), the link itself carries the authorisation: send a plain GET without credentials, before the link expires.

Uploads to pre-signed URLs

Storage services often give you a pre-signed upload URL. These usually expect a PUT with the raw file as the body, not multipart:

  • Method: PUT
  • Body Content Type: n8n Binary File
  • Input Data Field Name: data
  • A Content-Type header matching what the URL was signed for, if the service requires it

Sending multipart to a pre-signed PUT URL usually stores a corrupted file that includes the multipart boundaries.

Troubleshooting table

SymptomLikely causeFix
415 Unsupported Media TypeRaw body sent, multipart expectedBody Content Type: Form-Data
400 "file missing"Wrong form field nameUse the field name from the API docs
File saved as "file"No file name on the binary dataSet fileName before uploading
Uploaded file is corruptedMultipart sent to a raw-body endpointn8n Binary File body, PUT
"No binary data property"Wrong Input Data Field NameCopy it from the Binary tab
403 on a pre-signed linkLink expired or headers differGenerate a fresh link; match signed headers

Production checklist

  • The binary property name checked on real data, not assumed.
  • File names and MIME types set explicitly before uploads.
  • The destination's maximum file size known and checked with an IF node.
  • An error path that tells you which file failed.

Frequently asked questions

How do I download a file with the n8n HTTP Request node?

Set Response Format to File in the node options. The file is stored in a binary property, data by default.

How do I upload a file with multipart form-data in n8n?

Set Body Content Type to Form-Data, add a body parameter of type n8n Binary File, set its Name to the API's field name and Input Data Field Name to your binary property.

Why does my uploaded file arrive as "file" with no extension?

n8n uses the file name stored on the binary data. Set fileName on the binary property (Convert to File option or Code node) before uploading.

What causes a 415 error when uploading from n8n?

The API expects multipart form-data but received a raw binary body. Switch to Form-Data with an n8n Binary File parameter.

How do I send a file and JSON fields in the same request?

Use Form-Data: one parameter of type n8n Binary File, and other parameters as text. If a field must contain JSON, send it as a text parameter with JSON.stringify().

How do I download a file that needs authentication?

Attach the credential to the HTTP Request node as for any call, and set Response Format to File.

Can I upload several files in one request?

If the API accepts several file fields, add several n8n Binary File parameters, each pointing to a different binary property.

Tags

n8nhttp requestfile uploadbinary dataform-data
Steve, founder of PURIST

Steve founded PURIST, a workflow automation studio working with n8n, Make and Claude AI, and is the point of contact on every project. Prices and features in our articles come from vendor documentation and public pricing pages. How we research and score tools.

Complete guide

Automation Tools & Platforms

11 min read n8n Code Node: 15 JavaScript Examples You Can Copy and … 8 min read n8n Code Node With Multiple Inputs: 3 Methods That Work 7 min read Fix "Cannot find module" in the n8n Code Node (npm Pack… 7 min read n8n Code Node Errors Fixed: "Code doesn't return items … 7 min read $env and Credentials in the n8n Code Node: What Works a… 7 min read n8n Code Node Binary Data: Read, Change and Return File… 7 min read Python in the n8n Code Node (n8n 2.x): Setup, Syntax an… 7 min read Fix n8n "The requested webhook is not registered" (Test… 6 min read n8n Webhook URL: Test vs Production, and How to Change … 7 min read n8n Respond to Webhook: Return JSON, Status Codes, Redi… 8 min read Secure an n8n Webhook: Header Auth, Basic Auth, JWT and… 7 min read n8n Webhook Not Working? 10 Causes and How to Fix Each … 7 min read n8n HTTP Request Pagination: Every Pattern With Working… 7 min read n8n HTTP Request Authentication: API Keys, Bearer Token… 7 min read n8n HTTP Request Timeout and "Aborted" Errors: Causes a… 6 min read Fix ECONNREFUSED in n8n: Docker, localhost and 127.0.0.… 6 min read n8n 429 Too Many Requests: Batching, Retries and Rate L… 6 min read Fix redirect_uri_mismatch for n8n OAuth2 Credentials (G… 7 min read n8n Expression Errors Fixed: "Referenced node is unexec… 6 min read Anatomy Claude skill: what it is, how to install it, an… 5 min read How to explain a business process with the Anatomy skil… 5 min read Anatomy vs Mermaid vs Excalidraw: which to explain a wo… 14 min read n8n LinkedIn Job Automation: Auto-Apply, Track, and Fol… 16 min read n8n HTTP Request Node: Complete Documentation and Examp… 18 min read The future of automation: how our engineering team is s… 8 min read n8n vs Make vs Zapier: the honest comparison your busin… 11 min read n8n vs Make vs Zapier: an honest comparison for product… 7 min read Webhook vs polling: the architecture decision that dete… 24 min read n8n tutorial: build your first production workflow in u… 26 min read The 9 best Zapier alternatives in 2026: an honest ranki… 21 min read Make.com tutorial: build powerful automations without c… 19 min read Automation consultant vs DIY: how to decide what is rig… 14 min read n8n Self-Hosted vs Cloud: The Complete Decision Guide (… 15 min read 5 Zapier Free Alternatives That Handle Real Production … 15 min read WhatsApp Business Automation With n8n: Build a 24/7 Cus… 17 min read Google Workspace Automation: 15 Workflows for Sheets, D… 16 min read Claude AI for Business Automation: What It Does, What I… 15 min read Airtable Automation With n8n: 10 Workflows That Make Yo… 15 min read Droven.io AI Automation Tools: Full Review and Best Alt… 14 min read Droven.io RPA and Business Automation: An Honest 2026 R… 15 min read Enterprise Workflow Automation: The Complete Guide for … 13 min read Document Workflow Automation: Software, Implementation,… 14 min read Marketing Automation Workflow: From Content Creation to… 16 min read Ad Campaign Workflow Data Model and SDR Inbound Pipelin… 14 min read ComfyUI Workflows for Business: Product Photography, Ma… 13 min read GPT-5.2 for Business Workflows and the spec-workflow-mc… 17 min read ServiceNow vs IBM BAW vs n8n: Enterprise Workflow Autom… 16 min read 9 Best Workflow Automation Tools for Small Business in …

Keep reading

More from the blog.

All articles

From audit to deployment

Experience the automation
these articles are about.

Get my free automation plan →