zapier-platform | The SDK for you to build an integration on Zapier
kandi X-RAY | zapier-platform Summary
kandi X-RAY | zapier-platform Summary
This is the main monorepo for all public code that powers the Zapier Platform Experience.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Sets the matrix
- Loops over a hash .
- Factory to create a factory function .
- Fetches a range from a and b
- Private function used to update the SSE root
- Expand a glob pattern into a glob pattern .
- Writes a T509 certificate to a BN .
- Read Block mapping
- Compose a block transition .
- Sort files in list
zapier-platform Key Features
zapier-platform Examples and Code Snippets
Community Discussions
Trending Discussions on zapier-platform
QUESTION
I'm trying to store state between calls similar to the documentation here: https://zapier.com/apps/code/help#code-examples
However, I try to run the code from a Zap, I get:
StoreClient is not defined
The documentation states that I shouldn't have to require anything to use StoreClient: "There is no need to require it - it comes pre-imported in your Code environment."
I'm on the latest version of zapier-platform-core (8.3.0). I'm using the exact code from the example linked above.
...ANSWER
Answered 2019-Aug-22 at 02:23David here, from the Zapier Platform team. Great question!
This is a little bit unclear based on the docs - StoreClient
is only available in the Code app (aka Code by Zapier
). If you're using zapier-platform-core
, you're creating a cli app, which is a vanilla node.js environment. If you want to interact with Storage by Zapier
from within a cli app, you can use the docs on the site: https://store.zapier.com. Namely:
QUESTION
I am getting the buffer by request
module of NPM & from that buffer i am parsing the pdf with another module pdf-parse
. While executing the zap i am getting the error as:
Unhandled error: CheckError: Invalid API Response: - Got a non-object result, expected an object from create ()
Below is my code for action
...ANSWER
Answered 2019-Aug-22 at 02:18David here, from the Zapier Platform team.
Your perform
function needs to return a JS object (something wrapped in {}
). To make the error go away, ensure your promise returns something.
The easiest way is the following:
QUESTION
I am following the docs from zapier-platform-schema to set choices in the hook
trigger inputFields
, but they are not shown in the form when creating new Zap.
I do the following:
...ANSWER
Answered 2019-Jul-23 at 12:28My problem was solved, Zapier Support helped me. The code is correct, I just was testing it in a wrong way. I was looking for the select drop-down at an early stage of Zap creating page, after I selected the Trigger. Where the drop-down appears after I connect an account to the Zap.
QUESTION
I can't find information about acceptable response content or code status from my site to zapier app on test step.
I have my site on Laravel and Zapier app for this site. In my Zapier app I have an action: "Create New Project". I made my "create" according to the example. Everything works except the testing step. I tested with the following zap:
- Trello -> "New card created" trigger. Test successful.
- My app -> "Create new project". Test fails with
We had trouble sending your test through. Could not handle special, non-standard characters. Please contact support
.
Strangely, the project was created successfully. Therefore, I think the problem lies in the response from my site to zapier:
...ANSWER
Answered 2019-Jan-11 at 19:36David here, from the Zapier Platform team.
I already answered your support ticket, but I figured I'd reply here in case anyone else has the same issue.
The root problem is made clear when you run zapier logs
on the cli:
QUESTION
I'd like to create a static combobox thanks to a custom hidden trigger.
I've seen couple examples of Zapier triggers in their repository (such as https://github.com/zapier/zapier-platform-example-app-trigger) but not static.
I'm using Zapier CLI and don't use the previous scripting build UI.
Thank you!
...ANSWER
Answered 2018-Aug-22 at 22:34David here, from the Zapier Platform team.
If your dropdown is totally static, you can use the choices
property outlined here. There's a couple of different options (depending if order matters or you need labels) but the end goal is that you'll have a choices
key with an array or object attached to it.
For example:
QUESTION
ANSWER
Answered 2018-Jul-18 at 19:50David here, from the Zapier Platform team.
That error comes from here and pops up when we can't find zapier-platform-core
in node_modules
.
It seems like it should be there given what you posted. with "zapier-platform-core": "7.0.0"
in your package.json
, run rm -rf node_modules && npm i
to make sure everything is fresh.
If that doesn't work, please open an issue at https://github.com/zapier/zapier-platform-cli/issues/new.
QUESTION
According to the docs, I should use a post_poll
function to add the missing id
field in the response.
How do I add the post_poll function ?
Here's my error:
Results must be an array, got: object, ({"totalevents":83,"events":[{"eventid":10266033,"c) - Got a result missing the "id" property (83)
Tried following this but it is not clear to me, I'm very new to Zapier-CLI
Update - adding codeThis is the function that returns the data:
...ANSWER
Answered 2018-Jul-18 at 19:31Nice, so you're almost there! CLI apps don't have pre_
and post_
poll methods. Instead, you put any manipulation after the response comes in.
QUESTION
I’m creating an app that (for now) takes a file as input and returns its hash (sha256).
It works fine as long as the user use a file as input, but if he puts something else (a string for example), the application silently fails (there is a stack trace in the app’s logs but Zapier displays nothing particular) and returns a wrong hash.
I do no have the impression that the error is handleable by my code and the stack is pretty obfuscated:
...ANSWER
Answered 2018-May-24 at 20:03David here, from the Zapier Platform team. There's no magic or tricks going on, but it looks like you're making life a little bit harder for yourself. Much of the zapier code doesn't support that event pattern (.on('x', function(){...)
). Instead, everything uses promises already. Unhandled rejection refers to a rejected promise that you're not handling with a catch
clause. We also provide a z.request
function which is going to flow a little better than using the request
package itself (though this is allowed if you want to!). Check out the doc section about making HTTP requests. We've also got a z.hash(algo, string)
method. and then update your code to be something like the following:
QUESTION
As mentioned in resource schema here, I can only mention creates. My question is how to mention an update which in turn will call PUT method on my REST API. I searched the documentation but didn't find any such thing.
...ANSWER
Answered 2018-Mar-10 at 07:22David here, from the Zapier Platform team.
We don't have anything specific to an update action, but since you're in control of what sort of request(s) you make, it's pretty easy to build one.
Separate from the resource, you can write an Update X
action (called a "create" in the docs, which I see is a little confusing) which can make whatever request you want.
We've got docs about updates here.
Let me know if you've got any other questions!
QUESTION
I get a timeout error in most but not all the times i run zapier test
whether i add --debug
or not, here's my code:
ANSWER
Answered 2018-Jan-26 at 07:51I did suffer from this error a lot. The error is due the test framework which normally doesn't wait beyond 2 seconds
. Whatever you do in the tests, timeout occurs if not handled using something like the following. In your app's package.json, please add a timeout to mocha runtime (15 seconds
) in this example. Please feel free to set a higher timeout while you are testing.
"scripts": {
"test": "node node_modules/mocha/bin/mocha --recursive --timeout 15000"
},
As other respondents said, add z.console.log(msg)
to your code a lot initially to see what is happening with your requests.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install zapier-platform
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page