cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Glaga
Helper I
Helper I

Formating formule Teams send message

Hello,

I want to send a message in my teams group, for each created NEADS item.

I managed to find IDgroup and IDchannel,

But I have problems with the format of my message.
Someone can help me ? 

MicrosoftTeams.PostMessageToChannelV2("f7c9ddb8-b390-4605-90ec-3da226ee3e74";"19:fb36b2626f1f4868b9922650d38c3823@thread.skype";{ body:{content: "NEW NEADS";contentType:1 } })

 

1 ACCEPTED SOLUTION

Accepted Solutions
ltorres
Frequent Visitor

This is my example and works for me:

 

This works for me:

MicrosoftTeams.PostMessageToChannelV2(

        MicrosoftTeams.GetTeam("teamId").id;

        cbox_channels.Selected.id;//list of channels, I get the selected

       {

             body: {};

             content: txt_BodyMessage.Text;//Normal textbox

             contentType: 1

       };

      {subject: txt_Subject.Text}//Normal textbox

)

View solution in original post

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @Glaga ,

Do you want to format your message that will be sent to Teams?

Since you use "contentType:1", it means that your message content is html text.

So the key point is to format your content "NEW NEADS" to the html format you want.

Could you describe what format that you want?

Here's a blog about html format in PowerApps for your reference:

https://powerapps.microsoft.com/en-us/blog/html-email-reporting-with-tabular-data/

 

 

Best regards,

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ltorres
Frequent Visitor

This is my example and works for me:

 

This works for me:

MicrosoftTeams.PostMessageToChannelV2(

        MicrosoftTeams.GetTeam("teamId").id;

        cbox_channels.Selected.id;//list of channels, I get the selected

       {

             body: {};

             content: txt_BodyMessage.Text;//Normal textbox

             contentType: 1

       };

      {subject: txt_Subject.Text}//Normal textbox

)

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,186)