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

@mention a Microsoft Teams group in Power automate

Hello Power Automate community,

 

I would like to know if it is possible to mention a team in a Teams channel via Power Automate just like the screenshot below.

SoukainaB_0-1624547825488.png

Are there any tips?

 

Thanks in advance for your help,

 

Soukaina

1 REPLY 1
Expiscornovus
Super User
Super User

Hi @SoukainaB,

 

There are a couple of different approaches. One of them is the Invoke HTTP request action. I have used that in the past to mention channels:
https://www.expiscornovus.com/2019/05/29/mention-a-channel-with-flow/

 

Just did some inspection of the team mentioning HTTP request in a developer toolbar and it looks like the example below should work for team mentioning. 

 

teamchannelmentioning.png

 

1. Add an Invoke an HTTP request action. Make sure that in the connection of the action https://graph.microsoft.com is specified as the base resource url.

 

baseresourceurl.png

 

2. Use the following structure for the ChannelPostUrl.
Replace the variables by the correct ids

 

 

https://graph.microsoft.com/beta/teams/@{variables('Team')}/channels/@{variables('Channel')}/messages

 

 

 

Use the code snippet for the body of the request.

Replace the IT team name and the id of the team by your name and id.

 

 

 

{
    "body": {
    "content": "This is test Flow mention team test, <at id=\"0\">IT</at>",
    "contentType": "html"
            },
    "mentions": [
                {
                "id": 0,
                "mentionText": "IT",
                "mentioned": {
                                "conversation": {
                                                    "id": "19:28c7b4ac775f4c2c99e266a5c0b301a5@thread.tacv2",
                                                    "displayName": "IT",
                                                     "mentiontype": "Team"
                                                }
                            }
                }
                ]
}

 

 

 

mentionateaminsteadofachannel.png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,254)