cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
flipside82
Regular Visitor

Send Email With HTML Table With Images and Formatting

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Amanthaper
Responsive Resident
Responsive Resident

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.
------------------------------------------------------------------------------------------------------

View solution in original post

4 REPLIES 4
Amanthaper
Responsive Resident
Responsive Resident

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.

 

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
Responsive Resident
Responsive Resident

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.
------------------------------------------------------------------------------------------------------

akaur
Frequent Visitor

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

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,829)