← Back to Blog

Power Automate: How to Style HTML Tables with CSS

Style Power Automate HTML tables with custom CSS for professional-looking emails. Free generator included to create polished email tables without writing code.

Power Automate: How to Style HTML Tables with CSS


Stop Sending Ugly Emails



By default, the Power Automate "Create HTML table" action generates a functional but incredibly ugly table. If you're sending automated daily reports, approval requests, or SharePoint list summaries to executives, an unstyled, borderless table looks unprofessional.

Fortunately, you can inject custom CSS directly into your flow before sending the email.

This guide will show you the exact architecture needed to style your tables, and introduce a free tool to generate the CSS instantly without writing code.

---

1. The Power Automate Architecture



To style an HTML table in Power Automate, you need three actions in this specific order:

  • Create HTML table: This action takes your array of data (e.g., from "Get items" in SharePoint) and converts it to raw HTML.

  • Compose (for CSS): This is where you store your
    `

    Responsive & Email-Safe CSS Patterns



    Email clients (especially Outlook) have limited CSS support. Here's a responsive pattern that works reliably across all email clients:

    `html

    `

    Conditional Row Coloring by Status



    To highlight specific rows based on their content (e.g., red for "Failed", green for "Approved"), you need to use Power Automate expressions to inject inline styles:

    `html

    `

    Then in your "Apply to each" loop that generates the table rows, conditionally assign the class:

    `

    `

    ---

    3. The Secret Weapon: The HTML Table Styler



    Manually tweaking hex codes, padding sizes, and border widths inside a tiny Power Automate Compose box is frustrating. You can't see what the table looks like until you run the flow and check your email.

    Instead of guessing, use our free Power Automate HTML Table Styler.

    This visual tool allows you to:
    • Pick premium color themes (Corporate Blue, Midnight Dark, Emerald, etc.)

    • Adjust padding and font sizes instantly

    • Toggle borders and striped rows

    • See a live preview of exactly how your table will look in Outlook


    Once you're happy with the design, simply click Copy CSS and paste it directly into your "Compose - CSS" action.

    ---

    4. Combine and Send



    The final step is to merge your CSS and your Table in the email body.

    • Add a Send an email (V2) action.

    • Click the icon to switch to HTML View (this is critical!).

    • In the body, place your dynamic content in this exact order:

    - First: The Outputs from your "Compose - CSS" action.
    - Second: Any introductory text (e.g., "Here is the daily report:").
    - Third: The Output from your "Create HTML table" action.

    When the email arrives, Outlook (or Gmail/Teams) will read the hidden