web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Download PDF file in P...
Power Apps
Unanswered

Download PDF file in Power Apps from content generated by a Power Automate flow

(0) ShareShare
ReportReport
Posted on by 143

Hi everyone,

I’m working on an integration between Power Automate and Power Apps, and I’m facing the following scenario:

I’ve created a flow in Power Automate with the following actions:

  1. Convert File (OneDrive for Business): Converts a DOCX file to PDF.
  2. Create File (OneDrive for Business): Creates the PDF file in a OneDrive folder. I’m using this action only to retrieve the file content later, but I’m not sure if this step is necessary or if I can access the PDF file content directly from the previous action.
  3. Get File Content (OneDrive for Business): Retrieves the file content of the created PDF file.
  4. Respond to a Power App or Flow: Creates a file-type output and assigns it the file content from the previous action.
 
 
 
The output from "Respond to a Power App or flow" looks like this:
 
 
 

My goal is to allow the user, from Power Apps, to automatically download the PDF file by clicking a button. I don’t want to provide a download link from OneDrive; instead, the file should be downloaded directly in the browser using the content (docupdf) provided by the flow.

Additionally, I have a question: if I store the resulting content from the flow in a variable within Power Apps, what should I do with that variable to enable the file to be downloaded?

Any ideas or suggestions would be greatly appreciated!

Best regards,

Categories:
I have the same question (0)
  • Verified answer
    vipuljain03 Profile Picture
    641 Super User 2025 Season 2 on at
    The file from Power Apps can be downloaded using Download function or can be launched in browser using Launch function.
     
    Scenario 1:
    I replicated the scenario, wherein file PDF gets generated in OneDrive using Convert File and Create File OneDrive actions in Power Automate. Then get the File Content and send the response back to Power Apps.
     
    Here, additionally I have used one more OneDrive action to create the file link, i.e. Create share link. Using this you can create a link and then can use Launch function in Power Apps, as shown below:
     
    I am sending the "fileLink" back to Power Apps.
     
     
    In Power Apps (on click of button control i.e. OnSelect property), I have used:
     
     
    Scenario 2:
    I extended the Power Automate flow by creating the file in SharePoint Online Document Library and composing the URL which will be sent back to Power Apps, as shown in below image:
     
     
     
    Compose URL: https://<tenantname>.sharepoint.com/sites/<site collection title>/_layouts/15/download.aspx?SourceUrl=/sites/<site collection title><file path with the library name>
     
    In Power Apps, I used Download function to download the PDF file in browser:
     
     
    -----------------------------------------------------------------------------------
     
    If this reply helped you, please mark this reply as suggested answer and give it a like to help others in the community find the answer too!
     
    Thanks,
    Vipul
  • FlowFalcon Profile Picture
    143 on at
     
    SCENARIO 2 WORKS FOR ME PERFECT!! 


    You truly are the king of kings!!!!!!!!!!!!!!!


    Thank you so much for your selfless help! You've truly unlocked a solution for me—I had been stuck and wasted so much time on this. I'm incredibly grateful, my friend.
  • FlowFalcon Profile Picture
    143 on at
    test

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard