Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Download SharePoint files directly from Power Apps (no flow)

Posted on November 12, 2023February 4, 2024 by Tom

“Part of my requests are also attachments, but the Power Apps just opens one file, downloads the other – can I somehow download all the files?”


Recently I was building a few Power Apps applications for approval processes, where part of the requests were files. Let it be SharePoint list item attachments or files in a separate SP document library, in both cases I needed to show them. Yet it turned out to be quite a challenge to provide the files in a user friendly way. When I used the attachments control some files were corrupted after download. The other option was some Power Automate flow, making the solution more complicated than necessary…

There had to be a better way to allow users to download all the files!

Download the files directly

The files in SharePoint can be located in two places – in the list item attachments, or in a document library. We’ll look on both cases.

Files as item attachments

Even if it’s item attachments, I prefer to show them in a gallery. Add the gallery and as use the item attachments as Items.

Add another Label for the download link…

…using the Download(…) function as OnSelect that’ll call the SharePoint file download url. It looks as below. If you’re not sure how to build a string with $ check this article by Matthew Devaney.

Download(
    $"https://<org>.sharepoint.com/sites/<SPsite>/_layouts/download.aspx?SourceUrl=<filePath>"
)

Note: <…> are placeholders, replace them including the < and >!

If you’re using list item attachments, the <filePath> is accessible under ThisItem.AbsoluteUri.

Download(
    $"https://<org>.sharepoint.com/sites/<SPsite>/_layouts/download.aspx?SourceUrl={ThisItem.AbsoluteUri}"
)
Power Apps download file

Once you click on such label it’ll download the file.

File from a document library

The same approach can be used also on files stored in a document library. Again, start with a gallery showing the files and add a label. The only difference will be in the last part of the download url – files in document library give you ‘Full Path’ instead of ‘AbsoluteUri’.

Download(
    $"https://<org>.sharepoint.com/sites/<SPsite>/_layouts/download.aspx?SourceUrl={ThisItem.'Full Path'}"
)
Power Apps download file

Summary

I found the Download(…) function to be the most reliable way to download file from SharePoint in Power Apps. Show the files in a gallery, let it be item attachments or files from document library, build the download link using the SP site and file path, and download it. All files will be behave in the same way – you click i a link and the file will start downloading, let it be word, pdf, zip, or any other file type.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

3 thoughts on “Download SharePoint files directly from Power Apps (no flow)”

  1. Tiksha` says:
    June 6, 2024 at 12:24 pm

    I am unable to download the same file on clicking of button while using Power Apps desktop. It will be great if you can provide an alternative for this;
    Using the following: Download(
    $”https://.sharepoint.com/sites//_layouts/download.aspx?SourceUrl={ThisItem.’Full Path’}”
    )

    Reply
  2. Kim says:
    December 11, 2024 at 7:28 pm

    Thank you SO much for this post! I have been asking Copilot every way I could think of for this functionality and this worked perfectly! Much appreciated!!

    Reply
  3. GIOVANNI says:
    February 18, 2025 at 7:24 pm

    Low Code my BUTT!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution and the Task Delegation App to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes