Aug 17 2020 09:12 AM
Hi,
I'm currently working on a Flow which should be automatically called when a new mail arrives in a teams channel. This mail is from a facility information service an provides info regarding packages and guests.
As there is no specific notification for this mail and so guest could be overseen, I want to add a mention notification to this mail in the channel.
I tried with an automatic flow, with the trigger "when a new post is added to a channel" and then a condition with "if the sender from name is "SENDERNAME" is true" then call a "get mention token for a user" action and add this token to the "reply to message in teams" action.
But as soon as I add the mention token action my flow ends in errors saying that I "should correct invalid inputs for the condition" and "correct invalid inputs for my reply to message" action.
I have no clue why these errors exist, I have access to the team and channel, logged into a teams session in flow and so on.
Can anyone help me in there?
If infos are needed to solve this, just ask ;)
Thanks and Regards!
Aug 17 2020 03:59 PM
Hey @Julian12 ,
Couple of places you could have gone wrong, here is a working screenshot reference:
First off the end result; note that message posted in teams says "Via email" when someone posts email to channel :
So, Instead of using the condition "if the sender from name is" a better option would be "Message from display name contains" like:
Next make sure the flow is replying to the right message, Use "Message ID" (unique for every message) for this :
and that should do the trick.
Thanks
Aug 18 2020 11:23 AM
Hi @harveer singh,
thanks for your detailed explanation!
I rebuilt my flow with the exact same objects and values to your example but still I'm getting these nasty errors. I even tried other channels and other users with which I built the flow, still no luck.
Following is a screenshot of my current flow, though in german but should be same elements:
Maybe you notice something.
The errors occur as soon as I add the mention Token action to the flow, first for the condition and as as soon as I add the last reply to message action, the 2nd error is popping up^^
Best Regards
Aug 18 2020 11:36 AM
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
Aug 19 2020 01:14 AM
Aug 19 2020 03:38 AM
Aug 19 2020 04:05 AM
Aug 21 2020 01:31 AM
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
Aug 23 2020 12:40 PM
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
Aug 26 2020 01:28 AM
Hi @harveer singh,
currently it's only working for a single user.
I already tried this method with a HTTP request but it seems that I need a premium flow license to use this action, which I don't have. So this is stuck again.
Connecting to graph API and doing things is no problem, I already tested a few things with it and they working fine.
I will have a look later again, currently enjoying my holidays :)
Have a nice week!