![]()
In this article, we will learn about the HTML table in Power Automate. Nowadays, the buzzword in the market is MS Flow or Microsoft Flow, but after 2019 ignite, it has been renamed to Microsoft Power Automate. In this tutorial, we will learn about how we can learn HTML table formatting using Microsoft Power Automate or Microsoft Flow, step by step.
I would say that without MS Flow, SharePoint Online is incomplete. When we talk about SharePoint Online, we must also talk about other related technologies like Microsoft Flow, PowerApps, SPFx, Teams, etc. These all go side by side. As Microsoft is focusing more on SharePoint Online, the on-premise version is not what they are recommending to use, not even the SharePoint designer workflow.
In this context, we could say that MS Flow is an alternative or recommended approach to the modern way of developing a workflow, instead of a designer workflow. There are numerous benefits to using MS Flow; however, because the purpose of this article is to create HTML in Power Automate, my focus will be on how we can use the Create HTML action within Power Automate.ย
Example of use cases of HTML table in Power Automate
There are many use cases in our SharePoint application. Iโll briefly discuss a few: Letโs say your boss has assigned tasks to the team members, and at the end of the day, he/she wants to get the consolidated task status auto-emailed. Then, using MS Flow with โCreate HTMLโ is the right choice.
One more example: Letโs say we have a โCustomer-Salesโ list that holds the details of customer sales summary information, and at the end of the day, an auto email should be sent to the sales manager who will summarize the daily sales. In this case, too, MS Flow with the โCreate HTMLโ action is the right choice. In this article, I will just read โCustomersโ list data and send an email in the form of an HTML table as a POC (proof of concept).
Step-by-step process to format an HTML table using Power Automate
I assume that you know how to create that list with custom columns, so I am skipping the list creation step; hence, here is my already-created โCustomersโ list.

Using MS Flow, I will send this list data to the email in the form of HTML. So letโs start. How can we do this? From your โCustomersโ list page, click on the โFlowโ drop-down list and then click the โCreate a flowโ button, as mentioned below.

ย Click on the โShow moreโ drop-down list.ย

ย Select โWhen a new item is added in SharePoint, complete a custom actionโ template as mentioned below.
Note:
- In a real-time scenario, you need to start your flow based on some specific conditions. Here, Iโll show a POC, i.e., whenever an item is created in the SharePoint list, this flow will get triggered.ย

ย Click on the โContinueโ button as below.ย

ย Then, weโll land on the below page.ย https://tinyurl.com/y3vfo4ybย
Note
- <country>.flow.microsoft.com/ in this URL <country> is dynamic, this will be based on the country from where you are accessing, where it displays as โIndiaโ as I am accessing from India.
- And in the parameters.sharepoint.site=<your SharePoint online site>
โSite Addressโ and โList Nameโ are pre-populated โ make sure these are correct.ย

ย At this moment lets name this flow โCreate and Send HTML Table to Emailโ and click on the โSaveโ button then click on the โ+Next stepโ buttonย

ย Then search with โSharePointโ and select the โGet Itemsโ action as mentioned below,ย

ย Select the โSite Addressโ and โList Nameโ as mentioned below,ย

Note
In Show advanced options โ we can get the data based on the specific query (like camel query) โ in this, we are not handling those, weโll get all data from the โCustomersโ list โ just showing the screen, then click on โ+Next stepโ button.ย

Add data operation โComposeโ action: search for โComposeโ text and select the โData Operationsโ as below,ย

ย From the next screen, select the โSelect Data Operationsโ action.ย

ย We will get the empty โFromโ and โMapโ in the โSelectโ operation action โ you need to click on the from the box and need to double click on the โvalueโ (from Dynamic content) tab.ย ย

Power Automate dynamic content mapping with the SharePoint columnsย
I created all columns and correspond mapping, but only the email ID mapping is shown in the screenshot to demonstrate how to do so. Create a meaningful mapping name that corresponds to your column, then click on the second box (add dynamic content), in the search box type your column name that you want to map under the dynamic content tab, and select your column under the โGet Itemsโ section.ย

Click on the โ+ New stepโ buttonย

ย Select โCreate HTML Tableโ action like below โ search with โCreateโ text then click on โCreate HTML Tableโ actionย

ย Now we can see the โCreate HTML Tableโ action below,ย

Select
ย Click on โ+ New stepโ as below,ย

ย Select the โSend an emailโ action as below,ย

ย Enter the mandatory parameters below for the email action.ย

Note
- In the above configuration, โIs HTMLโ should be selected as โYes,โ otherwise weโll not get tabular format output, so itโs very important, though it is optional. Now that we are done with the basic configuration, letโs test this flow at this moment. Before that, we must save it. Click on the โTestโ button as highlighted below:

From the next screen, select the first radio button and click on the โSave & Testโ button as below,ย

ย Wait for a few seconds โ we will get the below screen,ย

ย As the above-highlighted message says โ add a new item to the SharePoint โCustomersโ list to trigger the flow.ย

Come to your flow screen(tab) โ if everything goes fine you should see the below flow ran a successful message.ย

ย Open your outlook office 365 mailbox using the below URL, https://outlook.office365.com/owa/?realm=SPRND.onmicrosoft.com&exsvurl=1&ll-cc=1033&modurl=0

Here you can see an email has come with all customer details in the HTML tabular format in the email body โ we are done with the basic purpose of this article but the HTML table in the email body does not look nice, however, this is the default behavior. Now weโll format it a little to look better.ย
Format the HTML table using Microsoft Power Automate
We will add padding and color to the above HTML table. Insert a new step in between the โCreate HTML tableโ and โSend an emailโ actions like below.

ย Click on the โAdd an actionโ link like below,ย

ย Select โComposeโ data operation action like below,ย

ย Rename your default โComposeโ to Format Customer Table as below,ย

Enter the below text like the below screen
ย replace(body(โCreate_HTML_tableโ),'<table>โ,'<table border=โ3โณ bgcolor=โ87ceebโ>โ)ย

Now, double click on โSend an email actionโ and select the appropriate output from โFormat Customer Tableโ as below and save the flow.ย

We are done with the basic formatting โ however, you can explore more about this on your own.ย
Test the flow without going to the SharePoint list
Click on the โTestโ button from the top right corner as we did in our previous test and perform the below operation as mentioned in the order and finally, click on the โTestโ button (no 3).ย

ย Now, you can see your flow execution status โ if everything goes fine you will see the below successful message.ย

Now go to your Office 365 Outlook email tab again. You can see the new email has come with proper customer details in a formatted table.

Summary: HTML Table in Power Automate
Thus, in this article, we have learned about the following topics:
- a brief introduction to Microsoft Flow or Power Automate.
- Use cases of HTML tables in MS Flow (Power Automate)
- Actual Implementation: A Step-by-Step Walk-Through
- How to run the flow from a previous successful run without going through the list.
- formatting HTML tables in Microsoft Flow (Power Automate)
- How to design an HTML table border using Microsoft Flow
- How to create an HTML table using Microsoft Flow
- How to format an HTML table using Microsoft Flow
- How to format emails using Microsoft Flow
See Also: Power Automate Tutorials
- You may visit theย Power Automate articles hub
References โ HTML Table in Power Automate
- https://docs.microsoft.com/en-us/flow/getting-started
- https://docs.microsoft.com/en-us/flow/data-operations
About Post Author
Discover more from Global SharePoint
Subscribe to get the latest posts sent to your email.
2 comments on โHTML Table in Power Automate: How Do I Format Table?โ