Introduction: In this blog, we will understand how to create and call ms flow from Power Virtual Agent.
We will also see how we can use the variables created in Power Virtual Agent as input parameters of MS Flow and we will also pass the output from ms flow to power virtual agent.
In my example,
- I am passing “First Name”, “Last Name”, “Email Address” and “Case Description” variables from Power Virtual Agent to MS Flow as input parameters.
- Creating new contact and case record in dataverse using input parameters of ms flow.
- Passing Case Number as the Output parameter from flow to Power Virtual Agent.
Steps to be followed:
- Add new node.
- Click on “Call an action” –> “Create a flow”
- It will redirect you to the Power Automate.
- You can see Trigger and one Action(which returns value to power virtual agent) are automatically created.
- Passing Input parameters from Power Virtual Agent to MS Flow.
You can see I have the below variables in Power Virtual Agent which I will pass as input parameters to ms flow.
- First Name
- Last Name
- Email Address
- Issue Details
- Click on “+Add an Input“
- Select the data type of input based on your requirement
- After selecting the input type provide name to your input parameter.
- Similarly add other input parameters.
- Perform action in MS Flow based on requirement.
In this example,
- I am creating contact in dataverse.
- After creating contact I am creating a case record in dataverse.
- Add a new row action of dataverse and pass the values from Dynamic Content as shown below.
- Add one more action to create a case record in dataverse.
- Select “Add a row” action of dataverse and enter details.
- Output Parameter in MS Flow.
This Output parameter will pass the value from MS Flow to Power Virtual Agent.
- Click on “+Add an output“
- Select the type of output
- For example, I am passing the Case Number as Output parameter
- Save your flow.
Entire Flow with Input and Output Parameter
- After creating flow you have to call that from Power Virtual Agent.
- Click on add new node.
- Click on “Call an action” and select your flow from the list.
- You can See Input and Output Parameters
- Enter value in Input Parameters
- Using Output Parameter of flow in Power Virtual Agent.
We have passed the Case Number as the output parameter we will see how we can use this in power virtual agent.
- Click on Insert Variable and select the variable from drop-down.
- After Adding Input and Output parameters
I hope you find this helpful!😊😊😊