Forum Discussion
Microsoft Flow: @mention action not working for Teams reply
Hey Julian12 ,
Can you try nullifying the other condition, the one where there is no match, also can you try to use mention for some other user.
Thanks
I tried that too, but no change.
I tried with moving the get-mention token action to differentplaces but it produces everywhere even when I remove the condition and only the trigger -> mention -> reply message actions are left^^
It's always saying that the Inputparameters for the following action after the mention token action has an invalid expression?
Are there any logs or deeper error descriptions available in Flow?
- harveer singhAug 19, 2020Steel ContributorYour logic looks correct, am thinking the reason it works for me and not for you with the same logic could be that the feature is still in preview, this feature has been a long standing ask from flow community and finally MS put it into action to some extent, here is another article from Pieter who was able to achieve it with the same logic : https://sharepains.com/2020/07/07/mention-microsoft-teams-power-automate/
Try using @mention with a single brach as shown in the above article and if it still doesn't work am thinking you might just have to wait for it, if it is workable for the time being, you can go with the older approach to achieve this by citing the flow bot to post a response, doesn't look neat but that's all we had back then :
https://powerusers.microsoft.com/t5/Building-Flows/Can-you-Mention-anyone-in-Teams-from-a-flow/m-p/269667#M27395
Thanks- Julian12Aug 21, 2020Brass Contributor
I'm currently testing without the mention token action and I simply added in the code <at>USERMAIL</at> which is working for single users now at least 🙂
Do you have an idea with which method or string I can mention a whole channel?
I tried with its name, channel-ID and the channel mailadress, without success.
Best Regards
- harveer singhAug 23, 2020Steel Contributor
Hello Julian12 ,
Sorry for a delayed response, were you able to get it working ? I have not tested 'mention channel' with flow but it should be achievable using Graph beta. Hopefully you have already found Denis' blog, if not here is a reference: http://www.expiscornovus.com/2019/05/29/mention-a-channel-with-flow/
To use the logic mentioned in the blog, you will have to setup graph access to the environment first, basically just navigate to graph explorer: https://developer.microsoft.com/en-us/graph/graph-explorer set the mode to beta, play around with adding the right permissions to allow an http POST possible to a teams channel, permissions reference for graph: https://docs.microsoft.com/en-us/graph/permissions-reference
Once you have graph setup properly you should be able to post a message from within graph explorer, use the navigation pane on left to choose "post in channel" the query should look like this: https://graph.microsoft.com/beta/teams/%7Bteam-id%7D/channels/%7Bchannel-id%7D/messages
If you are able to post via graph explorer like this, then you have to just simply use the same query https://graph.microsoft.com/beta/teams/%7Bteam-id%7D/channels/%7Bchannel-id%7D/messages in a http post message as per the blog.
This is still in Beta and i have not tested it, so cant assure that it would work great, but surely it looks possible and this is all we have for now.
Thanks
- Julian12Aug 19, 2020Brass ContributorI know this article, curiously in his example the User is evaluated as real account and not just a string value. This doesn't seem to work at the moment at all.
I tried even with a manuall trigger but as soon as I want to add the mention token to any following action similar which action, the flow goes to error state^^
Just checked while answering, it fails even if I include a manual trigger and set as User the dynamic userid who triggers the flow.
So this seems pretty bugged atm, I will have a look at the flow bot cards now..