How to Format HTML Table in Power Automate?

Want to learn how to format HTML table in Power Automate? Well, this Power Automate tutorial will help you learn how we can format or design an HTML table in Power Automate with a simple scenario.

Power Automate Format HTML Table

When we create a Power Automate HTML table without applying any formatting, it will appear unstyled, as shown below.

Power Automate create HTML table custom column

After formatting the Power Automate HTML table, it will appear as shown below.

Power Automate create html table formatting

How to Format HTML Table in Power Automate

To format an HTML table in Power Automate, follow the steps below.

Example:

I have used a SharePoint List named ‘Internal Job Post‘ with a few columns and their data types.

ColumnsData Types
Job Title Single line of text
Job DescriptionMultiple lines of text
SkillsChoice
Job Post DateDate and Time

Refer to the image below:

Power Automate format HTML table

To work around this, follow the steps below.

1. Open Power Automate using https://make.powerautomate.com in your browser -> Click on + Create -> Select the Instant cloud flow -> Provide the flow name and choose the trigger’s flow (Manually trigger the flow).

2. Add the ‘Get item‘ flow action to retrieve all the information of a SharePoint List and set the required field:

  • Site Address: Select and provide the specific SharePoint Site address.
  • List Name: Select the particular SharePoint list name.
Format HTML Table in Power Automate

3. To shape or transform the data received from a previous action in the flow, add the ‘Select’ flow action and set all the details:

  • From: Select the value from dynamic content [SharePoint list].
  • Map: Provide the column names and select their values from Dynamic content.
How to format HTML table in Power Automate

4. Next, add the ‘Create HTML table’ flow action for formatting and presenting data in a structured manner and set the required fields as:

  • From: Here, I have given the Output of the Select action from Dynamic content.
  • Columns: Select the type of columns to display the HTML table.
Power Automate format HTML table styling

5. Then, add the ‘Compose‘ flow action to format the table by using an expression and set the required field:

Inputs: Insert the expression to format the HTML table. At the end of the expression, set the output of the Create HTML table flow action from Dynamic content.

<style>
table {
  border: 1px solid #1C6EA4;
  background-color: #EEEEEE;
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}
table td, table th {
  border: 1px solid #AAAAAA;
  padding: 3px 2px;
}
table tbody td {
  font-size: 13px;
}
table thead {
  background: #1C6EA4;
  border-bottom: 2px solid #444444;
}
table thead th {
  font-size: 15px;
  font-weight: bold;
  color: #FFFFFF;
  border-left: 2px solid #f2f2f2;
}
table thead th:first-child {
  border-left: none;
}
Format Power Automate HTML Table

6. Add the ‘Send an email(V2)’ flow action to display the formatted HTML table and set the required field.

  • To: Provide the user email address.
  • Subject: Enter the purpose of the email.
  • Body: Here, I have selected the Outputs of the compose action from dynamic content to construct the email’s body.
How to Format HTML Table in Power Automate

7. Now, it’s time to Save and Test. Then, test it Manually. Then, the Send an email(V2) flow action will display the output below.

Formatting HTML table in Power Automate

This is how we can format an HTML table in Power Automate.

Conclusion

I hope this Power Automate tutorial taught the step-by-step procedure to format HTML table in Power Automate with an example.

Also, you may like some more Power Automate tutorials: