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 / Attaching and embeddin...
Power Automate
Answered

Attaching and embedding photos to email from SharePoint Library

(0) ShareShare
ReportReport
Posted on by 36

Hello,

 

I am in the process of creating a flow that triggers from Sharepoint. When certain updates are made, it will trigger an automated email that houses information as well as photos that are stored in a Sharepoint library related to that entry. I have everything working, but i have ran in to a weird snag that i dont understand:  I am attempting to both attach the photos to email, and embed the photos in the email (various departments use either the embeds or attachments, so both are useful). I can get one or the other to work, but not both and im not sure why. (Screenshots below)

 

When the 'PDI Photos' variable is in the attachments field of Send an Email V2, they are attached as one would expect. If i include the embed 'Outputs('Combine_Embed')', the photos are embedded, but the attachments no longer appear attached. If i remove the 'PDI Photos' variable from the attachments field of Send an Email V2, the embed and photos show up, but the data is missing/nonsensical and broken. Can anyone help?  Flow attached below.

 

csbassplayer200_0-1711665102961.jpeg

csbassplayer200_1-1711665128590.jpeg

csbassplayer200_2-1711665156701.jpeg

 

csbassplayer200_6-1711665428232.jpeg

csbassplayer200_7-1711665459889.jpeg

 

 

csbassplayer200_5-1711665231219.jpeg

 

Categories:
  • Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    Hi @csbassplayer200 ,

     

    To embed images in an Outlook email we need to get following details about the image:

    • Content type: tells the browser what kind of file or content is being used so it can handle it correctly. (e.g. image/png)
    • Content: the content of the image in base64 format

     

    ekarim2020_0-1711703160442.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.
    My Blog Site

  • csbassplayer200 Profile Picture
    36 on at

    As far as i see, i have this formatted correctly, what am i missing?

     

    csbassplayer200_0-1711717831078.png

     

  • Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    Hi @csbassplayer200 ,

     

    You need to to use the file content in the <img> tag.

     

    Please see the following example as a reference: Solved: Re: How can I add an image to a V2 email. - Power Platform Community (microsoft.com)

     

    The screen shots are taken from the above post:

    Snag_411af1f9.png

     

    Snag_411b3a6c.png

    Snag_411832f9.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.
    My Blog Site

  • csbassplayer200 Profile Picture
    36 on at

    Does the content have to come from "get file content using path?". The target is a folder that contains a variable amount of files, a minimum of 4, so it needs to capture all files. Would that then need to be appended to an array or how would you proceed from there to capture all of the photos in the folder using that connector?

  • Verified answer
    Ellis Karim Profile Picture
    12,377 Super User 2026 Season 2 on at

    Hi @csbassplayer200 ,

     

    Here is a demo flow:

     

    Snag_2d79104.png

    Snag_2d7f5e9.png

    Snag_2d8a4d6.png

    Snag_2dcd43f.png

    Snag_2de5205.png

     

    This is the HTML code for embedding images:

    Snag_2e3bd79.png

     

    This is the expression in the code above:

    outputs('Get_file_content')?['body']?['$content']

     

    This is the Send an Email action:

    Snag_2e0472e.png

    2024-03-29_23-57-30.gif


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

  • csbassplayer200 Profile Picture
    36 on at

    Worked like a charm! Looks like i did not have the append string step in there. Thank you for all of your assistance!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#2
Henil Profile Picture

Henil 128

#3
anirudhev Profile Picture

anirudhev 124

Last 30 days Overall leaderboard