Introduction to Microsoft Copilot: Calling a Copilot Studio Agent Using Power Automate

Hello Guys,

In our previous blog, we learnt how to add knowledge in Agent. Today we will see how to call an agent using Power Automate Flow.



Do follow us to know more about Dynamics and Power Platform. Also if you like our blog then please comment and share this blog with your friends.

There are multiple ways to invoke a Copilot Studio agent. For example, we can call an agent using a Power Automate flow, or we can configure a trigger directly within the agent. In this article, we will explore how to invoke a Copilot Studio agent using a Power Automate (PA) flow.

First, we need to create a topic that will be triggered when the agent is called. As shown below, we already have several topics available.



Now, click on Add a topic and select Blank. Configure the topic as shown below.



Next, click on Details and select Input.



Click on Create a new variable and configure the input variable as shown below.



Once the configuration is complete, Add a message as shown below and save the topic and publish the agent.



Next, create a Power Automate flow that triggers when a new Trip record is created, as shown below.



Now, add another step to prepare the message that will be sent to the agent along with the Trip ID. The Trip ID will be mapped to the input variable that we created earlier in the topic.



Next, add a new step and search for Execute Agent. Save the Power Automate flow and create a new Trip record.



As you can see, our agent is successfully triggered when the Trip record is created. Now, open the trigger history to review the execution.



You can see that the agent was successfully invoked and called our configured topic.

Hope it helps...


Comments

Popular posts from this blog

Creating Custom API in D365.

JavaScript in Power Platform – Frequently Asked Interview Questions.

Using Concurrency Control & Degree of Parallelism in Power Automate Flow.