Create a webpage with a download link?

Hi all, I am trying to create a workflow that takes input from a web form, saves that as a CSV, then presents a webpage that contains the download link for that file I have just saved.
Unfortunately I cannot share the whole flow as it contains some sensitive information, but I can share the last part, which should be enough to help troubleshoot.
I have searched on here and tried a number of things to make it work.

The file saved to disk is fine, but when I click on the download link and review the file I get, it contains the HTML used on the previous step, not the data I saved to disk. (screenshot below)

Information on your n8n setup

  • n8n version: 1.70.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via desktop app
  • Operating system: Debian 12

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:

Hey @Gibbon , your URL link should be whatever value you have as per /home/gibbo/Downloads/n8n_testing/{{ $('n8n Form Trigger').item.json.client_tag }}-submissions.csv. Is it not the case? I cannot see from the workflow you shared how it could be anything else.

Hi @ihortom you would think so, but thats not the case.
This is the link from the HTML page thats created:

{{ $('n8n Form Trigger').item.json.client_tag }} Report

At the start of the flow, there is a form that collect ‘client tag’, start date and end date.
Its that simple.
I dont know how this could be happening.
Thanks for the help so far.

It really comes to the web server configuration. The actual file location on the disk is as I stated (at least that is what your workflow shown does). However, your web server could be configured to serve the files off /home/gibbo/Downloads/n8n_testing/ folder. In that case the URL would be just the path to the file that follows, that is the value of the expression {{ $('n8n Form Trigger').item.json.client_tag }}-submissions.csv.