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 / How can I add an image...
Power Automate
Answered

How can I add an image to a V2 email.

(0) ShareShare
ReportReport
Posted on by

I've tried several things with no luck.  I'm trying to add an image to an email either from sharepoint, or oneDrive.

 

From sharepoint, I've tried Initializing a variable with the image source:

 

laurentree_0-1641767910255.png

 

 

Where to Outputs() is as follows:

 

 

outputs('Get_file_content_using_path')?['body'].$content

 

  With the content coming from a "Get file content using path", as shown here:

laurentree_1-1641768012303.png

 

And then adding the image tag:

laurentree_2-1641768050506.png

 

 

I've also tried linking directly from the file content, but every time I do this, I get what looks like the binary content of the image.

 

laurentree_3-1641768520607.png

 

 

I've tried several other methods, and I'm never able to see the image, no matter which tutorials, or documentation I follow.  Is it possible to show images in V2 email through power automate from Sharepoint, or OneDrive?  I've also tried different images, and different sizes.  Sometimes I do get a broken link image, but that's as close as I get.

 

 

 

 

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    Please see the following:

    Problem with base64 encoding of image using Get file content

    https://powerusers.microsoft.com/t5/Building-Flows/Problem-with-base64-encoding-of-image-using-Get-file-content/m-p/1294575/highlight/true#M147242

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • mgrachii Profile Picture
    206 on at

    Try with 

    <img src="@{dataUri(outputs('Get_file_content_using_path')?['body'])}" />
  • Community Power Platform Member Profile Picture
    on at

    Same result unfortunately.  No image.

  • Community Power Platform Member Profile Picture
    on at

    Thank you for the post.  I actually spent a lot of time on that answer before.  I've had no luck with it.  I get the correct image (but a png), from Sharepoint as shown below.

    laurentree_0-1641789882699.png

    I use the compose as you showed in the answer:

    laurentree_1-1641789928201.png

     

    Then I add it to my HTML variable.  All of the HTML renders as expected, except for image.

     

    laurentree_2-1641789983571.png

     

     

  • Community Power Platform Member Profile Picture
    on at

    I've also tried following a tutorial that outlines the same problem I had of seeing the binary.  And their solution was changing the dynamic content selection from:

     

    <img src="data&colon;image/jpeg;base64,@{body('Get_file_content')['$content']}" alt="My Image" />

    To,

     

    <img src="data&colon;image/png;base64,@{outputs('Get_file_content')?['body']}" alt="My Image" />

    And either way I have it set, I see the binary the same.

  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    I created a working demo flow. Please try the following steps:

    Snag_411af1f9.png

    Snag_411b3a6c.png

    Ensure that the email body is in HTML view:

    Snag_411832f9.png

    Snag_412091fa.png

    This was the email with the image embedded:

    Snag_411475c2.png

    This is the run time output:

    Snag_41198673.png


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much for the help.  I'm still having issues, and here's what I have below.

     

    laurentree_0-1641828084519.png

     

    My Compose 4, and Compose 5, look slightly different than yours in the picture, but they have the same content.

     

    Compose 4:

    body('Get_file_content_using_path')?['$content-type']

     

    Compose 5:

    body('Get_file_content_using_path')?['$content']

     

    You also had a 'Get_file_properties' step above these, but I didn't see it being used, and wasn't sure what that was for.  Is it necessary?

     

    My output looked the same as yours, but not image showing.

    laurentree_1-1641828313932.png

    As you can see, I am in html input on the send email v2

    laurentree_2-1641828364830.png

    I tried this same setup with 3 different images, hoping it was something wrong with the image.  No luck.

  • mgrachii Profile Picture
    206 on at

    Are you sending this to an Outlook/MS email or to a Gmail account?

    Also, have you tried downloading this file that you are getting content of and make sure that the image loads and it's all ok with it? (not corrupted or not able to render a preview?)

    mgrachii_0-1641830734545.png

     

  • Community Power Platform Member Profile Picture
    on at

    Gmail account, I can try sending it to an outlook account.

  • Community Power Platform Member Profile Picture
    on at

    Ok, so this appears to work on sending to outlook accounts.  I hadn't thought that this would render differently based on which email provider I was using.  I guess I need to find a method that works for emails outside of outlook.  We have <1% of users using outlook.

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard