In this post we will learn how to call Power Automate flow from Power Virtual Agent and retrieve information from the data source.
Microsoft provides the Power Virtual Agents (PVA) service as a component of the Microsoft Power Platform. It helps businesses to quickly develop and roll out AI-powered chatbots or virtual agents to communicate with clients and staff via a variety of online channels, including websites, mobile apps, and messaging services. Without requiring substantial coding or AI expertise, Power Virtual Agents enables organizations to offer automated, intelligent, and conversational experiences.
Power Automate is a powerful way to automate processes and you can integrate Power Automate and Power Virtual agent to extend the capabilities of your chatbot.
How to Call Power Automate flow from Power Virtual Agent?
It is easy to integrate Power Virtual Agents (PVA) with Power Automate, you can follow these steps.
In this example the Employees can initiate conversations with the chatbot to inquire about his information, the chatbot will ask the employee for his User ID and then return the employee data.
Create your Chatbot or Open an existing Chatbot in Power Virtual Agents
- Create new Topic.
- Trigger the phrases that the user can enter
- Add Question to ask user to enter his User ID and change the Identity to be number as the flow input type will be number.
- Add an action to call your flow using “Call an action” or add existing flow
- It will open the Power Automate with a new flow that trigger from Power Virtual Agent, You can add inputs to the flow that the user will give through the chatbot, you will find Text , Yes/No, and Number variable that can be an input for your flow.
- Create your flow and if it will return values to the Virtual agent identify these variables in the Output
- After Saving the flow , go back to your bot and refresh, your flow will appear in the Call an action
- Choose the flow and it will set the input and the output variables as shown below
- Set the Power Automate input to the variable created in Save response as “Var2”
- Now add message to display these variables to the user
- Save your Virtual bot and test it, it will display the employee information once he type any word that we mentioned in the phrase.
- Subscribe to Power Platform Geeks YouTube channel.
- Register to Saudi Arabia Power Platform User Group.
- Have a related question? Please ask it at deBUG.to Community.