Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on 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
    CNT 10,919 on at
    Re: How do you add aatributes like color to an message pushed to Teams?

    @Future_Vision Glad to help!

  • Future_Vision Profile Picture
    Future_Vision 634 on at
    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
    CNT 10,919 on at
    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
    RandyHayes 76,287 on at
    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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard