Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Conditionally highlight 1 cell in a html table

(0) ShareShare
ReportReport
Posted on by 116

Hi, i have an email that is generated through a flow and the feedback i have is that the Yes/No isn't obvious. Any ideas how i can make 1 option stand out over the other? Change background colour maybe?

 

ToastYes
CerealNo
EggsNo
BaconYes
PorridgeYes
SausageYes
  • Krish1729 Profile Picture
    53 on at
    Re: Conditionally highlight 1 cell in a html table

    Hello,  @The_blue @Paulie78 

     

    I would like to do it for both Yes and No. Please provide a solution for it.

     

    Thanks,

    Krishna

  • Krish1729 Profile Picture
    53 on at
    Re: Conditionally highlight 1 cell in a html table

    Hello,  @The_blue @Paulie78 

     

    I would like to do it for both Yes and No. Please provide a solution for it.

     

    Thanks,

    Krishna

  • Paulie78 Profile Picture
    8,416 Super User 2025 Season 1 on at
    Re: Conditionally highlight 1 cell in a html table

    Your requirement is quite simple as you only want to make a distinction between the Yes or No values. You can do it like this:

    tableHighlightYes.png

    The expression I used in the final compose was:

    replace( body('Create_HTML_table'), '<td>Yes</td>', '<td style="background-color:#ADD8E6">Yes</td>')

    Which produces output like this:

    Paulie78_0-1613474033588.png

     

  • Mark-Shenouda Profile Picture
    Microsoft Employee on at
    Re: Conditionally highlight 1 cell in a html table

    Hi @The_blue 
    Hope you are well, 
    the only way you can apply this is by structuring the HTML based on the value of the field
    Please check this similar Post.
    https://powerusers.microsoft.com/t5/Building-Flows/highlight-some-entries-in-a-Create-HTML-table-or-remove-extra/td-p/606585 


  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at
    Re: Conditionally highlight 1 cell in a html table

    @The_blue  another alternative is to not use Create HTML table action and define the HTML table as shown in this post https://alextofan.com/2019/02/14/flow-how-to-change-the-style-of-your-html-table-in-flow/

     

  • annajhaveri Profile Picture
    8,531 Most Valuable Professional on at
    Re: Conditionally highlight 1 cell in a html table

    @The_blue There isn't direct way to do this type of formatting in flow, you can use below expression to format specific column, but you need to also the value in the expression. Use this expression after Create HTML action by adding compose action.

    replace(body('Create_HTML_table'),'<td>Blue','<td class="tdcolor">Blue')
    

     Then add another compose action and provide following that compose action. Here are you are defining the styling, like the background color

    <style>
    .tdcolor{
    background-color: red;
    }
    </style>

     

    Now use outputs of those compose actions in the send email action, first use Output of Styling compose action and then output of HTML compose action.

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >