Mention a team with a flow

Today I had a couple of queries about mentioning in Microsoft Teams. I revisited the Mention a channel with flow post because of the Invalid request body was sent error. And I also created this new blog about team mentioning.

Original request

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.

@mention a Microsoft Teams group in Power automate

teamchannelmentioning

Invoke HTTP request approach

Turns out this can still be done by using the Invoke an HTTP request approach.

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.

2. Use the Send chatMessage in channel method from the Graph API .

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.

mentionateaminsteadofachannel

Happy testing!

You may also like...

9 Responses

  1. Hubert says:

    Do we know if/when we could generate an @-mention for a custom tag?

  2. Dennis says:

    @Hubert, haven’t seen that scenario working before.

    But I will have another try at it since the schema slightly changed recently 🙂

  3. Dennis says:

    @Hubert, it should be possible by setting the tag property in the json. I posted another blog about this:
    https://www.expiscornovus.com/2021/07/01/mention-a-tag-with-a-flow/

  4. Hubert says:

    Yay!

    Too bad this one is a Premium connector though ? I’m on an EDU plan with possibly no hope of really, ever going on to a Premium plan.

  5. Attila Dobai says:

    How did you build the Channel Post URL that you reference. I think this is where mine is failing. TIA

  6. Dennis says:

    @Attila,

    In this example that is a variable of type string. Normally the value of the variable would be something like below:
    https://graph.microsoft.com/beta/teams/teamid/channels/channelid/messages

    Replace the teamid and channelid by the ids of the Team and Channel you want to use.

  7. Sinan says:

    Hi Dennis

    First of all great Post!

    I wanted to know if you also can force the activity Notification with mentioning.
    I have done your steps and all working but not showing in activity feed.

    Thanks for your reply.

  8. Douglas says:

    Hi, is there a way to insert image on this Example JSON cone snippet ?
    I am trying to do that, but i always get an error (invalid json).
    Could you post an example json like above with embed image to show on Teams Post ?

  1. July 1, 2021

    […] Mention a team with a flow […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.