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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Embed sharepoint list ...
Power Automate
Unanswered

Embed sharepoint list attachment as html in email

(0) ShareShare
ReportReport
Posted on by 205

Hi all,

 

I am trying to embed some images from Sharepoint list as into my email. Have referred to a few posts but my images are still showing up as blanks. Below is how my flow currently look like

ccqn_0-1713146158421.png

ccqn_1-1713146280580.png

Have tried both get attachment content & get file content and while it returns something, the picture is not showing up in me email.

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn ,

    You don't need the get file content control, please delete it.
    Replace the dataUri formula with the formula I provided you.

    I did a test for your reference.

    In my scenario:

    The Result:

    vyetonggumsft_1-1713147263468.png

    My Flow:

    vyetonggumsft_0-1713147240355.png

    vyetonggumsft_2-1713147367330.png

    <img src="data&colon;image/@{body('Get_attachment_content')['$content-type']};base64,@{body('Get_attachment_content')['$content']}" alt="GG">

     

     

    Best Regards,

    Sunshine Gu

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn 

     

    Alternatively, use the below expression with dataUri function:

    <img src='@{dataUri(outputs('Get_attachment_content')?['body'])}'>

    Pls just copy & paste the above expression in the flow.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • ccqn Profile Picture
    205 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @v-yetonggu-msft ,

     

    For some reason I'm still getting blanks even though the get_attachment_content is returning something

    ccqn_0-1713148634572.png

     

  • v-yetonggu-msft Profile Picture
    on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn ,

    Please delete 'colon' and replace ';' to ':'.

    vyetonggumsft_1-1713148986840.png

    Please try this expression:

    vyetonggumsft_0-1713148809526.png

    Best Regards,

    Sunshine Gu

  • ccqn Profile Picture
    205 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @v-yetonggu-msft ,

    Have changed it to 

    ccqn_0-1713149163476.png

     but still not showing up in my email.

  • v-yetonggu-msft Profile Picture
    on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn ,

    Please delete 'image/'.

    vyetonggumsft_2-1713150403304.png

    Please try this expression again:

    vyetonggumsft_0-1713150314326.png

    <img src="data:@{body('Get_attachment_content')['$content-type']};base64,@{body('Get_attachment_content')['$content']}" alt="GG">

    Best Regards,

    Sunshine Gu

  • ccqn Profile Picture
    205 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @v-yetonggu-msft ,

     

    The expression still returns a blank

  • v-yetonggu-msft Profile Picture
    on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn ,

    I'm surprised why your pictures can't be displayed because I used the same method as you.

    Could you please create a simple flow like mine, without other controls and html formats, just to check whether attachments in SharePoint can be embedded in the email body?

    vyetonggumsft_0-1713152303270.png

     

    <img src="data:@{body('Get_attachment_content')['$content-type']};base64,@{body('Get_attachment_content')['$content']}" alt="GG"> 

     

    I know this is a silly question, just to make sure your attachment can be opened in the SharePoint list, right?

    Best Regards,

    Sunshine Gu

  • ccqn Profile Picture
    205 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @v-yetonggu-msft 

    Just tried without any other controls and html format and I still can't embed any image. I can open the image from Sharepoint. Not sure if this will help but this is how I attached the image from Microsoft Forms to Sharepoint.

    ccqn_2-1713153936240.png

    ccqn_3-1713153940012.png

     

     

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at
    Re: Embed sharepoint list attachment as html in email

    Hi @ccqn 

     

    Its look like attachment file size issue.

     

    I faced the same issue on embedding gif image with around 1 MB in size, but the same flow worked for smaller gifs:

    Solved: Re: Add GIF image into the email body - Power Platform Community (microsoft.com)

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard