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 :
Power Platform Community / Forums / Power Automate / CSS Styling(only text ...
Power Automate
Unanswered

CSS Styling(only text Color) is not getting applied through the Power Automate Flow

(0) ShareShare
ReportReport
Posted on by 8

Hello Team,

 

I am using Power Automate to send the PBI report data in an email.

Formatting the PBI report data in a HTML table before sending in email in Power Automate Flow.

All formatting operations are working fine except text-color for the (<td>) table data.

 

The CSS works fine in a web-based HTML compiler.

gsrikar33_0-1733485051202.png

 

But I don't see the text-color styling for the same in my email.

gsrikar33_1-1733485256150.png

 

Please help me understand where am I doing wrong here.

 

Thanks,

Srikar

Categories:
I have the same question (0)
  • Chriddle Profile Picture
    8,416 Super User 2025 Season 2 on at
    CSS Styling(only text Color) is not getting applied through the Power Automate Flow
    HTML and CSS support is limited in most email clients.
  • Verified answer
    SamLed Profile Picture
    2,338 Moderator on at
    CSS Styling(only text Color) is not getting applied through the Power Automate Flow
    Hi,
     
    Chriddle is right, [data-tag] is not supported but inline style does.
     
    Following flow does the trick:
     
     
    I simulate your input JSON with this compose, ajuste references to your case
     
     
    Whole flow :
     

     
    HTMLRows is a select action with "outputs('JSON')['value']" as input.
     
    HTMLRow expression: 
     
    concat('<tr><td style="color:', outputs('Colors')[substring(item()['TripNumber'],0,3)], '">', item()['TripNumber'] ,'</td><td>', item()['Callsign'],'</td><td>', item()['Sector'],'</td><td>', item()['Service'],'</td><td>', item()['ServiceStatus'],'</td><td>', item()['DueDate'],'</td><td>', item()['DueTime'],'</td></tr>')

    In this expression "outputs('Colors')[substring(item()['TripNumber'],0,3)]" get color from "Colors" compose according to first 3 chars of "TripNumber"
     
    Expression in "HTML" compose action :
     
    replace(replace(replace(replace(join(body('HTMLRows'),','),'{"HTMLRow":"',''),'"}',''),',',''), '\"','"')
     
     
    Email body takes outputs of HTML compose.
     
    Results:
     
     
    __________________________________________________________________________________________________
    If this is the answer for your question, please mark the post as Accepted Answer.
    If this answer helps you in any way, please give it a like.
     
  • SG-21101158-0 Profile Picture
    8 on at
    CSS Styling(only text Color) is not getting applied through the Power Automate Flow
    Thank you so much for your time @SamLed.

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard