我目前正在开发一个 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 剪短,因此它不会移动完整的附件,这就是它无法打开的原因?但我不知道从这里去哪里。