• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Home
  • Blog
  • Power Platform
    • Power Apps
    • Power Automate
    • Power BI
    • Power Virtual Agents
  • Dynamics 365
  • Azure
  • About Me
Joe Gill Logo

Joe Gill

Microsoft MVP - Power Platform Consultant

Home » Power Platform » Call a Power Automate Flow – Power Automate & Watson

Call a Power Automate Flow – Power Automate & Watson

19th March 2020 by Joe Gill

The beauty of low code platforms is not just that you can build applications quickly but also you easily integrate platforms without any significant technical skills. In this post I am going to show how to call a Power Automate Flow using a Watson Assistant chatbot. I did a post a while back on how you can call a Power Automate Flow from a Power Virtual Agents bot to query details on an order record stored in Dataverse. This used a Power Automate Flow configured as a Http Request trigger that accepts a Json message with an order no. I am going to reuse that Power Automate Flow and call it from Watson instead of PVA. If you want some background on how to create a chat bot using Watson Assistant read my previous post here.

Step 1: Create An Intent

From the Watson designer the first thing I needed to do was to create an intent with the key phrases that will trigger my action.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Step 2: Adding Details To Power Automate Flow Endpoint

I then added details of my Power Automate Flow Http Endpoint under Options-> Webhooks. This Flow accepts an orderno value in a Json messages and returns details of the order in Json format from my order entity in Dataverse.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Step 3: Customize Node

I then added a node called “Get My Order using Flow” to my dialog to handle the #orderquery intent. I needed to use the customize option for the node to enabled Slots and Webhooks.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Step 4: Adding A Handler

Once slots is enabled I was able to add a handler to check if the user had entered an order no. The slot filling capabilities of Watson examine the user’s input and populates the @sys-number entity if it determines they have entered a number. The @sys-number value is saved to a variable called $orderno. Some more info on slot filling here. If the user has not entered an order no then they are are prompted to enter one. The variable is then passed to the webhook and the Power Automate Flow is called and the results are used to populate a variable called $order. The values returned can be displayed to the user by referencing using dot notation as follows $order.description. Watson has a nice concept of anything_else which I used to output a response if the $order variable is not populated.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Step 5: Web Chat Integration

Watson Assistant just like Power Virtual Agents makes it easy to embed your bot into your web site and other channels. From the integration option select the code snippet and copy it as required into your web site.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Step 6: Finishing & Testing Watson Chatbot To Call a Power Automate Flow

The Watson chatbot icon will appear on your web site and clicking the icon will open the chatbot window.

Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Hopefully this post shows how easy it is to integrate platforms from different vendors using low code platforms.

Share This On Social:
  • Tweet
  • Call a Power Automate Flow - Power Automate & Watson Joe Gill Dynamics 365 Consultant

Filed Under: AI, Power Automate, Power Platform

Primary Sidebar

Popular Categories

  • Power Platform
    • Power Apps
    • Power Automate
    • Power Virtual Agents
  • Azure
    • Logic Apps
  • Dynamics 365
  • .NET
  • AI
  • SQL

More to See

Power Platform Requests – Base Request Capacity

17th December 2020 By Joe Gill

Power Automate Desktop

Power Automate Desktop – UI Flow

26th November 2020 By Joe Gill

Tweets

Footer

Joe Gill

Microsoft Business Applications MVP – Power Platform, Dynamics 365 and Azure.

An architect with over twenty years experience designing and developing technology solutions. Specializing in the Microsoft technology stack including Power Platform, Dynamics 365 and Azure. Microsoft MVP Profile

Connect on Social

Useful Links

  • Home
  • Blog
  • About Joe Gill
  • Power Platform
  • Dynamics 365
  • Azure

Featured Posts

Power Platform Requests – Base Request Capacity

Power Automate Desktop – UI Flow

MB-600 – Solution Architect – Supportability

AI Builder – Form Processing Layouts

© 2021 · Joe Gill