cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Stmorgan
Level: Powered On

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 Team
Community Support Team

Re: Getting messages from Microsoft Teams

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 Team
Community Support Team

Re: Getting messages from Microsoft Teams

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

Stmorgan
Level: Powered On

Re: Getting messages from Microsoft Teams

That worked! Thanks!

Stmorgan
Level: Powered On

Re: Getting messages from Microsoft Teams

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 436 members 5,515 guests
Please welcome our newest community members: