cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Getting messages from Microsoft Teams

Hello, I am trying to incorporate Microsoft Teams into my power app. I have figured out how to post a message to a team but I am trying to figure out how I can see the reply to that message. Is this possible? Here is the code I am using to post a message... MicrosoftTeams.PostMessageToChannel(Dropdown3.Selected.id, /* <-- Team Id */Dropdown4.Selected.id, /* <-- Channel Id */{body:{content:"Text",contentType:1}}) (This works great) I was thinking it would be something similar to this MicrosoftTeams.GetMessagesFromChannel(Dropdown3.Selected.id, /* <-- Team Id */Dropdown4.Selected.id, /* <-- Channel Id */) but that is returning an error...Any thoughts would be appreciated! Thanks!
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

hi @Stmorgan

Can you share a bit more about your issue?

Can you show me the error message?

 

Do you use the label control to display the returned message?

 

I made a test .  There’s no issue on my side.

15.PNG

Set the items property of dropdown1 to:

MicrosoftTeams.GetAllTeams().value

Set the items property of dropdown2 to :

MicrosoftTeams.GetChannelsForGroup(Dropdown1.Selected.id).value

Set the items property of gallery1 to:

MicrosoftTeams.GetMessagesFromChannel(Dropdown1.Selected.id,Dropdown2.Selected.id).value

If you use label control, the app will return error . Because the returned message is a record value.

You can use gallery control to display the message.

 

regards

eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

hi @Stmorgan

Can you share a bit more about your issue?

Can you show me the error message?

 

Do you use the label control to display the returned message?

 

I made a test .  There’s no issue on my side.

15.PNG

Set the items property of dropdown1 to:

MicrosoftTeams.GetAllTeams().value

Set the items property of dropdown2 to :

MicrosoftTeams.GetChannelsForGroup(Dropdown1.Selected.id).value

Set the items property of gallery1 to:

MicrosoftTeams.GetMessagesFromChannel(Dropdown1.Selected.id,Dropdown2.Selected.id).value

If you use label control, the app will return error . Because the returned message is a record value.

You can use gallery control to display the message.

 

regards

eason

Community Support Team _ Eason YU
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

That worked! Thanks!

Thanks! I see the body of the messages that I post now but how can I see when someone replies to it? I don't see in the gallery where I can set anything to retrieve the replies. Thanks, for your help!

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,149)