admin管理员组文章数量:1221774
Gave a look into quite some forums/questions already but the answers were never able to solve my issue. Adaptive cards worked perfectly well with the old webhooks but I just can't figure out what I'm doing wrong when using workflow.
I've set up a presumably working workflow which parses the json received from a webhook request and then sends the adaptive card into a teams channel. The adaptive card is correctly being displayed in the desktop version, but the mobile version only displays the title.
I've tried changing the "type" to "message" instead of "AdaptiveCard", but using the type "message" doesn't even render anything on the mobile version, it just shows that a user has sent something but without any content. Changing the "version" property also doesn't affect anything.
Desktop:
Mobile:
My adaptive card json looks like this:
{
"type": "AdaptiveCard",
"$schema": ".json",
"version": "1.4",
"msteams": {
"width": "Full"
},
"body": [{
"type": "TextBlock",
"text": "Uptime Monitor",
"wrap": true,
"fontType": "Monospace",
"size": "ExtraLarge",
"weight": "Bolder",
"color": "Attention",
"style": "heading"
}, {
"type": "Table",
"columns": [{
"width": "auto"
}, {
"width": "auto"
}, {
"width": "auto"
}],
"rows": [{
"type": "TableRow",
"cells": [{
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": "URI",
"wrap": true,
"fontType": "Monospace",
"color": "Default"
}],
"style": "warning"
}, {
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": "Down since",
"wrap": true,
"fontType": "Monospace",
"color": "default"
}],
"style": "warning"
}, {
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": "Downtime (mins)",
"wrap": true,
"fontType": "Monospace",
"color": "default"
}],
"style": "warning"
}],
"style": "warning"
}, {
"type": "TableRow",
"cells": [{
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": ";,
"wrap": true,
"horizontalAlignment": "Left",
"spacing": "None",
"fontType": "Monospace",
"size": "Medium",
"color": "Attention",
"isSubtle": false
}],
"style": "attention"
}, {
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": "24.01.2025 10:39:19",
"wrap": true,
"fontType": "Monospace",
"color": "Attention"
}],
"style": "attention"
}, {
"type": "TableCell",
"items": [{
"type": "TextBlock",
"text": "5",
"wrap": true,
"fontType": "Monospace",
"color": "Attention"
}],
"style": "attention"
}]
}]
}]
}
In case needed, this is the schema I generated using "Use sample payload to generate schema" within power automate:
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"$schema": {
"type": "string"
},
"version": {
"type": "string"
},
"msteams": {
"type": "object",
"properties": {
"width": {
"type": "string"
}
}
},
"body": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"text": {
"type": "string"
},
"wrap": {
"type": "boolean"
},
"fontType": {
"type": "string"
},
"size": {
"type": "string"
},
"weight": {
"type": "string"
},
"color": {
"type": "string"
},
"style": {
"type": "string"
},
"columns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"width": {
"type": "string"
}
},
"required": [
"width"
]
}
},
"rows": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cells": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"text": {
"type": "string"
},
"wrap": {
"type": "boolean"
},
"fontType": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"type",
"text",
"wrap",
"fontType",
"color"
]
}
},
"style": {
"type": "string"
}
},
"required": [
"type",
"items",
"style"
]
}
},
"style": {
"type": "string"
}
},
"required": [
"type",
"cells"
]
}
}
},
"required": [
"type"
]
}
}
}
}
本文标签: botframeworkMobile version of MSTeams doesn39t fully render adaptive cardStack Overflow
版权声明:本文标题:botframework - Mobile version of MS-Teams doesn't fully render adaptive card - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1739323597a2158145.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论