Adaptive cards aren’t rendering on Teams sent from Webhook
I’m trying to make an AdaptiveCard that will show some information about an outage. This JSON looks great on adaptivecards.io/designer, but everything inside the ‘body’ isn’t rendered in Teams.
Here is an image of what appears when I try to call the webhook.
And here’s what it looks like on adaptivecards.io
{
“text”: “Datto Alert Raise on [device_hostname] [device_description] | [site_name]”,
“fallbackText”: “Datto Alert Resolve on [device_hostname] [device_description] | [site_name]”,
“$schema”: “http://adaptivecards.io/schemas/adaptive-card.json”,
“type”: “AdaptiveCard”,
“version”: “1.5”,
“body”: [
{
“type”: “TextBlock”,
“size”: “default”,
“weight”: “default”,
“color”: “default”,
“text”: “Datto”
},
{
“type”: “TextBlock”,
“text”: “New Datto RMM alert”,
“wrap”: true
},
{
“type”: “TextBlock”,
“text”: “New alert on [device_hostname] [device_description] | [site_name]”,
“wrap”: true,
“size”: “Medium”,
“weight”: “Bolder”
},
{
“type”: “TextBlock”,
“text”: “IP address: [device_ip] | Last user: [lastuser]”,
“wrap”: true,
“color”: “Dark”
},
{
“type”: “FactSet”,
“facts”: [
{
“title”: “Category:”,
“value”: “[alert_category]”
},
{
“title”: “Description:”,
“value”: “[alert_message]”
}
]
}
],
“actions”: [
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Device”,
“url”: “https://[platform]rmm.centrastage.net/device/[device_id]/[device_hostname]”
},
{
“type”: “Action.OpenUrl”,
“title”: “Old UI View Device”,
“url”: “https://zinfandel.centrastage.net/csm/device/summary/[device_id]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Alert”,
“url”: “https://[platform]rmm.centrastage.net/alert/[alert_uid]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI Web Remote”,
“url”: “https://[platform].centrastage.net/csm/remote/rto/[device_id]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Site”,
“url”: “https://[platform]rmm.centrastage.net/site/[site_id]”
}
]
}
I’m trying to make an AdaptiveCard that will show some information about an outage. This JSON looks great on adaptivecards.io/designer, but everything inside the ‘body’ isn’t rendered in Teams. Here is an image of what appears when I try to call the webhook. And here’s what it looks like on adaptivecards.io {
“text”: “Datto Alert Raise on [device_hostname] [device_description] | [site_name]”,
“fallbackText”: “Datto Alert Resolve on [device_hostname] [device_description] | [site_name]”,
“$schema”: “http://adaptivecards.io/schemas/adaptive-card.json”,
“type”: “AdaptiveCard”,
“version”: “1.5”,
“body”: [
{
“type”: “TextBlock”,
“size”: “default”,
“weight”: “default”,
“color”: “default”,
“text”: “Datto”
},
{
“type”: “TextBlock”,
“text”: “New Datto RMM alert”,
“wrap”: true
},
{
“type”: “TextBlock”,
“text”: “New alert on [device_hostname] [device_description] | [site_name]”,
“wrap”: true,
“size”: “Medium”,
“weight”: “Bolder”
},
{
“type”: “TextBlock”,
“text”: “IP address: [device_ip] | Last user: [lastuser]”,
“wrap”: true,
“color”: “Dark”
},
{
“type”: “FactSet”,
“facts”: [
{
“title”: “Category:”,
“value”: “[alert_category]”
},
{
“title”: “Description:”,
“value”: “[alert_message]”
}
]
}
],
“actions”: [
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Device”,
“url”: “https://[platform]rmm.centrastage.net/device/[device_id]/[device_hostname]”
},
{
“type”: “Action.OpenUrl”,
“title”: “Old UI View Device”,
“url”: “https://zinfandel.centrastage.net/csm/device/summary/[device_id]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Alert”,
“url”: “https://[platform]rmm.centrastage.net/alert/[alert_uid]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI Web Remote”,
“url”: “https://[platform].centrastage.net/csm/remote/rto/[device_id]”
},
{
“type”: “Action.OpenUrl”,
“title”: “New UI View Site”,
“url”: “https://[platform]rmm.centrastage.net/site/[site_id]”
}
]
} Read More