[在我的Zapier应用程序中,我正在调用应用程序服务器上托管的其余挂钩API,以传递bundle.targetUrl
Webhook URL,可以在该URL中报告数据并触发该应用程序。
我想发送更多信息,作为该剩余挂钩API调用的一部分。诸如哪个动作应用程序用作此Zap的一部分,在动作应用程序中已映射所有字段的内容,其中哪些是必填项之类的事情,等等]
我想要这个,以便我可以更精确地配置我的应用程序,以决定何时准确报告数据并触发Zap。
我认为这个问题的答案在bundle
变量中。但是我无法找到此变量的确切结构,它保存的所有数据以及是否保存有关上述Zap的其他数据。
供参考,这是我的应用程序中SubscribeHook函数的当前代码:
const subscribeHook = (z, bundle) => {
const data = {
url: bundle.targetUrl,
event: ['new_conversation'],
};
// You can build requests and our client will helpfully inject all the variables
// you need to complete. You can also register middleware to control this.
const options = {
url: `${_sharedBaseUrl}/api/v1/convbot/${bundle.inputData.chatbot}/resthook`,
method: 'POST',
json: data,
};
return z.request(options)
.then((response) => JSON.parse(response.content));
};
David,来自Zapier Platform团队。好问题。
出于用户隐私的原因,我们不会共享有关哪些应用程序连接到您的应用程序的数据。因此,您在订阅期间将无法传递该应用程序的其他任何信息。
[以供将来参考,有关bundle
对象in the docs的信息。