我有一个 webhook 设置,可以将消息发布到我们的 Teams 团队频道之一。我正在使用此处给出的团队 Webhook 示例之一:https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#hero-card https://learn.microsoft.com/en-us/microsoftteams/platform/task-modules-and-cards/cards/cards-reference#hero-card .
我遇到的问题是无法显示多行。在下面的示例中,我想将“Test1”和“Test2”分开放在不同的行上。但是,在 JSON 中使用 \n 或 \n 不会转换为 Teams 中的多行格式。截图结果附在下面。
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.hero",
"content": {
"title": "Alerts",
"text": "*Test1 \n *Test\n",
"buttons": [
{
"type": "openUrl",
"title": "Open in SumoLogic",
"value": ""
}
]
}
}
]
}
使用 webhook 向 Teams 发送多行消息的方式是什么?如有任何指导,我们将不胜感激。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)