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 / Change text color in S...
Power Automate
Unanswered

Change text color in Send Email V2 flow HTML based on value of dynamic content

(0) ShareShare
ReportReport
Posted on by 8

Hello, 

I have a flow that gets the responses from a Microsoft form when a new response is summited. It uses Send Email v2 to send an email to recipients.  I want to change the text color of the dynamic content based on its value. Basically if the Dynamic Content from the form = "YES" I want it to be green, if it is "NO" I want the text to be red.

There are 20 different questions in the email that I want this to happen.

 

I have tried the method below (in red square).  I can't get it to work, the email is sent correctly however it doesn't change the text color.  Any help or direction is appreciated!

 

I just want to make sure that what I'm attempting to do is possible

image.png

 

 

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,081 on at

    Hard code the color and send a message. Do you see the proper color on receiver's end?

  • DaleM Profile Picture
    8 on at

    Hi thanks for your reply! Yes, color works if hard coded.

  • VictorIvanidze Profile Picture
    13,081 on at

    It means now you know what to do. 😉

  • DaleM Profile Picture
    8 on at

    Do you mean hard-code it all?  Are you saying make all one color because It's not possible to change it dynamically if it is Yes or No to Green or red?

     

    Because when you said does it work when hard coded, I assumed you meant that I specify what color the answer would be, meaning it would be that color no matter what the answer was.

  • RobElliott Profile Picture
    10,514 Super User 2026 Season 1 on at

    @DaleM the way I do this is to use a Switch control that is a type of condition that just looks at the answer to 1 question. If it's Yes then set a string variable to 1 color, otherwise set the variable to a different color, and then use the variable in a span in your email.

     

    1-Variable.png

     

    2-Switch.png

     

    3-Email.png

     

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

  • DaleM Profile Picture
    8 on at

    Hey Rob!, Thank you for your reply, I wondered how this would work, I had hit on a thread somewhere that indicated that method was a solution.  Thank you so much for the screenshot. That helps a lot!

     

    I sort of got discouraged when I was looking at it because (and correct me if I'm wrong) I will need to create a variable for each question answer correct?  If so, there are 25 questions so I would need 25 variables...

     

     

    Again thank you guys for taking the time to reply and provide help, I appreciate you!

     

    Dale

     

     

  • RobElliott Profile Picture
    10,514 Super User 2026 Season 1 on at

    Our Display Screen Equipment Assessment form has, I think, 32 questions and columns! It took a long time to build and the flow is very long which is why I gave you a heavily-cut-down version of it! But if you decide to bite the bullet and build it at least you know how to do it. Start with 1 answer and if that works then build it up from there. Good luck 🙂

     

    Rob
    Los Gallardos

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 458

#2
Vish WR Profile Picture

Vish WR 345

#3
David_MA Profile Picture

David_MA 261 Super User 2026 Season 1

Last 30 days Overall leaderboard