我有兴趣通过 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}}'}"