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

HTTP get download file

Hi

 

I have a service that provides an API where I can download files with at HTTP GET command and basic auth. It works fine when Im testing the API with Postman but I cant find out how to download that file with Flow and for example put it in my onedrive. Anybody that could help me out a bit?

 

Regards,

 

Ozcar Ardfors

1 ACCEPTED SOLUTION

Accepted Solutions

If the file is a binary and you are looking for a way to simply transfer files between the HTTP endpoint and any storage service, you can add a HTTP to download the file and save the content using the "Create File". Here is an example of a flowHTTPSave.PNG

View solution in original post

13 REPLIES 13
v-micsh-msft
Community Support
Community Support

Hi @Ozcar,

 

Please check the following blog:

Five new services and improved advnaced capabilities for JSON and HTTP

 

In your scenario, I think HTTP action and the Parse JSON should be suitable to work.

 

Regards,

Michael

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

Hi

 

Thank you for showing me that! It was super cool to parse JSON respones. But unfortunally I dont know how to write a schema that will take care of a binary gzip file. Any idea?

 

Regards,

 

Ozcar Ardfors

 

 

If the file is a binary and you are looking for a way to simply transfer files between the HTTP endpoint and any storage service, you can add a HTTP to download the file and save the content using the "Create File". Here is an example of a flowHTTPSave.PNG

Yes it works! Sometimes the solution is so so easy. Thank you very much.

 

Regards,

 

Ozcar Ardfors

Hello Ozcar

 

kann you post screenshots of the solution you used?

Does your link links direct to the file or is a Callback or Server Response?

 

It seems that with JSON can be done but I also don´t know how to do it exactly.

 

I would strongly apreciate your help!

 

Cheers

Alex

Hi

 

Its very simple. Works exactly as described above. Do an HTTP GET and create the file with the body response. Not sure what is unclear with the solution.

Thank you for your feedback Ozcar. The problem with this settings is that the URL is a redireccion, and I get a 302 error. These are the details.

 

Do you have any ideas to manage this URLs?

 

Thanks in advance.

 

 

No it seems to be a problem with response from the service you are trying to use. I dont have a direct solution for you but I recommend to use Postman first before attempting to get it to work in Flow.

 

https://www.getpostman.com/

Hello Ozcar, 

 

It just workt parsing the JSON. Thank you very much anyway.  This is how I did it. 

Screenshot_5.png

Is this working still? I'm trying the same exact thing but I don't get the "Body" variable containting the csv data from the HTTP GET.  Usually, when available it shows as Dynamic content but it's not there.   I typed it it to no avail.

 

 

 

Its working fine for me.

 

//Ozcar

@Alerodri can you include a screenshot of you entire parse JSON schema?

I am doing the same thing and have the Flow working perfectly. The Create File has the contents of the file, etc.
BUT, I can't figure out how to force the PowerApp to display or download the file.
First, I added a "Respond to PowerApp" with the "TheFile" from the "Create File" and I can reference "TheFile" in the PowerApp - BUT - the Download() function expects a URL.
So, how to a force the PowerApp to show and/or download the file to the user?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,939)