Plugin Action speaks louder then words

Shows the first empty overview when you want to create an action in Copilot Studio

We’ve been building our Copilot Studio topics manually in my example of the HR Copilot. But in this world of generative AI there is a another (better?) way. You can utilize plugin actions to create wrappers around connectors, Cloud Flows and skills. The AI will recognize the intent of the user and will pick the right action to fulfill that intent. If there are input parameters that needs to be filled in, the AI will query the user about this. In this blog we go through the steps in making our first action where a user can submit a leave request.

This post is part of a series of blogpost about Copilot Studio in which I create a HR Copilot and show various options available within Copilot Studio. Here are my other posts about this topic:

Creating the plugin action

Let’s start off by walking through what steps to do when creating a plugin action. The first step is to select what action you want to add. In our case it’s our already created Power Automate Flow to submit leave request.

Shows the starting wizard to Create an Action where we can select which Flow, skill or connector we want to use to wrap our action around.
Create Action

This flow’s connections are already defined so step 2, the connection details, is skipped. But if you, for example, want to connect to an excel file to delete a row, this is where you define which file.

Shows the action details step in the wizard where it highlights that we need to enter a good model display name and description for the AI to know what this action can do.
Edit Action Details

Now the most important steps are in the review and finish step. As in here you define the name of your modal and the description. Both are important as the AI will use the information you enter here to determine when to use this action. In fact, I find it best to first define a few test scenario’s when the action should be triggered. Then if you know these scenario’s you can create the perfect description.

Highlights that we need to add a good description to the inputs of our action
Warning on input description

After this third step, you will be prompted that the input parameters don’t have a description. Maybe you already have a good description it’s also a good practice to review the inputs anyway. Why you ask? Find out below!

Defining the input

Shows the input window of the attributes the action needs. Highlighting that a good description is important and that we need to change the identify as option
Edit Required Input

When you open the action details you will be prompted to provide a description for your inputs. This will help the AI fill the input correctly. What also helps, is selecting the correct entity of the answer you are looking for. In our example we are working with dates. Changing the “Identify as” to a date will make it immediately clear to the AI that we are looking for the startdate. Combine this with a description of “The startdate of the leave request” and the input is good to go!

Shows the options to change the email from a Dynamically fill to a set as a value.
Change email to Set as a value

Another input we would like to change is the email adres of the current user. As we are building an internal HR Copilot that we deploy to MS Teams we know the emailadres and it would be annoying for the user to fill this in. Luckily we can still use the “Set as a value” option, which will allow us to select the User.Email system variable.

Shows that we can set the value to automatically fill in the User Email in our action's input.
Set as a value – User Email

Dynamic chaining

Loosely coupled with plugin Actions is the Dynamic Chaining ability of Copilot Studio. This feature is also referred as Generative Actions. Enabling this feature will replace the classic topic matching mechanism based on trigger phrases. Generative AI will do the topic matching for you based on the descriptions of the topics and actions. Tip: If you enable this, be sure to add good descriptions to your existing topics!

Shows that when you create an action with a trigger of dynamic chaining you need to enable it first.
Enable Dynamic Chaining Notification

When creating our plugin action we’ve enabled the Dynamic chaining trigger. This means that Copilot can choose our action as a starting point to answer the user’s query. After creation of our plugin action we will get notified that we need to enable dynamic chaining in the Generative AI settings.

Shows the option to enable dynamic chaining in the settings of Copilot Studio
Enable Dynamic Chaining

Results come from plugin action

There you have it, the steps to create a plugin action. Wrapping our Cloud Flow in a plugin action and letting Copilot Studio and Generative AI do all the work for us. Let’s see it in action:

The result conversation of our created action.
Results of our action

Amazing isn’t it? Generative AI will do quite a bit of heavy lifting for us. No longer do we need to create the entire conversation flow of our Copilots. There are some things to consider though as we can see the following differences with our manually build topic:

  • There are no option sets presented to the user for leave types.
  • They are thus also not dynamically filled from the HR system.
  • The conversation is plain. The AI will not present the user with an image to wish them a happy holiday.

Obviously these might not be important to most conversation flows, but it’s something to consider.

Leave a Reply

Your email address will not be published. Required fields are marked *