Hello, I would like to post a SharePoint list item to a specific Teams subchannel depending on the selection the user has chosen from a dropdown. Does anyone know how this flow can be created?
Hello, I would like to post a SharePoint list item to a specific Teams subchannel depending on the selection the user has chosen from a dropdown. Does anyone know how this flow can be created?
Hi @JenG
Based on the following:
MicrosoftTeams.PostMessageToChannelV3("28d3ec1b-2f15-49c8-ac27-3f070a89a141",Dropdown1.SelectedText.id,{contentType: "html", content: "Hello World"})
The parameters are the group ID, channel ID and the message content.
GroupID
I retrieved the group ID via teams, ellipses get link to channel and in the URL there is groupID=.....
ChannelID
For the channel ID's, I used a dropdown based on the expression MicrosoftTeams.GetChannelsForGroup which accepts a groupID too and returns a table of channels for that group. You could save that expression to a collection, rather than use it on a dropdown and lookup based on your other dropdown values?
Message Content
I just went with a basic message.
{contentType: "html", content: "Hello World"}
HOWEVER!....
I have just looked up the official docs and this is deprecated 😞 Microsoft Teams - Connectors | Microsoft Docs and the alternative Microsoft Teams - Connectors | Microsoft Docs does not give much away in terms of the parameters required.
So I hooked up a flow as follows:
Same idea with a drop down for the channel names and I pass the value dynamically. You could also pass the message if you wanted. Note my flow is called SendMessagefromPowerApps.
SendMessagefromPowerApps.Run(Dropdown1.SelectedText.id)
Damien
Thank you for replying. I have the Teams connector set. However, I am not sure how to do the rest of what you listed. Can you please break it down further for me?
Hi @JenG
Potentially no need for a flow for this one. There is a Teams connector.
If you add the connector:
You can post to a team with the following expression:
MicrosoftTeams.PostMessageToChannelV3("28d3ec1b-2f15-49c8-ac27-3f070a89a141",Dropdown1.SelectedText.id,{contentType: "html", content: "Hello World"})
I created a drop down of channels for a specific group as follows:
MicrosoftTeams.GetChannelsForGroup("28d3ec1b-2f15-49c8-ac27-3f070a89a141").value
The button obviously calls the PostMessageToChannelV3 expression.
Damien
WarrenBelz
146,702
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,015
Most Valuable Professional