Hey,
I am working on a topic to return a user's tickets. I have a JSON dataset returned from a Power Automate flow back to my Power Virtual Agents topic. I would like the tickets to display in an adaptive card. However, I am having trouble getting the card to populate with the data from the returnTickets array.
Here is my JSON I am trying to display:
{
"capitalName": "John",
"returnString": "Success",
"returnCode": true,
"returnTickets": [
{
"id": 114762,
"summary": "Example Ticket 1",
"company": "Apple",
"resources": "Michael, John"
},
{
"id": 117572,
"summary": "Example Ticket 2",
"company": "Amazon",
"resources": "John"
},
{
"id": 121946,
"summary": "Example Ticket 3",
"company": "Microsoft",
"resources": "Peter, Charles, Steven, John"
},
{
"id": 122116,
"summary": "Example Ticket 4",
"company": "Facebook",
"resources": "Steven, John"
},
{
"id": 99336,
"summary": "Example Ticket 5",
"company": "Tesla",
"resources": "Michael, John"
},
{
"id": 119254,
"summary": "Example Ticket 6",
"company": "Gamestop",
"resources": "Michael, John"
}
]
}
Here is the adaptive card I have so far (the variables don't populate properly, ie they just display as "${capitalName}" in the card):
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "Capital Name: ${capitalName}",
"weight": "bolder",
"size": "large"
},
{
"type": "TextBlock",
"text": "Return String: ${returnString}",
"separator": true
},
{
"type": "TextBlock",
"text": "Return Code: ${returnCode}",
"separator": true
},
{
"type": "TextBlock",
"text": "Tickets",
"weight": "bolder",
"size": "medium",
"separator": true
},
{
"type": "Container",
"items": [
{
"$data": "${returnTickets}",
"type": "TextBlock",
"text": "- ID: ${id}, Summary: ${summary}, Company: ${company}, Resources: ${resources}",
"wrap": true
}
]
}
]
}
If I switch to the formula editor, I can get the basic variables to display if I do something like Topic.capitalName, but I still can't get the array of tickets and ticket information to work properly. Can someone point me in the right direction? Thank you in advance!