Zapier新用户界面问题

时间:2019-04-16 14:45:02

标签: zapier

在新的Zapier用户界面中,我过去经常这样做。

return z.request(options).then(response => {
  response.throwForStatus();
  const results = z.JSON.parse(response.content);
  let attachmentArray = [];
  attachmentArray = results.data.map(function(result) {
    let attachment = {};
    attachment.id = result.attachment_id;
    let file_url = options.url + `/${attachment.id}`;
    attachment.url = file_url;
    attachment.file = z.dehydrateFile(file_url, {
      method: "GET",
      headers: { Authorization: `Bearer ${bundle.authData.access_token}` }
    });
    return attachment;
  });
  return attachmentArray;
});

这是我提供触发器的代码。目前,它会抛出

Error: You must pass in a function/array/object. We got string instead.

1 个答案:

答案 0 :(得分:0)

Zapier Platform团队的David在这里。该错误来自this line,该错误负责在根App对象上查找方法。实际上,我们已经进行了一次测试,涵盖了确切的案例here

上面提供的示例中似乎没有令人讨厌的代码,但请看一下您正在调用dehydrate('some str')appTester('some string')的任何地方