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

Community site session details

Session Id : O75/TlHoP3TBQxozpIsULW
Power Automate - Building Flows
Answered

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

Like (0) ShareShare
ReportReport
Posted on 3 Jun 2022 03:28:45 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?

 

I have the same question (0)
  • york Profile Picture
    64 on 03 Jun 2022 at 08:32:16
    Re: How to make some data in HTML Table shown in different colors

    Hi Shoog:

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

  • Verified answer
    shoog Profile Picture
    2,164 on 03 Jun 2022 at 08:25:36
    Re: How to make some data in HTML Table shown in different colors

    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 03 Jun 2022 at 08:13:44
    Re: How to make some data in HTML Table shown in different colors

    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>

  • shoog Profile Picture
    2,164 on 03 Jun 2022 at 05:31:25
    Re: How to make some data in HTML Table shown in different colors

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete