Azure 逻辑应用程序 - 在新电子邮件上 - 附件有空字节

Azure Logic App - On New Email - Attachments have null bytes

为什么附件没有被正确读取?


尝试使用快速启动模板将电子邮件中的附件保存到 SharePoint 文件夹。

工作流程:

在新邮件上 > 输出 > 附件

在新邮件上显示成功,但附件内容设置为空("ContentBytes": null):

[
  {
    "Id": "AAMkADlhMDBiODNiLWFmOTEtNGZjOS1hMjYxLTY1OTU3MDk4YzZjNABGAAAAAACijX5OkcblRIVMFzOsYgiSBwBFaJ_hCA08Tb5SmdY6ZqCxAAAAADB8AABFaJ_hCA08Tb5SmdY6ZqCxAACD6w2UAAABEgAQAOCw7xb1bG9LstW5SRafEOE=",
    "ContentType": "image/jpeg",
    "Size": 16962,
    "@odata.type": "#Microsoft.OutlookServices.FileAttachment",
    "Name": "image001.jpg",
    "ContentBytes": null
  },
  {
    "Id": "AAMkADlhMDBiODNiLWFmOTEtNGZjOS1hMjYxLTY1OTU3MDk4YzZjNABGAAAAAACijX5OkcblRIVMFzOsYgiSBwBFaJ_hCA08Tb5SmdY6ZqCxAAAAADB8AABFaJ_hCA08Tb5SmdY6ZqCxAACD6w2UAAABEgAQAG7KUOVpzCRJslBYmXAysB4=",
    "ContentType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
    "Size": 194702,
    "@odata.type": "#Microsoft.OutlookServices.FileAttachment",
    "Name": "Test.docx",
    "ContentBytes": null
  },
  {
    "Id": "AAMkADlhMDBiODNiLWFmOTEtNGZjOS1hMjYxLTY1OTU3MDk4YzZjNABGAAAAAACijX5OkcblRIVMFzOsYgiSBwBFaJ_hCA08Tb5SmdY6ZqCxAAAAADB8AABFaJ_hCA08Tb5SmdY6ZqCxAACD6w2UAAABEgAQAL3JExHdzLJDs0YH1XpZXgU=",
    "ContentType": "image/jpeg",
    "Size": 73353,
    "@odata.type": "#Microsoft.OutlookServices.FileAttachment",
    "Name": "image005.jpg",
    "ContentBytes": null
  },
  {
    "Id": "AAMkADlhMDBiODNiLWFmOTEtNGZjOS1hMjYxLTY1OTU3MDk4YzZjNABGAAAAAACijX5OkcblRIVMFzOsYgiSBwBFaJ_hCA08Tb5SmdY6ZqCxAAAAADB8AABFaJ_hCA08Tb5SmdY6ZqCxAACD6w2UAAABEgAQABUsTq9cXiVCoowGEFnbtHw=",
    "ContentType": "image/jpeg",
    "Size": 3684,
    "@odata.type": "#Microsoft.OutlookServices.FileAttachment",
    "Name": "image003.jpg",
    "ContentBytes": null
  }
]

对于每个容器 > 创建文件

因以下原因失败:

InvalidTemplate. Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '11': 'The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64ToBinary for usage details.'.

触发器上有一个 "include attachments " 选项可以选择包含字节。确保它已打开并且它应该可以工作。