web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to make some data ...
Power Automate
Answered

How to make some data in HTML Table shown in different colors

(0) ShareShare
ReportReport
Posted on by 64

Hi Experts:

  I have a flow like below picture by using "Create HTML Table" and "Compose" to send the table in an mail;

york_0-1654226798729.png

 

york_1-1654226850187.png

I want that if the result is FAIL, it will be shown in red, how can I achieve it?

 

Categories:
I have the same question (0)
  • shoog Profile Picture
    2,164 on at

    I'm not sure what you are using the Compose action for, but if it's referencing the output of the create HTML table, you could modify the reference to that output to this:

    replace(body('Create_HTML_table_4'), 'FAIL', '<span style="color:rgb(255,0,0)">FAIL</span>')

    to add some HTML/CSS to make the word FAIL turn red.

  • york Profile Picture
    64 on at

    Hi Shoog:

      It seems not work when I add the code into my compose action, below is my CCS code, could you help check how to add it?

    <style>
    table {
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid #197CF7;
    background-color: #EFFFFFF;
    width: 100%;
    text-align: center;
    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 #D0E4F5;
    }
    table thead th:first-child {
    border-left: none;
    }
    </style>

  • Verified answer
    shoog Profile Picture
    2,164 on at

    Ok so you don't actually reference the HTML table in the compose action?

     

    If you only reference the HTML action in the send email action, the expression should be in the send email action, replacing the output of the HTML table action.

  • york Profile Picture
    64 on at

    Hi Shoog:

      Thank you very much!!!!!! It worked now!!👏

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard