如何使用 Power Automate 和 Smartsheet API 将 Outlook 电子邮件附件移动到 smartsheet

问题描述 投票:0回答:2

我目前正在开发一个 Power Automate 流程,该流程应该从共享收件箱中获取电子邮件并将其及其附件移至智能表。

Power Automate 没有用于将附件移动到 smartsheet 的模板,因此我打算使用 smartsheet 的 API 来移动附件。

但是,使用 Smartsheet REST API 和 Power Automate 中提供的 contentBytes,它无法正确移动附件,并且我无法在 smartsheet 中查看该文件。

下面是我在 Power Automate 中使用的代码:

        "method": "POST",
        "uri": "https://api.smartsheet.com/2.0/sheets/[sheetId]/rows/[rowId]/attachments",
        "headers":
        {
            "Content-Type": "['contentType']",
            "Content-Length": "['size']",
            "Content-Disposition": "attachment; filename=\"['name']\""
        },
        "body": "['contentBytes']",

这是“适用于每个”方法,因此它适用于每个附件。

我唯一的猜测是它在某处将 contentBytes 剪短,因此它不会移动完整的附件,这就是它无法打开的原因?但我不知道从这里去哪里。

enter image description here

outlook power-automate smartsheet-api smartsheet-api-2.0
2个回答
0
投票

Power Automate 在传输文件元时出现一些问题。 尝试将文件本身添加到变量中,并将文件的内容转换为 Base64 内容,如下所示。

enter image description here


0
投票

这个问题你解决了吗? 我非常想在我们实验室的解决方案上尝试这个。 我是电力自动化领域的新手,如果您能给我提供任何示例,那就太好了! 我构建了一个解决方案,可以从电子邮件中提取信息并将其添加到一行中...我很遗憾地看到 PA 无法获取内置附件...

© www.soinside.com 2019 - 2024. All rights reserved.