Skip to main content
Community site session details

Community site session details

Session Id : 30ZJvALivPdBHj8WdFOOYB
Power Automate - General Discussion
Unanswered

can we format html using javascript in power automate

Like (0) ShareShare
ReportReport
Posted on 8 Jul 2020 05:46:11 by

Hi All,

 

I have written a flow to send mail.

I have created HTML Table and I want the background color  to change based on the content of the cell.

Example:

If value=Red -> background color should be Red

If value=Green ->background color should be Green 

I have written java script for this using compose action

 

But this is not reflected in mails.

 

Your help on this will be highly appreciated

 

Thanks in advance

  • denyeh Profile Picture
    2 on 26 May 2021 at 17:37:02
    Re: can we format html using javascript in power automate

    Do we know if Microsoft intends to enable javascript within the HTML of Send Email?  I'm in the same boat as @Suma27 .  The only workaround I can think of is having a

    IF value=Red -> background color should be Red" => run this workflow. 

    IF value=Green ->background color should be Green  => run that workflow. 

    This makes for a very ugly Flow!!

     

    Any thoughts or suggestions?

    Thanks

  • yashag2255 Profile Picture
    24,669 Super User 2024 Season 1 on 08 Jul 2020 at 14:00:51
    Re: can we format html using javascript in power automate

    Hi @Suma27 

     

    You cannot use javascript for styling in email actions. You can use the style tags though. You can check out this post for more on styling a table for email in Power Automate: https://ryanmaclean365.com/2020/01/29/power-automate-html-table-styling/ 

     

    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June 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