FM
FlowMarket
General Automation Beginner ⚡ 3 n8n Nodes

Respond with file download to incoming HTTP request

This simple workflow demonstrates how to get an end user's browser to download a file. It makes use of the Content-Disposition header to set a filename and c...

🔌 Nodes & Integrations Used (1)

n8n Core Logic

📖 Implementation & Setup Guide

This simple workflow demonstrates how to get an end user's browser to download a file. It makes use of the [Content-Disposition](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) header to set a filename and control the browser behaviour.

A use case could be the download of a PDF file at the end of an application process or to export data from a database without replacing the current page content in the browser.

With this approach, the current page remains open and the file is simply downloaded instead:

The original idea was first present [here](https://community.n8n.io/t/webhook-to-excel-file/11059/24?u=mutedjam) by @dickhoning in the n8n community.

⚡ How to import this workflow into n8n:

  1. Click the Direct Download JSON button above to save Respond with file download to incoming HTTP request.json.
  2. Log in to your n8n Cloud or self-hosted n8n instance.
  3. In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
  4. Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
  5. Click Execute Workflow to test and switch to Active!

Related General Automation Workflows

View All in General Automation →