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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Add background color t...
Power Automate
Unanswered

Add background color to a HTML Table

(0) ShareShare
ReportReport
Posted on by 559

Hi All,

 

I have flow which gets values from SharePoint using Power automate flow and send mail to the user. Using Create HTML Table I'm getting the values. I have a field called Overall RAG (with Choices Red, Green, Amber). If the Overall RAG value is Red, I want this column background color to be Red. Likewise the same for Green and Amber.  Using Compose I have given the replace code to get the background color for the Overall RAG column. The replace code is:

replace(replace(replace(body('Create_HTML_table'), '<td>Amber</td>', '<td background-color = "#FFA500" ></td>'), '<td>Green</td>', '<td background-color = "#008000" ></td>'), '<td>Red</td>', '<td background-color = "#FF0000" ></td>').

And given the output of Compose to the Send an email part. But the background color is not getting displayed for the column. 

I have tried to give using the style tag in HTML table but still color is not getting displayed. I have attached screenshots for the same.

Any help/suggestion on this?

Thanks in adavnce.

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,479 Super User 2025 Season 2 on at

    While doing the replace you eliminate the values to be displayed. your table cells are now empty.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard