Flows Made Easy

Power Automate HTML Table Styler

What's New

Easily style HTML tables for Outlook and Gmail emails

More tools
1

Pick a theme & tweak styles on the left, or type your own colours.

2

Check the Live Preview below to see exactly how your table will look.

3

Copy the expression and paste it into a Compose action's fx field in Power Automate.

HTML Table Themes

Select a pre-built colour palette to get started:

Customise Table Styles

Table Alignment
Cell Text Alignment
12px
6px 8px

Power Automate Action

Create HTML table action name

body(' ')

Leave as Create_HTML_table unless you've renamed the "Create HTML table" action in Power Automate. If renamed, enter the new action name here. Spaces are automatically converted to underscores ( _ ).

Live Table Preview

Live preview is a visual approximation. HTML Table Output

Highlight Table Values

Case-sensitive. Must match the entire cell value exactly. Does not match partial text within a cell.

Try it: click a sample value to highlight it in the preview
Power Automate Expression
replace(replace(replace(body('Create_HTML_table'), '<table', '<table style="border-collapse:collapse;width:100%;font-family:sans-serif;font-size:12px;"'), '<th', '<th style="background-color:#1C6EA4;color:#FFFFFF;padding:6px 8px;border:1px solid #CCCCCC;text-align:left;"'), '<td', '<td style="padding:6px 8px;border:1px solid #CCCCCC;color:#333333;text-align:left;"')
Next: Add a Compose action in Power Automate → open Expression (fx) → then paste.
Flow Integration Guide

How to format and style a Power Automate HTML table for Outlook and Gmail

Transform raw HTML tables into beautifully styled Outlook emails in 2 simple steps.

Watch the 60-second walkthrough
1

Paste expression into a Compose action

Add a Compose action after your Create HTML table action. Click inside the Inputs box, switch to the Expression (fx) tab, and paste the copied expression.

Pasting the generated expression into the Compose action's Expression (fx) field in Power Automate
2

Pass Outputs to your email body

In your Send an email (V2) action, select the email Body field and insert the dynamic Outputs from your Compose action.

Using the Compose output as the email body in a Send an Email action in Power Automate

Need advanced tips, date formatting, or full flow walkthroughs?

Explore step-by-step guides, complex replace() examples, and community answers on my blog.

Read full guide & FAQ

FAQ

Frequently asked questions

Outlook, licensing, data sources and privacy.

Why can't I just paste standard HTML <style> tags into my email?
Standard <style> blocks work fine in modern browsers, but classic desktop Outlook handles HTML very differently. While it does not strip style tags entirely, Outlook heavily filters or ignores modern CSS rules, and mobile clients like Gmail often drop them completely. The only way to guarantee consistent formatting across Outlook desktop, web, mobile, and Gmail is to use inline CSS attached directly to each cell and header. FlowTableStyler handles that heavy lifting by providing dynamic HTML table styling and generating a nested Power Automate replace() expression automatically.
Is my data secure?
Yes. All table styling, expression generation, and HTML processing happen 100% locally in your browser. Your data never leaves your device, is never sent to or stored on a backend server, and we never track, inspect, or log the contents of your tables.
Do I need a premium Power Automate licence to use this code?
No. The generated expressions rely entirely on standard, free actions like Compose and Create HTML table. You do not need any premium connectors or third-party paid tools to achieve professional email formatting.
Will these tables look good on Outlook for mobile phones?
Yes. If you choose the '100% (Responsive Full Width)' option in the tool, the code ensures your table automatically adjusts to fit mobile phone screens, preventing users from having to scroll sideways to read your data.
Does this work with my data from SharePoint, Dataverse, or Excel?
Absolutely. The styling expression does not care where your data comes from. Whether you need to style a SharePoint list HTML table, extract records from Dataverse, or format an Excel spreadsheet, as long as you feed that data into a Create HTML table action first, this tool will help you make your Power Automate emails look professional.
Why do my dates and currencies look wrong inside the styled table?
This tool only controls the visual design (colours, borders, and spacing). It does not change your actual data. If your dates look like long system codes or your currencies are missing the '£' symbol, you need to use a Select action in Power Automate to format your numbers and dates before sending them to the HTML table.
Expression copied to clipboard!