cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Future_Vision
Post Prodigy
Post Prodigy

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

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"})

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

CNT
Community Champion
Community Champion

@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"})

 

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

CNT
Community Champion
Community Champion

@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"})

 

View solution in original post

Future_Vision
Post Prodigy
Post Prodigy

@RandyHayes @CNT 

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

CNT
Community Champion
Community Champion

@Future_Vision Glad to help!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,853)