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