This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 66
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,7 @@ If you'd like to manage your **Version**, use these commands: | |
* `zapier migrate [1.0.0] [1.0.1] [100%]` - move users between versions, regardless of deployment status | ||
* `zapier deprecate [1.0.0] [YYYY-MM-DD]` - mark a version as deprecated, but let users continue to use it (we'll email them) | ||
* `zapier env 1.0.0 [KEY] [value]` - set an environment variable to some value | ||
* `zapier delete version [1.0.0]` - delete a version entirely. This is mostly for clearing out old test apps you used personally. It will fail if there are any users. You probably want `deprecate` instead. | ||
|
||
> Note: To see the changes that were just pushed reflected in the browser, you have to manually refresh the browser each time you push. | ||
|
||
|
@@ -469,7 +470,7 @@ In some cases, it might be necessary to provide fields that are dynamically gene | |
[insert-file:./snippets/custom-fields.js] | ||
``` | ||
|
||
Additionally, if there is a field that affects the generation of dynamic fields, you can set the `altersDynamicFields: true` property. This informs the Zapier UI that whenever the value of that field changes, fields need to be recomputed. An example could be a static dropdown of "dessert type" that will change whether the function that generates dynamic fields includes a field "with sprinkles." | ||
Additionally, if there is a field that affects the generation of dynamic fields, you can set the `altersDynamicFields: true` property. This informs the Zapier UI that whenever the value of that field changes, fields need to be recomputed. An example could be a static dropdown of "dessert type" that will change whether the function that generates dynamic fields includes a field "with sprinkles." If your field affects others, this is an important property to set. | ||
|
||
```js | ||
[insert-file:./snippets/alters-dynamic-fields.js] | ||
|
@@ -493,8 +494,6 @@ In the UI, users will see something like this: | |
|
||
![screenshot of dynamic dropdown in Zap Editor](https://cdn.zapier.com/storage/photos/dd31fa761e0cf9d0abc9b50438f95210.png) | ||
|
||
> Dynamic dropdowns are one of the few fields that automatically invalidate Zapier's field cache, so it is not necessary to set `altersDynamicFields` to true for these fields. | ||
|
||
### Search-Powered Fields | ||
|
||
For fields that take id of another object to create a relationship between the two (EG: a project id for a ticket), you can specify the `search` property on the field to indicate that Zapier needs to prompt the user to setup a Search step to populate the value for this field. Similar to dynamic dropdowns, the value for this property is a dot-separated concatenation of a search's key and the field to use for the value. | ||
|
@@ -687,7 +686,7 @@ module.exports = { | |
|
||
|
||
### `bundle.cleanedRequest` | ||
> `bundle.cleanedRequest` is only available in the `perform` for web hooks and `getAccessToken` for oauth authentication methods | ||
> `bundle.cleanedRequest` is only available in the `perform` for webhooks and `getAccessToken` for oauth authentication methods | ||
|
||
`bundle.cleanedRequest` will return a formatted and parsed version of the request. Some or all of the following will be available: | ||
|
||
|
@@ -707,6 +706,21 @@ module.exports = { | |
} | ||
``` | ||
|
||
### `bundle.targetUrl` | ||
|
||
> `bundle.targetUrl` is only available in the `performSubscribe` and `performUnsubscribe` methods for webhooks | ||
|
||
This the url to which you should send hook data. It'll look something like `https://hooks.zapier.com/1234/abcd`. We provide it so you can make some sort of POST request to your server and store this as a destination for new info. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fine with both Also, I'd suggest editing this:
to:
|
||
|
||
Read more in the [REST hook example](https://github.com/zapier/zapier-platform-example-app-rest-hooks/blob/master/triggers/recipe.js). | ||
|
||
### `bundle.subscribeData` | ||
|
||
> `bundle.subscribeData` is only available in the `performUnsubscribe` method for webhooks | ||
|
||
This is an object that contains the data you returned from the `performSubscribe` function. It should contain whatever information you need send a `DELETE` request to your server to stop sending webhooks to Zapier. | ||
|
||
Read more in the [REST hook example](https://github.com/zapier/zapier-platform-example-app-rest-hooks/blob/master/triggers/recipe.js). | ||
|
||
## Environment | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,9 @@ A shortcut for \`zapier build && zapier upload\` - this is our recommended way t | |
|
||
> Note: this is always a safe operation as live/production apps are protected from pushes. You must use \`zapier promote\` or \`zapier migrate\` to impact live users. | ||
|
||
If you have not yet registered your app, this command will prompt you for your app title and register the app. | ||
> Note: this will overwrite the version specified in your \`package.json\`. If you want to push to a new version, increment the "version" key. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be more specific by saying
|
||
|
||
If you have not yet registered your app, this command will prompt you for your app title and to register the app. | ||
|
||
${'```'}bash | ||
$ zapier push | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a period at the end of the sentence? The same goes other similar places in this doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked them all! They all end in punctuation now.