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 : HjFyH1p2YzMqvRWIDJP+NS
Power Automate - Building Flows
Unanswered

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

Like (0) ShareShare
ReportReport
Posted on 7 Jan 2023 00:43:35 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

 

 

I have the same question (0)
  • RobElliott Profile Picture
    10,179 Super User 2025 Season 2 on 09 Jan 2023 at 16:42:41
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

    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

  • DaleM Profile Picture
    8 on 09 Jan 2023 at 16:39:48
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

    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,179 Super User 2025 Season 2 on 09 Jan 2023 at 15:48:39
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

    @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 09 Jan 2023 at 14:34:13
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

    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.

  • VictorIvanidze Profile Picture
    12,562 on 08 Jan 2023 at 08:52:27
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

    It means now you know what to do. 😉

  • DaleM Profile Picture
    8 on 08 Jan 2023 at 08:39:26
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

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

  • VictorIvanidze Profile Picture
    12,562 on 07 Jan 2023 at 07:05:43
    Re: Change text color in Send Email V2 flow HTML based on value of dynamic content

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

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

Loading started