Auto-download file that is created by HTML
Comments
-
Hello!
I have a flow that creates a PDF document via HTML. I want to add the function of auto-downloading this file when the flow is executed. Can I get advise on how to build this logic? -
We will need to use the "Load from File data" step and "End Form Session" step.
For this example, I am using the "HTML to PDF" step to create my pdf file via HTML. This step will output the File Data type.
[color=rgb(127, 140, 141)][font=Roboto][img]att3[/img][/font][/color]
The "Load From File Data " Step will take in the File data from the previous step and output a file reference. File Reference has a "FILE URL" field that we can use in the next step.
[color=rgb(127, 140, 141)][font=Roboto][img]att2[/img][/font][/color]
[color=rgb(127, 140, 141)][font=Roboto]
[/font][/color]
[color=rgb(127, 140, 141)][font=Roboto]
[/font][/color]The End Form Session Step will be set to "open URL" and map in the "FILE URL" field form the File reference output.
[color=rgb(127, 140, 141)][font=Roboto][img]att1[/img][/font][/color]
[color=rgb(127, 140, 141)][font=Roboto]
[/font][/color]
This completes the Flow.When this Flow is executed the created PDF file will be auto-downloaded.
[i]edited by faiza@decisions.com on 6/18/2020[/i] -
Hi,
I have used this flow as reference for downloading csv file but the file is not downloading when I debug the flow.It is downloading when I click the url in input/output data. Could you please let me know what is wrong.
[i]edited by Divya Saidu on 12/27/2021[/i] -
Divya,
This will not automatically download the File on debugging the Flow. If you run the Flow outside the debugger, the File should download automatically. Please refer to the attached video.