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 / Create HTML Table cond...
Power Automate
Answered

Create HTML Table conditional formatting

(0) ShareShare
ReportReport
Posted on by 237

Hi,

 

I have an HTML table that gets created using the Get Items action. There are multiple rows that get outputted by the create html table action in an email. In the table, there is a CFO Response column that can be either Approve or Reject. I would like to color the Rejected items in red. How can this be done?

 

NPatel12498_0-1715793903504.png

Current, email output:

NPatel12498_1-1715793987458.png

 

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @NPatel12498 

    If you want to make all the Reject to the red in html table , you can use this expression to replace it:

    vyueyunmsft_0-1715824365616.png

    replace( body('Create_HTML_table') , '<td>Reject</td>', '<td style=''background-color:red''>Reject</td>')

     

    The result is as follows:

    vyueyunmsft_1-1715824407134.png

     

    If you want to custom the column color in your html table , you can refer to this video:
    Advanced HTML Tables in Power Automate - Formatting cells, rows and vertical tables (youtube.com)

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

  • NP-18101421-0 Profile Picture
    237 on at

    Your code works but I need to change the font color and not the background, how can that be done?

  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @NPatel12498 

    Thanks for your response! If you want to change the font color , you can use this expression:

    replace( body('Create_HTML_table') , '<td>Reject</td>', '<td style=''color:red''>Reject</td>')

     

    vyueyunmsft_0-1715914914707.png

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard