Skip to main content
Community site session details

Community site session details

Session Id : ATdz5YwkRqPwVTjq6QgbtN
Power Automate - Building Flows
Answered

Attaching and embedding photos to email from SharePoint Library

Like (0) ShareShare
ReportReport
Posted on 28 Mar 2024 22:38:06 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

 

  • csbassplayer200 Profile Picture
    36 on 01 Apr 2024 at 13:27:32
    Re: Attaching and embedding photos to email from SharePoint Library

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

  • Verified answer
    Ellis Karim Profile Picture
    11,177 Super User 2025 Season 2 on 29 Mar 2024 at 23:59:26
    Re: Attaching and embedding photos to email from SharePoint Library

    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 29 Mar 2024 at 22:01:46
    Re: Attaching and embedding photos to email from SharePoint Library

    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?

  • Ellis Karim Profile Picture
    11,177 Super User 2025 Season 2 on 29 Mar 2024 at 13:58:40
    Re: Attaching and embedding photos to email from SharePoint Library

    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 29 Mar 2024 at 13:11:01
    Re: Attaching and embedding photos to email from SharePoint Library

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

     

    csbassplayer200_0-1711717831078.png

     

  • Ellis Karim Profile Picture
    11,177 Super User 2025 Season 2 on 29 Mar 2024 at 09:14:59
    Re: Attaching and embedding photos to email from SharePoint Library

    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

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete