How to Send Files in n8n Workflows: Upload and Host Files Automatically
n8n is one of the most powerful workflow automation tools available, especially for developers who want full control over their automations. But one area where n8n workflows get tricky is handling files. You might need to upload form attachments to a hosting service, process images and store the results, or generate reports and make them available via URL.
The challenge is that n8n deals with files as binary data objects, they exist within the workflow execution but don't have a permanent home. Once the workflow finishes, those files are gone unless you explicitly store them somewhere.
This guide covers two methods for uploading and hosting files from n8n workflows: using the dedicated FilePost community node, and using the HTTP Request node for manual control. We'll also walk through two real-world workflow examples you can adapt for your own use cases.
Why Upload Files in n8n Workflows?
File handling comes up in n8n workflows more often than you might expect. Here are the most common scenarios:
- Form attachments. A user submits a form with file attachments (through Typeform, JotForm, Tally, or a webhook). You need those files hosted somewhere permanent so you can reference them in your CRM, database, or notification system.
- Generated reports. Your workflow generates a PDF invoice, CSV export, or HTML report. You need a public URL so the recipient can download it.
- Processed images. You resize, watermark, or convert images as part of a workflow. The processed result needs to be stored and accessible via URL.
- Backups and archives. You periodically export data from one service and want to store the export files with stable, shareable URLs.
- Email attachments. An email trigger captures incoming attachments. You want those files hosted so you can link to them in a Slack message, database record, or notification.
In all of these cases, the pattern is the same: you have binary data in your n8n workflow and you need to turn it into a permanent, accessible URL. That's exactly what a file upload API does.
Method 1: Using the FilePost n8n Node
FilePost has a dedicated community node for n8n called n8n-nodes-filepost. This is the easiest way to upload files from n8n because it handles all the HTTP details for you.
Using Airtable in your workflow? Airtable attachment URLs expire every ~2 hours. Chain the Airtable trigger + FilePost node to get permanent URLs automatically. See Permanent URLs for Airtable attachments →
Step 1: Install the Community Node
In your n8n instance, go to Settings → Community Nodes and install n8n-nodes-filepost. If you're running n8n via Docker or npm, you can also install it from the command line:
# For npm installations
cd ~/.n8n
npm install n8n-nodes-filepost
# Then restart n8n
After installation, the FilePost node will appear in your node panel when you search for "FilePost."
Step 2: Configure API Key Credentials
Before using the node, you need to set up your FilePost API key as a credential in n8n:
- Open the FilePost node and click on Credential for FilePost API
- Click Create New
- Enter your FilePost API key in the API Key field
- Save the credential
If you don't have an API key yet, sign up at FilePost:
curl -X POST https://filepost.dev/v1/signup \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
Step 3: Use the Node in Your Workflow
The FilePost node supports four operations:
- Upload File, Upload a binary file and get a CDN URL back
- List Files, List all files in your account
- Get File, Get details about a specific file
- Delete File, Delete a file by its ID
For uploading, connect the FilePost node after any node that outputs binary data (like a form trigger, email trigger, or HTTP Request node that downloads a file). Select the Upload File operation and choose the binary property that contains your file. The node outputs the CDN URL, file ID, and file size, which you can use in subsequent nodes.
The output looks like this:
{
"url": "https://cdn.filepost.dev/file/filepost/uploads/a1/a1b2c3.png",
"file_id": "a1b2c3d4e5f6",
"size": 84210
}
Method 2: Using the HTTP Request Node
If you prefer not to install community nodes, or you need more control over the request, you can use n8n's built-in HTTP Request node to call the FilePost API directly.
Configuration
- Add an HTTP Request node to your workflow
- Set the method to POST
- Set the URL to
https://filepost.dev/v1/upload - Under Headers, add:
X-API-Key= your API key - Set Body Content Type to Multipart Form Data
- Enable Send Binary Data
- Set the Binary Property to the name of the binary field from the previous node (usually
data) - Set the Parameter Name to
file
The HTTP Request node will send the binary data as a multipart file upload, and the response will contain the CDN URL in $json.url.
Accessing the Response
In subsequent nodes, you can reference the uploaded file URL using:
{{ $json.url }}
// Returns: https://cdn.filepost.dev/file/filepost/uploads/a1/a1b2c3.png
{{ $json.file_id }}
// Returns: a1b2c3d4e5f6
{{ $json.size }}
// Returns: 84210
Host Files from Your n8n Workflows
Get permanent CDN URLs for files uploaded from n8n. Free plan includes 300 uploads/month.
Get Your API KeyExample Workflow: Automatically Host Form Attachments
Let's build a practical workflow that takes file attachments from a form submission and hosts them with permanent URLs.
The Scenario
You have a Typeform (or any form tool with a webhook) that accepts file uploads. When someone submits the form, you want the attached files uploaded to FilePost and the URLs saved to a Google Sheet.
Workflow Steps
- Webhook Trigger. Set up a Webhook node to receive the form submission. Typeform (and most form tools) will send the file URL in the payload.
- HTTP Request (Download). Use an HTTP Request node to download the file from the URL provided by the form tool. Set the response to File so n8n stores it as binary data.
- FilePost Upload. Connect the FilePost node (or HTTP Request node configured for FilePost) to upload the downloaded file. This converts the temporary form file into a permanent CDN URL.
- Google Sheets. Use a Google Sheets node to append a row with the submitter's name, email, and the FilePost URL from the previous step.
The entire workflow is four nodes and takes about 10 minutes to set up. Every form submission with a file attachment automatically gets a permanent, fast CDN URL.
Example Workflow: Process and Upload Images
This workflow resizes images and uploads the results to FilePost, then logs the URLs to a spreadsheet.
Workflow Steps
- Schedule Trigger or Webhook. Start with whatever trigger makes sense, a schedule that runs daily, a webhook that receives image URLs, or a manual trigger for testing.
- HTTP Request (Download Image). Download the source image as binary data.
- Edit Image Node. Use n8n's Edit Image node to resize, crop, or convert the image. For example, resize to a maximum width of 800px for web use.
- FilePost Upload. Upload the processed image to FilePost. The CDN URL you get back serves the optimized image globally.
- Google Sheets / Airtable / Database. Store the original URL and the new FilePost URL together so you have a mapping of source images to their processed versions.
This is particularly useful for e-commerce workflows where product images need to be resized and hosted, or for content workflows where user-submitted images need to be standardized.
Troubleshooting Common Issues
Binary Data Not Detected
If the FilePost node or HTTP Request node says there's no binary data, make sure the preceding node is outputting the file as binary. In HTTP Request nodes that download files, set the Response Format to File. Check the node output, you should see a binary section with the file name and MIME type.
File Size Limits
FilePost has per-plan file size limits: 50MB on Free, 200MB on Starter ($9/mo), and 500MB on Pro ($29/mo). If your upload fails with a size error, check your plan limits. Also be aware that n8n itself has memory limits, very large files may cause out-of-memory errors in n8n before they even reach the upload step. For files over 100MB, consider increasing n8n's memory allocation.
Rate Limiting
If you're uploading many files in a loop, you might hit rate limits. Add a Wait node between iterations, or use n8n's built-in batch processing to control the pace. FilePost's rate limits vary by plan, if you're doing bulk uploads regularly, the Pro plan's 25,000 uploads/month should provide enough headroom.
Wrong File Name in Upload
If the uploaded file has a generic name like data instead of the original filename, check how the binary data is being created. When using the HTTP Request node to download files, the filename is usually preserved. If you're creating binary data programmatically (e.g., from a Function node), make sure to set the fileName property on the binary object.
Getting Started with FilePost and n8n
Here's the quickest path from zero to working file uploads in n8n:
- Get a FilePost API key. Sign up at
https://filepost.dev/v1/signupwith your email. The free plan gives you 300 uploads per month, enough to build and test your workflows. - Install the community node. Search for
n8n-nodes-filepostin Settings → Community Nodes. This gives you a native FilePost node with all four operations. - Build your first workflow. Start simple: Webhook trigger → FilePost Upload → Respond to Webhook. Send a test file to the webhook URL and verify you get a CDN URL back.
- Expand from there. Add file processing, database storage, notifications, or whatever your workflow needs. The FilePost URL is just a string, so it works anywhere in n8n that accepts text.
Paid FilePost plans include unlimited storage, unlimited bandwidth, and CDN delivery. The free tier includes 2GB storage. Files uploaded through n8n live forever and are served from the same global CDN as files uploaded through any other method. If you outgrow the free plan, the Starter plan ($9/month, 5,000 uploads) and Pro plan ($29/month, 25,000 uploads) scale with your workflow volume.