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

 

 

View solution in original post

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
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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

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