How to create and call Microsoft flow from Power Virtual Agent

In this blog, let’s understand how to create and call Microsoft flow from Power Virtual Agent.

We will also see how we can use the variables created in Power Virtual Agent as input parameters of Microsoft flow and we will also pass the output from Microsoft 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 Microsoft flow as input parameters.
  • Creating new contact and case record in data verse using input parameters of Microsoft 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”

Use Case:

In my example,

  • I am passing “First Name”, “Last Name”, “Email Address” and “Case Description” variables from Power Virtual Agent to Microsoft flow as input parameters.
  • Creating new contact and case record in data verse using input parameters of Microsoft 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 Microsoft 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 data verse.
  • After creating contact, I am creating a case record in data verse.

  1. Add a new row action of data verse and pass the values from Dynamic Content as shown below.
  1. Add one more action to create a case record in data verse.
  • Select “Add a row” action of data verse and enter details.
  1. Output Parameter in Microsoft flow.

This Output parameter will pass the value from Microsoft 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

10. 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:

Share this article on
Facebook
Twitter
LinkedIn
WhatsApp
Print

Thank you!

Here is your guide to “Azure for Retail”!

Thank you!

Here is your guide to “Azure for Manufacturing”!

Thank you!

Here is your guide to “Microsoft Dynamics 365 Business Central Capability Guide”!

Thank you!

Here is your guide to “The Developer’s 7-Step Guide to Low-Code App Development”!