【发布时间】:2016-04-04 19:18:18
【问题描述】:
我对这个文档有点困惑。我可能读错了,但文档说您可以根据您在来自触发器给出的文本字段中定义的内容将变量添加到 input 对象。根据这张图片,用户定义了 3 个输入变量body、receiveDate 和subject。
(来源:cachefly.net)
但是在代码中,它们引用了一个名为 plainBody 的变量,该变量尚未定义。这将如何运作?
是否有一个我可以注销的对象,它包含我的触发器中出现的每个字段?还是我必须使用输入字段将它们定义为输入?
编辑:我也无法让任何z 库工作。根据这个文档:https://zapier.com/developer/documentation/v2/built-functions-tools/#available-libraries我应该能够做类似的事情
// let's call http://httpbin.org/get?hello=world with an extra header
var request = {
method: 'GET',
url: 'http://httpbin.org/get',
params: {
hello: 'world'
},
headers: {
Accept: 'application/json'
},
auth: null,
data: null
};
// perform asynchronously
z.request(request, function(err, response){
console.log('Status: ' + response.status_code);
console.log('Headers: ' + JSON.stringify(response.headers));
console.log('Content/Body: ' + response.content);
});
但我收到一条错误消息,上面写着z is not defined theFunction
【问题讨论】:
标签: javascript zapier