logo
search
Others

How to Format a Color-Coded HTML Table in Power Automate

WPS Content ManagerWPS Content Manager Sep 30, 2026 869 views

Question details

The user is attempting to generate an HTML email table with conditional colors using data from a Power BI query in a Power Automate flow, but the color coding is not rendering correctly.

How to Format a Color-Coded HTML Table in Power Automate
Product
Power Automate
Device & OS
not provided
Scenario
Automating an email report where data rows require specific background or text colors based on their values.
Observed behavior
The generated HTML table does not display the expected conditional colors based on the output values from the Select action.
Before you start

Ensure you have access to edit your Power Automate flow and verify that the Power BI query is correctly outputting the specific data values you intend to use for conditional formatting.

Solution 1Recommended

Consult the Microsoft Power Automate Community

Since conditional formatting in HTML tables relies heavily on flow-specific configurations and expressions, sharing your flow design with the community is the most effective way to resolve complex logic issues.

Power Automate flows involving Power BI queries, HTML generation, and Select actions can be highly customized. Asking members and engineers in the official community provides you with guidance specific to your flow structure.

1
Gather Flow Details

Take clear screenshots of your flow design, expanding the Power BI query action, the Select action where formatting occurs, and the Create HTML table step.

2
Prepare Sample Data

Extract a small set of mock data that replicates the issue. Ensure you remove any confidential company data, personal emails, or credentials from this dataset.

3
Post in the Community

Visit the official Microsoft Power Automate Community forums. Create a new topic describing your conditional color logic, attach your screenshots and mock data, and wait for expert community feedback.

Consult the Microsoft Power Automate Community
Protect Sensitive Data: Always redact private company data, database schemas, or personal credentials before sharing screenshots or data samples publicly in any forum.
Free Microsoft Office alternative

Need an Easier Way to Analyze and Format Data? Try WPS Office

If complex automated data formatting and HTML coding become a bottleneck, WPS Spreadsheet offers a lightweight and highly compatible solution for data analysis, conditional formatting, and reporting without the hassle of writing flow expressions.

High compatibility with Microsoft Excel (.xlsx) files and exported Power BI data formats.Intuitive built-in conditional formatting for color-coding cells instantly without any HTML or CSS coding.Lightweight software that runs smoothly on Windows, Mac, and Linux.Free to download with a familiar, easy-to-use tabbed interface for seamless migration.
microsoft office alternative - wps office

Frequently Asked Questions

Why are my HTML tags showing as plain text in the Power Automate email?

This usually happens when Power Automate escapes the HTML tags automatically, or if the email action is not set to accept HTML. You can resolve this by using a Compose action with a replace() function to change escaped characters like &lt; back to <, and ensuring your email action's 'Is HTML' option is set to 'Yes'.

Can I format a Power Automate HTML table without writing CSS?

Out of the box, the 'Create HTML table' action in Power Automate generates a very basic, unformatted table. To add colors, borders, or custom styling, you must inject CSS styling either in a Compose action before sending the email or inline within your Select action.

Is it possible to export Power BI data directly to a formatted Excel file instead of an HTML email?

Yes, Power Automate provides specific actions to export Power BI paginated reports to supported formats like Excel or PDF. This method preserves native table formatting much better than manually constructing HTML tables.