Unable to download a file from "Form" node to "Respond to Webhook" node

Describe the problem/error/question

Respond to Webhook behavior downloading a file issue

What is the error message (if any)?

hello folks,
In my workflow if i use the form trigger, my browser displays the content of the file directly into the browser, if i use the webhook trigger, my browser download the file as expected.

Webhook working as expected, form not !

What i am missing to make the form download the file instead of displaying it ?

Thanks for your help

Please share your workflow

Share the output returned by the last node

Same outpout from the form or the Webhook.

#output from Webhook
[
  {
    "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "fileName": "File.xlsx",
    "directory": "/data",
    "fileExtension": "xlsx",
    "fileSize": "9 kB"
  }
]

#Output from Form
[
  {
    "mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
    "fileName": "File.xlsx",
    "directory": "/data",
    "fileExtension": "xlsx",
    "fileSize": "9 kB"
  }
]

Information on your n8n setup

  • n8n version:1.62.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):own
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system:Ubuntu

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Welcome to the community @akan !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.

Make sure that you have removed any sensitive information from your workflow and include dummy or pinned data with it!


I’m not quite following your requirements here. If the user submits a form, why do you want to reply back with a binary file? You can use “Respond to Webhook” to send out a custom response on form submission.

Could you explain how you want that response to look like?

Sorry, your a right, i don’t give you the context.
The workflow that i have posted is just to show the behavior not the full workflow.

  1. The Workflow receives an ID from the form.
  2. This ID is used to do an HTTP request again an Helpdesk API that returns all the time logs from this support ticket.
  3. The request returns an Excel File that contains the data.


I don’t post the full workflow to not disclose some confidential information.

Instead of downloading the Excel file the browser show up the raw data in the page.
When i use the same worflow with a webhook as a trigger it’s working as expected.

The workflow posted shows this behavior.

Hope it’s more clear.

Hello Folks,

I think it’s a quite simple mistake from my side.
Hope someone can help.

Hey @akan , thanks for clarification. For that to work (ability for the browser to download the file), the file has to be publicly hosted somewhere. For example, that Excel document could be placed in OneDrive (and shared publickly) or FTP server. You would return the URL to it. Clicking on the URL will allow downloading the file.

1 Like

Hello @ihortom, thanks for the clear answer.
Is there a way to host the file directly from n8n to avoid any third party storage ?
I would like to be functional in an internal environment without external access.

Hey @akan , I’m afraid not if you are talking about n8n Cloud (it is not a storage service). If you are self-hosting, on the other hand, then you can keep the file locally and provide a public access to it.

Hi, @ihortom, you are right, i’m talking about a self-hosted solution.
Is there a simple way to share a link that n8n self hosted will serve ?

Hey @akan , when self-hosting, your can instruct n8n to store the binary files on the filesystem as opposed to container. It is done with help of N8N_DEFAULT_BINARY_DATA_MODE. Then it is a mater of exposing the dedicated segment of the filesystem to the internet or intranet depending the deployment purpose. This part however is not related or done by n8n. It rather a question to the DevOps department.

1 Like

Ok, perfect and clear.
Thanks @ihortom

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.