Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

How do you add aatributes like color to an message pushed to Teams?

Like (0) ShareShare
ReportReport
Posted on 11 Jun 2021 19:22:09 by 634

I am pushing a message to Teams. I've gotten as far as being able to bold the message but I can't seem to add color. This is how I bolded the text.

 

 

MicrosoftTeams.PostMessageToChannelV3(Group.Selected.id,Channel.Selected.id, {content: "Brand: <b>" & AddBrand_TB.Value & "</b> was added", contentType: "html"})

 

 

If you try and add color there is an issue with the extra set of nested quotes.

 

 

MicrosoftTeams.PostMessageToChannelV3(Group.Selected.id,Channel.Selected.id, {content: "Brand: 
 <span style="color:#e67e22"><b>" & AddBrand_TB.Value & "</b></span> was added", contentType: "html"})

 

 

Categories:
  • CNT Profile Picture
    10,919 Super User 2025 Season 1 on 16 Jun 2021 at 15:27:06
    Re: How do you add aatributes like color to an message pushed to Teams?

    @Future_Vision Glad to help!

  • Future_Vision Profile Picture
    634 on 16 Jun 2021 at 15:09:25
    Re: How do you add aatributes like color to an message pushed to Teams?

    @RandyHayes @CNT 

    Sorry for not marking the solution earlier. Both work. Thanks!

  • Verified answer
    CNT Profile Picture
    10,919 Super User 2025 Season 1 on 11 Jun 2021 at 19:26:52
    Re: How do you add aatributes like color to an message pushed to Teams?

    @Future_Vision To have double quotes as part of u'r string u need double double quotes, For example to display "Text" in a Label, the Text property of the Label would be """Text"""

    So in your case to introduce colour, u'll need,

     

    MicrosoftTeams.PostMessageToChannelV3(Group.Selected.id,Channel.Selected.id, {content: "Brand: 
     <span style=""color:#e67e22""><b>" & AddBrand_TB.Value & "</b></span> was added", contentType: "html"})

     

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on 11 Jun 2021 at 19:25:24
    Re: How do you add aatributes like color to an message pushed to Teams?

    @Future_Vision 

    Try changing your formula to the following:

    MicrosoftTeams.PostMessageToChannelV3(Group.Selected.id,Channel.Selected.id, {content: "Brand: 
     <span style='color:#e67e22'><b>" & AddBrand_TB.Value & "</b></span> was added", contentType: "html"})

     

    I hope this is helpful for you.

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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 98 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 73

#3
stampcoin Profile Picture

stampcoin 48

Overall leaderboard
Loading started
Loading started