Showing results for 
Search instead for 
Did you mean: 
Impactful Individual
Impactful Individual

Email PDF from SharePoint Document Library as an attachment.

User presses a button in Power Apps which generates a PDF in Flow using a HTML template in Power Apps. The generated PDF is saved to a SharePoint document library.


I was hoping to be able to send an email with the newly generated PDF as an attachment. I thought I could use Get File Content and use the output of this action to attach to an email but I receive an error in Power Apps - the flow doesn't even run. I get the following error:


Screen Shot 2021-01-26 at 10.21.10.png


As an alternative I was wondering if I could send the PDF file content data back to Power Apps and use this in an attachment control which I could then use to send the email from within Power Apps. The file content I receive in Power Apps is not recognised as correct format. Would I need to convert this to Base64 before sending back to Power Apps to be used in attachment control?


File content appears as follows:


Screen Shot 2021-01-26 at 10.38.45.png

Impactful Individual
Impactful Individual

I removed the Flow from Power Apps, re-added and now the email works. I would still love to know how to send file content back to Power Apps in a useable format though.

Super User
Super User

Hello @Digital 

In the following post you can read an excellent explanation on the conversion to/from base64 and binary: Binary to Base64 in Microsoft Power Automate/ Microsoft Flow - Debajit's Power Apps & Dynamics 365 B...

You're right! Before returning the content to Power Apps, you should convert the base64 string to binary content using the function base64ToBinary().

Hope it helps!


Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,854)