I set a button to call API (from power Automate), the API is used to Generate a PDF and there will be a "file name" and "file content".
I set the 'Click" like below
I want it shows that file download in the Form like below.
It is the PDF Export function in the Form. What should the API return and the JS set in the button?
Please help.
Using Power Automate API will give you more options and control, but the files created with Power Automate cannot be downloaded instantly, they can be sent via email or uploaded to a file storage.
If you use Power Automate, the only option to download file would be to download it from this storage, for example:
Start Power Automate flow and create PDF
Save it to a SharePoint Document library
Have a link on the form to download file from this SharePoint Document Library