Parse Adaptive Card Data With Power Automate

Angeliki PatsiavouDynamics 36511 hours ago10 Views

Your future hasn’t been written yet. Or in this case, the data from your brand-new Adaptive Card you built as per this blog, is sitting there. All that rich data is yearning to go back to the CRM future. Even better, it is yearning to be added into your agent.

Ok enough, movie cheesiness. As promised, there is going to be an Adaptive Cards series. This is officially part 2. Where you can explore how to parse data from the Adaptive Cards’ actions back into your CRM app, whether it’s Dynamics 365 or a Model-Driven App etc.

This isn’t heavy – A summary of the build so far

It is always good to recap; in the first part of this blog series you saw:

  1. What Adaptive Cards can offer to your agent, your users AND your CRM systems

  2. The best Microsoft resources to get you started

  3. And….drum roll…a step-by-step visual guide to build your first card with details on how to use the Designer, how to shift between a JSON code view and a low-code view to map its elements’ properties, and an example piece to experiment with.

Next up – Back to the agent to add the Adaptive Card

So you have the code for our freshly-designed card. Now go into out agent’s topic to add it.

As a reminder, this card is meant to upsell a service during a hotel room booking. Thus, it works really well just before the user is ready to confirm their reservation.

To add it into your topic, click the + icon to Add node.

Then, select Ask with adaptive card.

The Adaptive Card appears as a template. Select Properties.

After that, select Edit adaptive card.

Now you have reached a blank designer. Add the code you had as per the first blog post. Then, select Save.

The card, as you designed it, will now appear in the topic.

Remember those action buttons you added, they have also been mapped in the Output sections at the bottom of the Adaptive Card node.

Your future – and your data – is whatever you make it

Now you have your action buttons, you need to map that data so each time a user makes a choice it maps back into our CRM app.

Remember, this choice is about whether users want to add into their reservation a welcome basket. In the CRM app, which in this case is a Model-Driven App, the agent automatically sets up reservations.

For each reservation record, there is a Dataverse column called Welcome Basket Requested. If in the agent the user clicks on the clicks on the Yes, add it button of the Adaptive Card, then this will map to a Yes value in the booking. Alternatively, if in the agent the user clicks on the clicks on the Not now button of the Adaptive Card, then this will map to a No value in the booking.

Let’s get mapping – with Power Automate

As part of the general build of the hotel booking agent, there is a Power Automate flow which triggers once the user has finished customizing their booking.

All their choices are mapped as topic variables and as inputs into the flow.

This includes the Adaptive Card’s welcome basket choice.

But how does it work to get there?

Firstly, you build the Power Automate flow in the maker portal.

The initial step is to use the agent’s Skills, where the topic variables containing the users’ booking choices are the inputs.

Many things are selected as a mix of date fields and text fields.

In specific, it is worth highlighting the Adaptive Card choice, which as a topic variable it is called VarwelcomeBasketChoice.

This, alongside the other user choices from the earlier nodes of the agent topic, are part of the Skills step mapping.

This flow will map these choices into the booking. It will happen by adding a new flow step called Add a new reservation record, which is an Add a new row action type. Please note that whilst some of these user choices you can map directly, there are some which need data transformation.

Either way, for the purpose of the welcome basket Adaptive Card choice, you will map that topic input into the corresponding Dataverse column.

The final part for the flow is to add a step with an action to Respond to Copilot. Essentially, you will grab the ID from the unique reservation record which is being created. This is so the user can get their reservation ID (Dataverse column name is Room Reservation Number) as confirmation.

Once you have saved and published the flow, go back to Copilot Studio and your agent.

To invoke the flow you just configured in the maker portal, add a new action node through Add node again. This time, you will go for Add a tool and then select the pre-configured Power Automate flown from earlier called Create a new reservation.

This will create the new action, and you need to map the Power Automate inputs to the custom topic variables built earlier in the agent to capture the user’s booking choices.

You will see these inputs are empty to start with. To populate them, click on the 3-dot ellipsis so that the Select a variable pop-up appears.

In the Custom tab, you will find the variables to map to.

Once you have finished with the mapping, the action node will look like the below.

You are now ready to Save and Publish the agent and see the magic happen!

Check Angeliki Patsiavou’s original post https://www.empoweredhumans.net/post/parse-adaptive-card-data-with-power-automate on www.empoweredhumans.net which was published 2025-06-09 00:50:00

Leave a reply

Follow
Sign In/Sign Up Sidebar Search
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...