Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Send Email With HTML Table With Images and Formatting

Like (0) ShareShare
ReportReport
Posted on 11 Nov 2020 15:25:14 by 4

I am trying to send an email with an HTML Table that includes an image and text. I would like to style the table to include the image first and then a heading, then text, then a hyperlink, then more text. Basically, how do I get this 

flipside82_0-1605108151147.png

into a HTML table for each item that gets added? This work great if I'm sending just 1 item, but I need to send more than 1 item in an email from SharePoint. I have it working where it Get Items filtered based on my criteria, but I can't figure out how to do this HTML formatting in the table. I hope that makes sense.

  • Community Power Platform Member Profile Picture
    on 18 May 2023 at 13:39:47
    Re: how to send an email of a collection as a html table with image and preview it in email using power app and power automate?

    I want to preview the image like this, but it previews only the link like the next screenshot. 
    So, I need help to preview the images. My flow Screenshot is also attached.

    Want to preview the image like this.JPG

     

    My.JPG

     

    My Flow-1.JPG

     

    flow2.JPG

     

    flow - 3.JPG

     

    flow - 4.JPG

     

     

  • Community Power Platform Member Profile Picture
    on 17 Aug 2021 at 14:49:11
    Re: Send Email With HTML Table With Images and Formatting

    Thank you! This helped me with the issue I was facing.

  • Verified answer
    Amanthaper Profile Picture
    441 on 11 Nov 2020 at 23:00:39
    Re: Send Email With HTML Table With Images and Formatting

    You want this structure

    PAUG_11112020_emailtable1.png

    using this sample HTML (pretty basic)

     

    <html>
     <head>
     <style>
     table, th, td {
     border: 1px solid #E5E7E9;
     border-collapse: collapse;
     }
     </style>
     </head>
    <body>
    <table>
     <tr><td rowspan="5"><img src="https://www.w3schools.com/images/w3schools_green.jpg" width="125" height="125"></td></tr>
     <tr><td>Page Title 1</td></tr>
     <tr><td>Page Description 1</td></tr>
     <tr><td>Read More here: <a href="https://www.google.com/">link to Page Title 1</a></td></tr>
     <tr><td>Bugs Bunny</td></tr>
    </table>
    </body> 
    </html>

     

    The trick is dynamically creating the code from <table> to </table> by looping through the SharePoint list and picking up the list column values and assigning them to the correct HTML table element.

    Here's my example using your scenario.

    Source:

    PAUG_11112020_emailtable3.png

    Flow

    PAUG_11112020_emailtable2.png

    Results

    PAUG_11112020_emailtable4.png

    All I'm doing is using an apply to each action on the SP list and putting the correct list values in the Append to

    HTMLTable action. The Append to HTMLTable 2 (optional) gracefully closes the HTML.

    Let me know if you run into any issues or need help.

    Here for HTML table tips: https://www.w3schools.com/html/html_tables.asp

     

    Cheers,

    Aman

    ------------------------------------------------------------------------------------------------------
    If my post helps you with your problem or answers your question, please mark it Solved or Answered. This helps anyone with similar challenges. If you like my response, please give it a Thumbs Up.
    ------------------------------------------------------------------------------------------------------

  • flipside82 Profile Picture
    4 on 11 Nov 2020 at 20:24:55
    Re: Send Email With HTML Table With Images and Formatting

    Thank you for the reply. I thought it might be a bit confusing. Here is what I'm looking to achieve. Thanks again.

     

    flipside82_0-1605126274139.png

     

  • Amanthaper Profile Picture
    441 on 11 Nov 2020 at 20:07:34
    Re: Send Email With HTML Table With Images and Formatting

    Hi @flipside82 

    What you want to do is pretty easy but your request is a little confusing. You say "image first and then a heading, then text, then a hyperlink, then more text" but the image does not reflect that format. Can you please rearrange the components into a rough draft of your desired table layout and we'll take it from there. We'll make it dynamic also.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
CU30040420-0 Profile Picture

CU30040420-0 23

Overall leaderboard
Loading started
Loading started