The Create HTML Table action in Power Automate is a useful tool, but lacks any formatting or styling options. In this post I am going to explain how to format the HTML table produced by Power Automate. Here is an example of the default output:

In my opinion:
- The table is just ugly.
- There are no column alignment options.
- If you are using custom columns, it does not allow you to put spaces in the column headers.
The good news is that the Create HTML Table action produces basic HTML that can be easily modified or styled. The HTML source of the table generated above by Power Automate above is:
<table> <thead> <tr> <th>FirstName</th> <th>LastName</th> <th>JobDescription</th> <th>Furloughed</th> <th>FurlougedDate</th> </tr> </thead> <tbody> <tr> <td>Paul</td> <td>Murana</td> <td>Power Automate Developer</td> <td>No</td> <td></td> </tr> <tr> <td>Micheal</td> <td>Knight</td> <td>Lone Ranger</td> <td>Yes</td> <td>1986-04-04</td> </tr> <tr> <td>Peter</td> <td>Venkman</td> <td>Ghost Hunter</td> <td>No</td> <td></td> </tr> <tr> <td>John</td> <td>Rambo</td> <td>Mercenary</td> <td>No</td> <td></td> </tr> </tbody> </table>
Use CSS to create a much more attractive table
By adding some CSS, you can make the table much more attractive very quickly:

The simple CSS I applied to the above is:
<style> Table { font-family: Arial, Helvetica, sans-serif; background-color: #EEEEEE; border-collapse: collapse; width: 100%; } Table td, Table th { border: 1px solid #ddd; padding: 3px 3px; } Table th { font-size: 15px; font-weight: bold; padding-top: 12px; padding-bottom: 12px; text-align: left; background-color: #1C6EA4; color: white; } </style>
If you aren’t a CSS wizard you can use https://divtable.com/table-styler/ to get you started.
So now you have got the CSS, here is how to add it to the table:
- Create a compose step called CSS Table Style.
- Paste your CSS into that compose action.
- In your Send an email action paste the CSS and then the HTML Table:
You can put anything else you need in the body, but I would suggest that you put the CSS before anything else.
Add spaces to the column headings
In my example, I used custom columns and I was unable to add spaces to the column headings. So here is my workaround:
- Use a carat ^ symbol wherever you want a space in the column header.
- Create a compose action to replace the carat with a space.
- Select the output of the compose in your email instead of your HTML Table output:

The compose expression is:
replace(body('Create_HTML_table'), '^', ' ')
You could of course use any symbol, but make sure to use one that isn’t going to be in use elsewhere in the table. The carats are replaced with spaces:

You can take this much further by not using the Create HTML Table action at all, and constructing your own table directly in Power Automate and looping through an array of records. This is something I do sometimes, but it is a lot more work and I wanted to quickly cover how to improve the look of the standard action.