如何在适用于 iOS 和 Android 的 Outlook 移动应用中启用显示从 Microsoft Flow 发送的



我们正在使用 amdesigner.azurewebsites 设计一个自定义自适应卡片,通过Microsoft流发送给我们的组织成员以进行 PO 审批。卡片的 JSON 代码由设计器生成,发起方 ID 由可操作消息开发人员仪表板生成和批准。

我们触发流以发送包含可操作邮件卡的电子邮件,它在 Outlook 桌面和 OWA(从桌面 Web 浏览器访问的 Web Outlook(Microsoft显示并完美运行。但是,当我们在移动 Web 浏览器中检查来自 Outlook iOS 和 Android 移动应用程序和 OWA 的相同电子邮件时,电子邮件显示为空(卡片根本不呈现(。

我们已经联系了Microsoft支持(Office 365,Flow和iOS应用内(,他们都说这超出了他们的范围,并且不断将我们从一个支持门户来回重定向到另一个支持门户,没有任何解决方案。

<script type="application/adaptivecard+json">
{
"type": "AdaptiveCard",
"padding": "none",
"originator": "*******************************",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Medium",
"weight": "Bolder",
"text": "PURCHASE ORDER APPROVAL",
"color": "Dark",
"wrap": true
}
],
"width": "stretch",
"style": "default",
"backgroundImage": null,
"bleed": false
},
{
"type": "Column",
"items": [
{
"type": "Image",
"horizontalAlignment": "Right",
"url": "https://.....",
"height": "70px",
"altText": "GTS Logo"
}
],
"width": "auto",
"style": "default",
"backgroundImage": "https://www.haceonline.org/wp-content/uploads/2017/08/light-gray-solid-color-background-300x150.jpg",
"bleed": false
}
],
"style": null,
"bleed": false
}
],
"backgroundImage": null,
"bleed": false
},
{
"type": "Container",
"padding": {
"top": "none",
"left": "default",
"bottom": "default",
"right": "default"
},
"items": [
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"spacing": "Large",
"separator": true,
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Medium",
"text": "Requested by **Rawad Farhat**",
"wrap": true,
"spacing": "None"
},
{
"type": "TextBlock",
"spacing": "None",
"text": "rawad.farhat@gtslb.com",
"isSubtle": true
}
],
"width": "stretch",
"style": null,
"backgroundImage": null,
"bleed": false
}
],
"style": null,
"bleed": false
},
{
"type": "TextBlock",
"spacing": "Medium",
"text": "**The following Purchase Order has been submitted for approval:**",
"wrap": true
},
{
"type": "FactSet",
"facts": [
{
"title": "Requested Date:",
"value": "06 Aug 2019"
},
{
"title": "Purchase Order:",
"value": "19000001-OP-00210"
}
]
},
{
"type": "Container",
"style": null,
"backgroundImage": null,
"items": [
{
"type": "ColumnSet",
"style": null,
"columns": [
{
"type": "Column",
"style": null,
"backgroundImage": null,
"items": [
{
"type": "TextBlock",
"text": "**Item**",
"size": "Small",
"wrap": true
}
],
"bleed": false,
"width": "100px"
},
{
"type": "Column",
"style": null,
"backgroundImage": null,
"items": [
{
"type": "TextBlock",
"text": "**Quantity - Description**",
"size": "Small",
"wrap": true
}
],
"bleed": false,
"width": "stretch"
}
],
"bleed": false
},
{
"type": "ColumnSet",
"style": null,
"columns": [
{
"type": "Column",
"style": null,
"backgroundImage": null,
"items": [
{
"type": "ColumnSet",
"style": null,
"columns": [
{
"type": "Column",
"style": null,
"backgroundImage": null,
"items": [
{
  "type": "Input.Toggle",
  "id": "itemLine01",
  "spacing": "None",
  "title": " ",
  "value": "false",
  "validation": null,
  "wrap": true
}
],
"bleed": false,
"width": "auto"
},
{
"type": "Column",
"spacing": "None",
"style": null,
"backgroundImage": null,
"items": [
{
  "type": "TextBlock",
  "spacing": "None",
  "text": "Item",
  "wrap": true
}
],
"bleed": false,
"width": "stretch"
}
],
"bleed": false
}
],
"bleed": false,
"width": "100px"
},
{
"type": "Column",
"style": null,
"backgroundImage": null,
"items": [
{
"type": "TextBlock",
"text": "Description",
"size": "Small",
"wrap": true
}
],
"bleed": false,
"width": "stretch"
}
],
"bleed": false
}
],
"bleed": false
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.ShowCard",
"title": "Approve",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "commentsApprove",
"placeholder": "Comments (Optional)",
"isMultiline": true,
"validation": null
}
],
"actions": [
{
"type": "Action.Http",
"title": "Submit",
"method": "POST",
"url": "https://....",
"body": "{"instanceID": "instanceID", "response": "Approve", "comments": "{{commentsApprove.value}}" }",
"headers": [
{
"name": "Authorization",
"value": ""
},
{
"name": "Content-Type",
"value": "application/json"
}
]
}
],
"backgroundImage": null,
"bleed": false,
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
},
{
"type": "Action.ShowCard",
"title": "Reject",
"card": {
"type": "AdaptiveCard",
"style": "emphasis",
"body": [
{
"type": "Input.Text",
"id": "commentsReject",
"placeholder": "Comments (Optional)",
"isMultiline": true,
"validation": null
}
],
"actions": [
{
"type": "Action.Http",
"title": "Submit",
"method": "POST",
"url": "https://....",
"body": "{"instanceID": "instanceID", "response": "Reject", "comments": "{{commentsReject.value}}" }",
"headers": [
{
"name": "Authorization",
"value": ""
} ,
{
"name": "Content-Type",
"value": "application/json"
}
]
}
],
"backgroundImage": null,
"bleed": false,
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
}
}
]
}
],
"style": null,
"backgroundImage": null,
"bleed": false
}
],
"style": null,
"backgroundImage": null,
"bleed": false
}
],
"version": "1.0",
"style": null,
"backgroundImage": "null",
"bleed": false,
"actions": null,
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"minHeight": "800px"
}
</script>

下面是在 MS Flow 中的"发送电子邮件"操作中使用的完整自适应卡片 JSON 文件。

最后一条信息,在使用 amdesigner 时,有一个按钮可以将卡片发送到我的电子邮件以测试查看它,当我们将该按钮用于相同的自适应卡片时,它在 Outlook Mobile 中显示正常。

请帮忙。

对于所有通过此线程并面临相同问题的人,我们找到了解决方案,那就是联系 onboardoam@microsoft.com 微软入职团队。

他们阻止所有未通过其白名单程序的自适应卡片,以确保卡片格式正确并在移动设备中正常显示。

此外,如果有人已经完成了此过程,但仍然没有在移动 Outlook 中显示其卡片,则可能是你在应用中启用了深色模式,自适应卡片尚不支持深色模式(配色方案尚未自动切换(。该团队正在努力在不久的将来使其兼容。

对于现在回到这篇文章的用户 - 自适应卡片不再需要列入白名单,应该按原样工作,无需Microsoft方的任何干预。 自适应卡片现在在暗模式下也受支持,因此这应该不再是一个阻碍因素。

最新更新