使用Microsoft Flow Json的可行消息-仅适用于我的电子邮件(发给其他人的空邮件)

时间:2019-05-16 12:39:10

标签: json sharepoint office365 flow

我使用Json代码构建Microsoft流,该代码可自定义一条可操作的消息给邮件接收者。该流从SharePoint列表中获取数据,然后通过邮件发送批准请求。邮件收件人可以通过单击邮件中的按钮来批准或拒绝。
当我在流中设置电子邮件时,该流工作正常,但是当我设置其他Outlook邮件用户时,他们收到的消息为空。

the Flow with json code

<script type="application/ld+json">
    {
"@type": "MessageCard",
"@context": "https://schema.org/extensions",
"summary": "This is the summary property",
"themeColor": "0075FF",
"sections": [
{
},
{
"startGroup": true,
"title": "**Pending approval - Waiver No. **** ver' ****",
"activityTitle": "Requested by **** department: ****",
"activitySubtitle": "",
"facts": [
    {
        "name": "Date submitted:",
        "value": ""
    },

 {
        "name": "Details:",
        "value": ""
    },
    {
        "name": "Link:",
        "value": "[Click here to view the item]()"
    }
]
},
{
"potentialAction": [
    {
        "@type": "ActionCard",
        "name": "Approve",
        "inputs": [
            {
                "@type": "TextInput",
                "id": "comment",
                "isMultiline": true,
                "title": "Reason (optional)"
            }
        ],
        "actions": [
            {
                "@type": "HttpPOST",
                "name": "Submit",
    "body":"{\"itemID\":\"@{body('Get_item')?['ID']}\",\"comment\":\"{{comment.value}}\",\"Approve\":\"Yes\"}",
                 "target": "https://...",
                            "headers": [
                             {
                            "name": "Authorization",
                            "value": ""
                             }
                       ]
            }
        ]
    },
    {
        "@type": "ActionCard",
        "name": "Reject",
        "inputs": [
            {
                "@type": "TextInput",
                "id": "comment",
                "isMultiline": true,
                "title": "Reason (optional)"
            }
        ],
        "actions": [
            {
                "@type": "HttpPOST",
                "name": "Submit",
      "body":"{\"itemID\":\"@{body('Get_item')?['ID']}\",\"comment\":\" {{comment.value}}\",\"Approve\":\"No\"}",
                            "target": "https://...",
                            "headers": [
                             {
                            "name": "Authorization",
                            "value": ""
                             }
                       ]
            }
        ]
    }
]
}
]
}
</script>

1 个答案:

答案 0 :(得分:0)

您必须注册并批准可操作的消息,请检查此链接: https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-email

读取矩形: enter image description here