How to use adaptive cards in Power Virtual Agents?

2.7k Views Asked by At

I want to use adaptive card in PVA (chat bot). Tried to create a PVA flow and added an adaptive card. If I use the flow in "microsoft team" then there is no issue but if I try to use it in PVA,it doesnot work.

enter image description here

Is there a way to include adaptive cards in PVA flow where we don't have "team id" and "channel id". Flow structure is created as below:

enter image description here

1

There are 1 best solutions below

0
On

In order to send an Adaptive Card to the user in Power Virtual Agents, you will need to extend the bot using Bot Framework Composer. Inside Composer, it's possible to respond to the user with an adaptive card.

To achieve this, you will have to return the data that is the input to the adaptive card in Power Automate to Power Virtual Agents. The return value should be a string, and it will get JSON Serialized. Inside Composer, you can JSON deserialize the string using the json function. As long as the variable inside of Power Virtual Agents is a bot-scoped variable, you can pass the data:

Output from Power Automate

Global variable

Json Parse function

Here is Microsoft's documentation on Bot Framework Composer integration with Power Virtual Agents.