Mention a Channel or Team – Power Automate
graph.microsoft.com/v1.0/teams/{teamId}/channels/{channelId}/messages
Channel:
----------
{
"body": {
"contentType": "html",
"content": "<at id=\"0\">General</at> This is a channel alert! 🔔"
},
"mentions": [
{
"id": 0,
"mentionText": "General",
"mentioned": {
"conversation": {
"id": "@{outputs('ChannelID')}",
"displayName": "General",
"@odata.type": "microsoft.graph.teamworkConversationIdentity",
"conversationIdentityType": "channel"
}
}
}
]
}
Team:
----------
{
"body": {
"contentType": "html",
"content": "<at id=\"0\">TheWholeTeam</at> Hello Team! 😉"
},
"mentions": [
{
"id": 0,
"mentionText": "TheWholeTeam",
"mentioned": {
"conversation": {
"id": "@{outputs('GroupTeamID')}",
"displayName": "TheWholeTeam",
"@odata.type": "microsoft.graph.teamworkConversationIdentity",
"conversationIdentityType": "team"
}
}
}
]
}
https://damobird365.com/mention-a-channel-or-team-power-automate/#:~:text=Via%20Microsoft%20Teams%2C%20you%20can,you%20are%20familiar%20with%20Graph.
https://manish-solanki.com/how-to-mention-a-teams-or-channel-in-channel-message-using-power-automate/
==============================================
Send a Microsoft Graph HTTP request: Adaptive card and MS Teams Mention in same HTTP request.
URL: https://graph.microsoft.com/v1.0/teams/ad538402-ad01-4a18-a6b3-78b6893e40a5/channels/19:9PcW21v4L5Z5IHj60yJ74mS5-Ov50zoWo3sEszQ3R7w1@thread.tacv2/messages
Method: POST
BODY:
{
"subject": null,
"body": {
"contentType": "html",
"content": "<attachment id=\"1\"></attachment><at id=\"2\">TestSite</at>"
},
"attachments": [ {
"id": "1",
"contentType": "application/vnd.microsoft.card.thumbnail",
"contentUrl": null,
"content": "{\r\n \"title\": \" Title @{outputs('Get_user_profile_(V2)_-_User')?['body/displayName']} !\",\r\n \"subtitle\": \"<h3>sub title </h3>\",\r\n \"text\": \" sample text ; ; ; \r\\n \r\\n <img src=\\\"@{variables('randomImages')[rand(0, length(variables('randomImages')))]}\\\"> \"}",
"name": null,
"thumbnailUrl": null
} ],
"mentions": [ {
"id": 2,
"mentionText": "TestSite",
"mentioned": {
"conversation": {
"id": "ad344409-a404-4a58-a673-7286850367a5",
"displayName": "TestSite",
"@odata.type": "microsoft.graph.teamworkConversationIdentity",
"conversationIdentityType": "team"
} } } ] }
==============================================