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:
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:
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.
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!
Ferran
User | Count |
---|---|
96 | |
40 | |
25 | |
22 | |
16 |
User | Count |
---|---|
129 | |
51 | |
48 | |
35 | |
24 |