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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The images from a PDF ...
Power Automate
Answered

The images from a PDF attachment in a mail are corrupt + the flow won't save if I add base64

(0) ShareShare
ReportReport
Posted on by 17

Hi! I am trying to create a flow that, long story short, should send an email with a pdf attachment and that pdf file contains a logo. I know that I should use base64 to convert the image but it's not working at all. 

larastangaciu_0-1717513531903.png

In the red box I've tried to put the base64 but i got an error while trying to save:

larastangaciu_1-1717513696869.png

Does anyone know how to solve this issue?

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @larouise 

     

    I could see that error message shown is saying that there is something wrong in expression under condition action highlighted, so correct the expression under condition so that you can save the flow

    Nived_Nambiar_0-1717523997831.png

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • larouise Profile Picture
    17 on at

    Hiii! That's what I thought too... The error disappeared after deleting the BASE64 code.

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @larouise 

     

    Quite strange- could you try to enclose the base64 code with double quotes like below

     

    <img src="" ....../>

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • larouise Profile Picture
    17 on at

    Tried that... but is this the way to add base64 to that html? 

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @larouise 

     

    Try like this as well 

    https://powerusers.microsoft.com/t5/General-Power-Automate/Convert-Image-to-Base64-in-Power-Automate/td-p/1337955

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • larouise Profile Picture
    17 on at

    Update: I have 3 pictures in the pdf and only 2 of them are working :))) when I put the base64 for the third one and try to save it, it gives me that error with the condition... maybe it's too much code in the Compose?

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @larouise 

     

    don't think so, as i have tried to create a pdf file with 3 images and it worked fine

    Nived_Nambiar_0-1717554582286.png

     

    Could you show me what condition u have used ? is it anyway related with third image file ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • larouise Profile Picture
    17 on at

    The condition is very simple, I don't think is related in anyway to the images... can you show me how did you put the base64 in that function? When i try to do it, it says that the expression is invalid...

    larastangaciu_0-1717562213466.png

     

  • Verified answer
    Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @larouise 

     

    Expression was simple it just take the file content data as input like below

    Nived_Nambiar_0-1717604582958.png

     

    Expression - 

    base64(outputs('Get_file_content')?['body'])
     
    Now note one point here, image type which i have used was of type jpeg, that is why i have specified data&colon;image/jpeg; when specifying image content in html.
     
    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌


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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard