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
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.
Thank you! This helped me with the issue I was facing.
You want this structure
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:
Flow
Results
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.
------------------------------------------------------------------------------------------------------
Thank you for the reply. I thought it might be a bit confusing. Here is what I'm looking to achieve. Thanks again.
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.
stampcoin
51
Michael E. Gernaey
39
Super User 2025 Season 1
CU30040420-0
23