如何解决输入值替换 Outlook 可操作消息未传递值
所以我在 Microsoft Flow 中使用它在 Outlook 中生成可操作的电子邮件。 该卡本身可以正常工作并在 Outlook 中正确显示。问题是 Action.Http 的输入值替换。
它实际上是传递“{{newVendorNames.value}}”、“{{newVendorDocs.value}}”和“{{existingVendorAction.value}}”,而不是我输入到自适应卡中的值。值都是字符串。
具体的行是"body": "{\"newVendorNames\":\"{{newVendorNames.value}}\",\"newVendorDocs\":\"{{newVendorDocs.value}}\",\"existingVendorAction\":\"{{existingVendorAction.value}}\"}"
我错过了什么吗?这是一个错误吗?
{
"type": "AdaptiveCard","originator":"ORIGINATOR ID","body": [
{
"type": "TextBlock","size": "medium","weight": "bolder","text": "Month End Close - Response"
},{
"type": "TextBlock","text": "In order to complete our month-end close,please go through any sections that apply for the current month.","wrap": true
}
],"actions": [
{
"type": "Action.ShowCard","title": "New Vendor","card": {
"type": "AdaptiveCard","body": [
{
"type": "TextBlock","text": "Complete this section **only if** a new vendor or vendors began work in the current month.","wrap": true,"color": "attention","size": "medium"
},{
"type": "Input.Text","id": "newVendorNames","placeholder": "Enter the names of the vendors that began work in the current month.","isMultiline": true
},{
"type": "Input.Toggle","title": "I have an invoice/SOW/Contract,etc.","id": "newVendorDocs","valueOn": "Yes","valueOff": "No"
}
]
}
},{
"type": "Action.ShowCard","title": "Existing Vendors","text": "Complete this section **only if** an existing vendor has performed services in the current month.",{
"type": "TextBlock","text": "Have all invoices,for work performed in the current month,been submitted to AP?","wrap": true
},{
"type": "Input.ChoiceSet","choices": [
{
"title": "Yes all invoices have been submitted.","value": "No"
},{
"title": "No they have not been submitted and I have a copy of the invoice(s).","value": "Obtain invoices."
},{
"title": "No they have not been submitted,I do not have a copy but I can estimate the cost.","value": "Dept owner can estimate accrual."
},I do not have a copy and I cannot estimate the cost.","value": "Dept owner cannot estimate accrual."
}
],"id": "existingVendorAction","style": "expanded"
}
]
}
},{
"type": "Action.Http","title": "Submit Response","method": "POST","headers": [
{
"name": "Authorization","value": ""
},{
"name": "Content-Type","value": "application/json"
}
],"url": "https://logic.azure.com:443/DELETED","isPrimary": true,"body": "{\"newVendorNames\":\"{{newVendorNames.value}}\",\"existingVendorAction\":\"{{existingVendorAction.value}}\"}"
}
],"$schema": "http://adaptivecards.io/schemas/adaptive-card.json","version": "1.0"
}
解决方法
试试这个 JSON:
"body": "{\n\"newVendorNames\": \"{{newVendorNames.value}}\",\n\"newVendorDocs\": \"{{newVendorDocs.value}}\",\n\"existingVendorAction\": \"{{existingVendorAction.value}}\"\n}"
您忘记了 \n
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。