cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

How to use http in flow to call a rest and automatically download a generated pdf

How can I do, the user when pressing a button in powerapps this call to microsoft flow and make a request http which is a service that generates a report in pdf and download automatically to the pc, I have the flow ready only that we know how to interpret the answer , since chrome does not create a new tab automatically, in conclusion, I would like the flow to download automatically the pdf either in a new tab or not.

 

I execute flow with ->  Set(FlagResponse;ConsumeREST.Run(JsonFinal;"Legalizacion"));

 

Thanks!

p1.png

 

p2.png

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Cbarahona,

 

Could you please share a bit more about your scenario?

Could you please share a full screenshot about your flow's configuration?

Further, do you want your flow to be executed to download a PDF file automatically?

 

 

I have made a test, and the issue is confirmed on my side.

 

If you want to call a flow from an app, and then download the PDF automatically using the HTTP action of a flow, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

Downloading a file into local automatically using HTTP action is not supported within Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

As an alternative solution, you could consider take a try to download this PDF file into the local System file folder of your PC (you could also take a try to store this PDF file within a cloud storage, e.g. OneDrive). I have made a test on my side, please take a try with the following workaround:3.JPG

 

Within the "Create file" action of "File System" connector, File name set to following formula:

HTTPS-FAQ.pdf

File content field set to following formula:

base64ToBinary(body('HTTP')?['$content'])

The flow works successfully as below:4.JPG5.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

More details about the File System connector in Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/connectors/filesystem/

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

Hi @Cbarahona,

 

Could you please share a bit more about your scenario?

Could you please share a full screenshot about your flow's configuration?

Further, do you want your flow to be executed to download a PDF file automatically?

 

 

I have made a test, and the issue is confirmed on my side.

 

If you want to call a flow from an app, and then download the PDF automatically using the HTTP action of a flow, I afraid that there is no way to achieve your needs in Microsoft Flow currently.

 

Downloading a file into local automatically using HTTP action is not supported within Microsoft Flow currently, if you would like this feature to be added in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

As an alternative solution, you could consider take a try to download this PDF file into the local System file folder of your PC (you could also take a try to store this PDF file within a cloud storage, e.g. OneDrive). I have made a test on my side, please take a try with the following workaround:3.JPG

 

Within the "Create file" action of "File System" connector, File name set to following formula:

HTTPS-FAQ.pdf

File content field set to following formula:

base64ToBinary(body('HTTP')?['$content'])

The flow works successfully as below:4.JPG5.JPG

 

More details about using expression in flow actions, please check the following article:

Use expression in flow actions

 

More details about the File System connector in Microsoft Flow, please check the following article:

https://docs.microsoft.com/en-us/connectors/filesystem/

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (6,018)