Reputation: 582
I have started using Zapier Platform to make my app API available to Zapier users. I started with the Platform UI, and could create one trigger and one action, via the web interface, and it works just fine: I could create a "Zap" which sends me an email via Gmail when something happens in my app. The authentication type is 'session' and I could manage to retrieve my "access_token" and pass it via bundle.authData.access_token to the triggers and actions.
I would now like to wrap other API functions and for that I would like to switch to the Zapier CLI.
I have installed zapier via NPM, could launch zapier convert <ID> <DIR> --version 1.0.0
, and this has generated a project on my hard disk. All good so far.
I was expecting zapier push
to make a new version 1.0.1 working like the 1.0.0, but I get an error message:
Error: npm ERR! missing script: _zapier-build
Also, when I try to run zapier test
, I have this output looking like a test error (despite it's a warning, it seems to generate an error in the test set):
1) should create an object (node:98545) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead.
And when the tests try to call my app server, the authentication fails because the Authorization
header, as received by the server, litterally is Bearer {{bundle.authData.access_token}}
(so, the access_token
has not been replaced with its real value by Zapier, I guess) (But when using the stuff built via the Zapier Platform UI works)
Could you please help me fix these errors? Many thanks!
NB if it may help zapier version
says:
zapier-platform-cli/10.1.0 darwin-x64 node-v10.16.3
Upvotes: 1
Views: 436