cancel
Showing results for 
Search instead for 
Did you mean: 
rishona_elijah

Send a proactive message with Power Virtual Agents in Teams

If you are using your Power Virtual Agents in Microsoft Teams, it is possible to have the bot send a message to a user proactively. That means, rather than waiting for the user to chat to the bot, the bot can be the first one to message them. This can be achieved by using the Post a message in a chat or channel Microsoft Teams action in Power Automate. It works in a similarly to messaging someone via the Flow Bot.

 

The video below shows an example of the bot sending a proactive message. In this example, Helpdesk Henry is a chatbot available in Teams. Users can talk to the bot to log their IT support requests. It’s connected to a Teams Dataverse table that tracks the status of their ticket. So, perhaps we want to let the user know once their ticket status changes- i.e. moves from being Submitted to In Progress.

Bot proactively messaging a userBot proactively messaging a user

 

This is the flow that I used for the example above. It is based on the Dataverse trigger: When a row is modified. You can use any trigger you like in order to send the proactive message.

 

Example flow for a proactive messageExample flow for a proactive message

 

 

Your flow will need to include the Microsoft Teams action: Post message in a chat or channel. Make sure set the following:

  • Post as: Power Virtual Agents
  • Post In: Chat with bot
  • Bot: Select the bot who should send the message
Teams action: Post MessageTeams action: Post Message

 

If you are using Dataverse, you may want to send the message to the person who is the owner of the row/record. You can add their email address in the Recipient field of the Teams action as dynamic content. In this example, the message is sent back to the user who initially submitted the IT support request, which is stored in Dataverse. To get their email address, you can use the Dataverse Get a row by ID action and connect it to the Users table.

 

Find the user's email addressFind the user's email address