Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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

 

  • csbassplayer200 Profile Picture
    36 on at
    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,053 Super User 2025 Season 1 on at
    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 at
    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,053 Super User 2025 Season 1 on at
    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 at
    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,053 Super User 2025 Season 1 on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492