Introduction to Microsoft Copilot: Returning an Agent Response to Power Automate

Hello Guys,

In our previous blog, we learnt how to call an agent using Power Automate Flow. Today we will see how we can send response back to 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.

We will be working with the same example which we used in our previous blog.



As you can see in above image, We received Trip ID from the PA Flow. 

Now we will be adding one variable of type blank which can be used to store Trip Details.



Now we will be adding one tool which nothing but the connector which connects to Dataverse and retrieve Trip Details based on Trip Id. 



Now set output variable as shown below:



Now click on details and create one output variable as shown below:



Once Output variable is added, we will set the formatted json to this variable as shown below:



JSON({

    TRIP:Topic.TripDetails.crdb7_tripid,

    Destination:Topic.TripDetails.crdb7_destination,

    Budget:Topic.TripDetails.crdb7_budget

})

Now add message step by clicking on node.



So our topic is ready. Save the changes and publish the agent.

Now in PA flow we will use configure Execute Agent and wait step as shown below:



Now click on add step and add parse json step as shown below:



So our flow is ready. Create a new Trip and check the flow.



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.