cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TaylorZ
Regular Visitor

Convert emails with images to PDF

Hi, 

 

I'm able to convert emails to PDF with the following:

 

- When New Email Arrives (V3)

- Create File ( save as HTML here)

- Convert file (Convert to PDF)

- Save File

 

All working correctly expect with the cid:image001.png@01d75c6c.a1cda030 which is embedded in the email which I cant seem to include in the HTML & PDF output 

 

is there something I need to do to get this to work? 

 

thanks 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @TaylorZ :

If you want to create a pdf file in this way, the pictures in the html text must be in base64 format.
In addition, the image in the email body in the get email action is actually saved in the attachment and returned, so you need to find the content of the corresponding image in the attachment through the image id and replace the src of the image in the email body. your requirements.

I've made a test for your reference:

v-bofeng-msft_0-1623211444012.png

v-bofeng-msft_1-1623211500481.png

The Result:

v-bofeng-msft_3-1623211573617.png

 

v-bofeng-msft_2-1623211547225.png

Because the Replace function has a processing limit, the size of each picture in the email cannot theoretically exceed 128kb.

Best Regards,

Bof

 

 

View solution in original post

8 REPLIES 8
v-bofeng-msft
Community Support
Community Support

Hi @TaylorZ :

If you want to create a pdf file in this way, the pictures in the html text must be in base64 format.
In addition, the image in the email body in the get email action is actually saved in the attachment and returned, so you need to find the content of the corresponding image in the attachment through the image id and replace the src of the image in the email body. your requirements.

I've made a test for your reference:

v-bofeng-msft_0-1623211444012.png

v-bofeng-msft_1-1623211500481.png

The Result:

v-bofeng-msft_3-1623211573617.png

 

v-bofeng-msft_2-1623211547225.png

Because the Replace function has a processing limit, the size of each picture in the email cannot theoretically exceed 128kb.

Best Regards,

Bof

 

 

Hi, thank you so much for you time, seem to be work however the image still doesn't seem to have been exported 

 

 "cid:image001.png@01D75D0D.1FE33160"

 

from the create file (the image will always be the same image in all the emails. 

 

I'm probably doing something wrong somewhere 😕 Screenshot 2021-06-09 at 09.04.48.pngScreenshot 2021-06-09 at 09.04.10.pngScreenshot 2021-06-09 at 09.02.01.png

Hi @TaylorZ :

Could you please show me your flow?

What is the size of the picture in the email?

After you run the flow, what is the value of the variable "EmailBody"?

Best Regards,

Bof

Hi, here you go

 

Screenshot 2021-06-09 at 09.49.09.png

Screenshot 2021-06-09 at 09.48.47.png

  

Screenshot 2021-06-09 at 09.53.30.png

 image size is bigger then I thought 288KB so could be filling at that, will test it with a smaller size in a moment 

 

I missed out a , and a space here 

Screenshot 2021-06-09 at 10.11.06.png

 

thank you so much! its just me not reading properly 

Just a quick one, on the PDF the image is cut off anyway to fix that? 

 

Screenshot 2021-06-09 at 10.19.46.png

Hi @TaylorZ :

I haven't thought of a good way at the moment,I can only suggest that you adjust the size of the pictures currently.

Best Regards,

Bof

Yes, thank you 🙂 just working on how to resize the header image 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (3,707)