cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AIUYM19
Helper V
Helper V

How to download file in PowerApps sent from Power Automate

I have a canvas app with a screen that shows a list of files associated with the data currently being viewed. Those files are stored in a SharePoint library that the app user does not have access to. In order to view the file list, upload additional files, or delete files, the app sends a request to a Power Automate flow, which then uses an HTTP action to call another flow. This second flow then performs the requested CRUD operations.

 

I have the "create," "update," and "delete" parts of CRUD working fine, but not the "read" part. On the screen, there is a gallery in which each item is a file in the list. In each item is a button that should allow the user to download the respective file. I can build a pair of flows that will read and send the requested file data to PowerApps, but I can't find a way to then have PowerApps save the file to the user's default download folder (or any folder). Once my flow sends the file data to PowerApps, how do I instruct PowerApps to save that file to the user's computer?

 

I have looked into the Download() function, but I don't think this will work, because I need to have a URL that is accessible to the user. Due to security reasons, the SharePoint library containing the files cannot be made directly accessible to the users, which is why I'm using a set of flows to accomplish this. I want PowerApps to save the file that it receives from Power Automate directly.

2 REPLIES 2
JoaoN
Helper IV
Helper IV

Did you try to use the Launch function?
I do not know if is that your purpose, but Daniel Christian talks about downloading CSV file from a Filtered Gallery on this video. Maybe it can be useful to you:

https://www.youtube.com/watch?v=QTbVMu6DIfQ&list=PLK4GUAjzwV6FyI0Jh9gHuYBrz4P3e9R6Z&index=38&t=1719s

Hi, @JoaoN.

 

Sorry for the delay; I was pulled away from this for several days.

 

Unfortunately, while that video is very helpful for downloading a file from OneDrive, it doesn't address how to download a file from SharePoint. The problem is, his method requires the file to be made available to everyone via a link. However, the file in my SharePoint library needs to remain secured, and accessible only via PowerApps/Power Automate. Ideally, the event would follow something like this...

  1. User clicks a button in PowerApps.
  2. PowerApps calls a Power Automate flow.
  3. Flow gets the file content and metadata from SharePoint.
  4. Flow returns the file data to PowerApps.
  5. PowerApps saves the received file data to the local disk.

The only real step that I cannot figure out here is step #5. I can build a flow that does return the file metadata and binary content to PowerApps, but I can't figure out how to have PowerApps save that incoming data to disk.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,607)