I am working on building a flow that involves sending a message on a channel over Teams from the Flow bot. I know I can mention a user by having the body of the message include emailAddress, but how can I do this for bots?
1 Answers
I'm sure there is an easier way to do this, but here's what I did.
First, you go to Teams, and pick any team. Then, you pick a channel; I would recommend you create a new one, but the less messages the better. Add the bot to that channel, and then mention the bot as you normally would in the channel.
Now go back to Flow, and make a new Flow. Set any trigger, as long as you can trigger the Flow. Then, add a Microsoft Teams "Get Messages" action for the channel you just mentioned the bot in. Then, add an email connector (or anything that allows you to send a message), and put as the body of the message, the dynamic content for the subject of every Microsoft Teams message. Flow should switch you to a "for every" block, running the script for every message. Save the file, export it to your computer, and change the code where it says the subject of each message to the mentions of each message. Re-import the Flow, trigger it, and look for the message. Then you have the code for mentioning the bot.
- 71