Skip to content

Call MS Flow from Power Virtual Agent

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.

Use Case:

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:

  1. Add new node.
  2. Click on “Call an action” –> “Create a flow”
  1. 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.
  1. 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.
  1. 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.
  1. Add a new row action of dataverse and pass the values from Dynamic Content as shown below.
  1. Add one more action to create a case record in dataverse.
  • Select “Add a row” action of dataverse and enter details.
  1. 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

  1. 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
  1. 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

Testing Chatbot:

I hope you find this helpful!😊😊😊

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments