cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate I
Advocate I

Create PDF file and then send file to email address entered in PowerApps

 

Untitled.png

I put the name of the file in Attachments Name but what should be entered in Attachment Content?

5 REPLIES 5
Highlighted
Advocate I
Advocate I

Re: Create PDF file and then send file to email address entered in PowerApps

Hello!

 

I am creating an app in PowerApps and Flow that takes input from user and creates an HTML file, converts to PDF, and emails PDF to a specific address entered by user in PowerApps.

 

I am able to create the HTML file and convert to PDF without error.  I am able to send an email with Flow (without any attachments) to an address entered by user in PowerApps without error.  However, when I attach the PDF in the Advanced Options in  the "Send an Email" part of my Flow the email will arrive with a PDF attachment that I am unable to open in my email (Error failed to load PDF document).  But if I download the PDF and then open it with a PDF viewer it does not contain the information that is contained in the converted PDF (the converted PDF is in OneDrive and I can open it there and see that it does contain the information from the HTML file).

 

I have included a portion of my Flow.  Is there something I need to specify in the "Send an Email" step?   Any assistance would be sincerely appreciated.

 

Thank you!

 

Highlighted
Dual Super User III
Dual Super User III

Re: Create PDF file and then send file to email address entered in PowerApps

Hi!

Let's hope this thread will help you

https://powerusers.microsoft.com/t5/Building-Flows/PDF-file-after-converting-HTML-not-opening/td-p/3...

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Advocate I
Advocate I

Re: Create PDF file and then send file to email address entered in PowerApps

Thank you @efialttes.

 

The HTML converts to PDF just fine.  I can open the PDF in OneDrive and visually confirm that it does contain exactly what is in the HTML file.

 

My problem is in trying to email this PDF as an attachment.  How do I properly attach it to "Send an Email" in Flow.  The document that arrives is not that same as the document created.

Highlighted
Dual Super User III
Dual Super User III

Re: Create PDF file and then send file to email address entered in PowerApps

Hi again!

So in your first post you mentioned you didn't know what to add as 'Attachment content'.

"I put the name of the file in Attachments Name but what should be entered in Attachment Content?"

 

And the thread I suggested explains what to add.

Did you already try it?

This is the suggestion design. Please note OneDrive and Sharepoint action blocks are very similar, meaning there is a 'Get file content' action also in OneDrive. Now, you need to assign its 'File Content' output to Attachments content section in your 'Send an email'

Flow_pdfattach.PNG

Hope this helps!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Advocate I
Advocate I

Re: Create PDF file and then send file to email address entered in PowerApps

Hi again @efialttes!

 

So sorry!  I didn't realize that there was more to the post you suggested (the problem initially stated is not my problem) but further down the user stated that they are having ANOTHER problem (similar to mine).  I will try that and let you know.

 

Thank you!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,356)