I am trying to add dynamic data into AdaptiveCard by Groovy, then deploy it into Microsoft Teams.
It is working in Adaptive Card designer.
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"$data": [{"name":"Aspentech ProMV","status":"Rejected"},{"name":"Testing","status":"Approved"}],
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "${name}",
"wrap": true,
"size": "Large",
"fontType": "Default"
}
]
}
]
},
{
"type": "ActionSet",
"actionsOrientation": "horizontal",
"actions": [
{
"type": "Action.Submit",
"title": "Quick Approve"
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.4"
}
its calling ${name}
from ${data}
, but when I def it by Groovy below:
**requests: [{"name":"Aspentech ProMV","status":"Rejected"},{"name":"Testing","status":"Approved"}]**
then add it into Card, it can get the requests data successful,
but seems it could not call ${name}
from ${data}
just in Teams.(its working in AdaptiveCard designer preview)
enter image description here
how can I make it work in Teams?