【发布时间】:2020-04-20 06:04:21
【问题描述】:
我有兴趣通过 ActionCard 更新 ServiceNow 记录。 ServiceNow 中记录的更新只接受 PUT。是否有 HttpPUT 的操作类型来代替 HttpPOST? POST 被简单地拒绝了
The remote endpoint returned an error (HTTP MethodNotAllowed). Please try again later.
由于我使用的是 Microsoft Teams,因此我必须根据他们的文档使用消息卡格式:
“However, if you are sending actionable messages via an Office 365 connector, or to a Microsoft Teams connector, you must continue to use the message card format”
110 - "@type": ActionCard
111 name: Set Assignment Group
112 inputs:
113 - "@type": MultichoiceInput
114 id: list
115 title: Chose an assignment group
116 isMultiSelect: false
117 choices:
118 - display: IT Service Desk
119 value: 4546b6fg1r864z10wk42964pnh4bccpq
120 actions:
121 - "@type": HttpPOST
122 name: Save
123 target: https://servicenow_instance.service-now.com/api/now/table/incident/sys_id
124 headers:
125 - name: Authorization
126 value: Basic base64_encoded
127 body: "{'assignment_group': '{{list.value}}'}"
【问题讨论】:
-
Action Card 不支持 HttpPut 方法请看Actions in action card
-
谢谢。我对这里的这些概念比较陌生。根据提供的链接,以及我将有效负载发布到我创建的 MS 连接器(传入 Webhook)并发布到提供的 URL outlook.office.com/webhook/blah 的目标。在这种情况下,似乎只支持消息卡格式,正如文档中所引用的那样“但是,如果您通过 Office 365 连接器或 Microsoft Teams 连接器发送可操作的消息,则必须继续使用该消息卡片格式。”。我没有创建自己的机器人,这里没有可用的选项吗?
-
是的,Connectors 目前只支持消息卡,如果您仍然想发送自适应卡而不像您提到的那样设置自己的 Bot,您可以使用Microsoft Flow to send Adaptive Card
-
感谢您的链接和建议!感谢您的帮助。
标签: microsoft-teams office365connectors