azure-logic-apps - Teams 自适应卡在 Logic App 中等待响应
问题描述
我正在尝试自适应卡片,试图通过逻辑应用程序将警告与团队集成。我要问的问题与逻辑应用程序中的连接器在从逻辑应用程序发送后等待团队中自适应卡的响应有关。
我已经设法创建了我的自适应卡,并且在该卡中我有必要的信息和底部的两个操作,我希望我的逻辑应用程序可以这么说。
我的自适应卡看起来像这样:
{
"type": "AdaptiveCard",
"version": "1.0",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"body": [
{
"type": "TextBlock",
"text": "Alert - Employee email differences found:",
"weight": "Bolder",
"size": "Medium",
"horizontalAlignment": "Left",
"spacing": "Medium",
"maxLines": 0
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "New Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person21@mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person22@mail.com"
}
]
},
{
"type": "Column",
"width": "stretch",
"items": [
{
"type": "TextBlock",
"text": "Old Email",
"weight": "Bolder"
},
{
"type": "TextBlock",
"text": "Test.Person11@mail.com"
},
{
"type": "TextBlock",
"text": "Test.Person12@mail.com"
}
]
}
],
"separator": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Update Now",
"style": "positive",
"data": true
},
{
"type": "Action.Submit",
"title": "Dismiss",
"style": "destructive",
"data": false
}
]
}
正如您所看到的,当我按下“立即更新”时,我收到一条错误消息,说“没有要连接的后端/应用程序”(瑞典语 - “无法访问应用程序,再试一次”)。
所以我再次尝试做的是让逻辑应用程序等待响应。在逻辑应用发送消息后,它“完成”。
那么这可能吗?如果是这样,我该如何让它工作?
解决方案
虽然逻辑应用可以向 MS Teams 发送卡片,但它们无法监听在这些卡片上执行的操作。
为了能够使用卡片操作,您需要制作一个自定义服务来监听这些活动并对其采取行动。
推荐阅读
- android - 某些三星设备的屏幕录制输出失真
- express - res.status 在 promise 函数中未定义
- amazon-web-services - AWS ARN 的最大长度是多少?
- java - 在注册码中加入一层密码校验码
- machine-learning - 如何将长句子分解为 5 到 10 个单词的句子并使用 LSTM 取得良好的效果?
- python - 如何按指定标准对 zip 对象列表进行排序?
- python - 使用 python ElementTree 我想找到所有标题
- angular - 使用角度路由器无法显示页面顶部
- java - 了解 HotSpot 中的通知方法
- go - 在 go 中将切片长度与 uint32 进行比较的最佳方法(用于对抗性上下文)