web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert emails with im...
Power Automate
Unanswered

Convert emails with images to PDF

(1) ShareShare
ReportReport
Posted on by 16

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 

 

 

 

 

Categories:
I have the same question (1)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    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

     

     

  • TaylorZ Profile Picture
    16 on at

    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

  • v-bofeng-msft Profile Picture
    on at

    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

  • TaylorZ Profile Picture
    16 on at

    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 

     

  • TaylorZ Profile Picture
    16 on at

    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 

  • TaylorZ Profile Picture
    16 on at

    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

  • v-bofeng-msft Profile Picture
    on at

    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

  • TaylorZ Profile Picture
    16 on at

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

  • Gandizzle Profile Picture
    6 on at

    Hello everyone, I know the post is a bit old, but that's exactly what I'm looking for and it just won't work. The result of this flow is red crosses where the images should be. Here is my flow. please please help me @v-bofeng-msft , @TaylorZ 

    1.PNG3.png4.PNG

  • RanieFibia Profile Picture
    20 on at

    @Gandizzle I have the same problem did you find a solution?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard