Skip to main content

Notifications

Community site session details

Community site session details

Session Id : uf0pvBHgCoBKSnWcbG2kw+
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

 

 

  • RobElliott Profile Picture
    10,118 Super User 2025 Season 1 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,118 Super User 2025 Season 1 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,207 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,207 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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started
Loading complete