Recently, I was working on a project where I was required to create an HTML table in Power Automate. Also, I needed to work on Power Automate HTML table formatting [Like table header font will be bold and different color].
In this Power Automate article, I will tell you how to create HTML table in Power Automate from SharePoint list, Power Automate style HTML table with an example.
Power Automate Create HTML Table from SharePoint List
To create an HTML table in Power Automate from the SharePoint list, check out the below steps:
Scenario:
To explain this example, I have taken one of my SharePoint lists [Project Management Team] with a couple of columns, as look at below:

Requirement:
My requirement is to send an email of Project details with the Project status value Completed and Rejected. For that, I will create an HTML table in Power Automate.
Go through the below-mentioned points:
1. Open the Power Automate Home page and click + Create. Select Instant Cloud flow. Give the flow a name and select trigger Manually trigger a flow. Tap Create.
2. Then, add the ‘Get items’ flow action under the trigger. Power Automate ‘Get items’ flow action retrieves all items from a SharePoint list. Set the below details:
- Site address: Select a specific site address from the drop-down.
- List Name: Select a specific list from the drop-down.
- Filter Query: Provide the condition as placed below code:
ProjectStatus eq 'Completed' or ProjectStatus eq 'Rejected'Where ‘eq’ means the ‘equals to’ operator in a Power Automate filter query syntax. (ProjectStatus: Internal Name of a Field).

3. Add the ‘Create HTML table’ flow action to present data in table format and set the required fields.
- From: Here, I have selected the value of the Get items’ output from dynamic content.
Click Show all to display all the advanced parameters.
- Columns: Select Custom column from the drop-down options.
| Header | Value |
| Project Title Project Assigned To Project Start Date Project Status Project Deadline | Select value from the dynamic content under Get items and expression |

4. After that, select a Compose flow action to format the HTML table by adding CSS code.
Set the required parameters below:
- Inputs: Insert the below given code.
replace(body('Create_HTML_table'),'<table>','<table border="4">')
5. To send an email, click on the next step and select the Send an Email (V2) (Outlook) action.
Configure the below properties:
- To: Enter the email in a custom manner manually.
- Subject: Provide subject line for the mail
- Body: Include the outputs of the compose flow action.

6. Once the flow is ready, Click on Save. Then, select Test -> In the Test flow window, Click Manually -> Select Done.
Result:
Once your flow runs successfully, you can check your Outlook email. It will receive the Project details in a tabular format – Project Status [Completed/Rejected].
You can refer to the image below:

This is all about how to send an email with an HTML table from the SharePoint list using Power Automate.
Power Automate HTML Table Formatting
To create and format the HTML table, follow the below-mentioned steps:
1. Create a Power Automate Instant cloud flow. Inside the trigger, add the below parameters:
- Task Name: Text Input
- Task Start Date: Date Input
- Task Status: Text Input
- Email: Email Input

2. Next, add the ‘Compose’ flow action to provide the CSS code, set the expression to provide the borders, and create an HTML table.
<table style="border-collapse: collapse; width: 100%; border: 2px solid #4CAF50; margin: 20px;">
<thead>
<tr style="background-color: #4CAF50; color:black;">
<th style="border: 2px solid #4CAF50; padding: 12px;">Task Name</th>
<th style="border: 2px solid #4CAF50; padding: 12px;">Task Start Date</th>
<th style="border: 2px solid #4CAF50; padding: 12px;">Task Status</th>
</tr>
</thead>
<tbody>
<tr style="background-color: #f2f2f2;">
<td style="border: 2px solid #4CAF50; padding: 12px;">Create a SharePoint list</td>
<td style="border: 2px solid #4CAF50; padding: 12px;">05/04/024</td>
<td style="border: 2px solid #4CAF50; padding: 12px;">Completed</td>
</tr>
<tr>
<td style="border: 2px solid #4CAF50; padding: 12px;">@{triggerBody()?['text']}</td>
<td style="border: 2px solid #4CAF50; padding: 12px;">@{triggerBody()?['date']}</td>
<td style="border: 2px solid #4CAF50; padding: 12px;">@{triggerBody()?['text_1']}</td>
</tr>
</tbody>
</table>Replace Task Name, Task Start Date, and Task Status from dynamic content.

3. Then, add the ‘Send an email(V2)’ flow action to send an email consisting of the HTML table with borders. Set all the details.
- To: Provide the user email to whom you want to send email.
- Subject: Enter the purpose of that email.
- Body: I have given the Outputs of the Compose flow action here.

Then, save and run the flow manually.
4. In the Runflow window, provide the required details and Click on the Runflow button.

Outputs:
You can see the below image displaying the table in a customized format.

Also, you may like:
- Power Automate Send Email With Attachment
- Power Automate Date Functions
- Power Automate Approval Reminder
- Sort Array in Power Automate
- Update SharePoint list items using Power Automate
Conclusion
I hope this Power Automate tutorial helps you understand how to create an HTML table from a SharePoint list and format the table using Power Automate.

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.
replace(body(‘Create_HTML_table’),”,”)
The expression is invalid.
if we have mulitple Sharepoint list need report send to email , how can create flow ?