diff --git a/docs/_build/action.md b/docs/_build/action.md deleted file mode 100644 index e9f07c20..00000000 --- a/docs/_build/action.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -title: Action -order: 11 -layout: post-toc -redirect_from: - - /quickstart/build-action - - /docs/actions - ---- - -# Action - -![Zapier Action Visual Builder](https://cdn.zappy.app/57f28534d180f2a642ebe0be2e236c32.png) - -All Zaps start with a trigger that watches for new or updated data. They get the ball rolling. Everything a Zap does with that data, though, is done by actions. - -Zapier actions push or put new data into apps through API calls that pass data from user customized [input fields](https://platform.zapier.com/build/input-designer). - -Action steps in Zaps can create new items in an app or update existing items with a *create* action, or find existing items in an app with *search* actions. Search actions can optionally be paired with create actions to add a new item if the search does not return a result. - -Actions should also return output fields detailing what was created (or found), so that data can be used in subsequent steps to build detailed workflows. - -Zapier strongly recommends against action steps that delete or remove data. To prevent data loss, action steps should only add or update data. If you are considering adding a delete action to your app, consider alternative actions for items such as deactivating, unsubscribing, or canceling, instead of deleting items completely. - -# How to Add a New Action to a Zapier Integration - -## 1. Configure Action Settings - -![Zapier visual builder action settings](https://cdn.zappy.app/c845778e65b58839d1fac151d805bb55.png) - -To add a new action step to a Zapier integration, open the _Actions_ page in Zapier visual builder from the sidebar on the left, and select _Add Action_. Start by selecting your action type. New actions are _Create_ type by default, and will add new data to your app. If your action should lookup existing items instead, select _Search_—then jump to the [Search](#search) section below for details on setting up a search action. - -Check our [search and create action guide](hhttps://platform.zapier.com/build/search-create-action) for more detail on the difference between create and search actions. - -> **Note**: You cannot change an action type once you click _Save and Continue_ on a new action. If you need to change the action type, delete the action and recreate it. - -Then add the core details to your action, including: - -- **Key**: A unique identifier for this action, used to reference the action inside Zapier. Does not need to be the same identifier as used in your API. Not shown to users. -- **Name**: A human friendly plain text name for this action, typically with a verb such as _Add_ or _Create_ followed by the name of the item this action will create in your app. Shown inside the Zap editor and on Zapier's app directory marketing pages. -- **Noun**: A single noun that describes what this action creates, used by Zapier to auto-generate text in Zaps about your action. -- **Description**: A plain text sentence that describes what your action does to help users understand why they should use this action. Shown inside the Zap editor and on Zapier's app directory marketing pages. -- **Visibility Options**: An option to select when this action will be shown. _Shown_ is chosen by default. Choose _Hidden_ if this action should not be shown to users. This is helpful if you build a create action solely to pair with a search action but do not want it used on its own. - -Once the action settings are added, click _Save and Continue_ to add the new action and save your settings. You can edit the settings any time later with the exception of the create or search option. - -## 2. Build Action Input Form - -![Zapier input designer](https://cdn.zappy.app/366cb5a08cef7e31cfc49758cf935478.png) - -Then, the _Input Designer_ will open to build the input form field for your action. All action steps _must_ include an input form for Zapier to gather the data needed to create or find items in your app. Add at least one input field to your action before switching to the final _API Configuration_ tab. - -Before building your action's input form, list each piece of data your app needs to create a new item. For example, if building an action to send an email, fields for the email address, subject, and email body would be needed. Your action will likely have several required fields, along with others that are optional, such as for tags or other details. - -Add action fields for each piece of data your app needs to create or find this item in your app. Add the fields in the order they're listed in your app, if possible, to make the Zapier integration easier for your users to use. - -> **Tip**: Check our detailed [Zapier input designer](https://platform.zapier.com/build/input-designer) guide for details on each option in the input designer, along with each field type you can add to your action's form. - -## 3. Enter API Configuration - -![Zapier action API configuration](https://cdn.zappy.app/1b33f697838f7a4e160d4aa8ef3c6d93.png) - -The last part of building a Zapier action is the most crucial: tell Zapier how to send the data to your API. - -Zapier uses a `POST` call for create actions by default, sending a single item to your API endpoint. Zapier then expects a response with an object containing a single item, to be evaluated by [isPlainObject](https://lodash.com/docs#isPlainObject) and parsed into individual fields for use in subsequent Zap steps. - -Zapier uses a `GET` call for search actions by default, and sends the data from the input form to your API endpoint. Zapier expects an array response with 0 or more items. If more than 1 item is returned, Zapier shows only the first match, and parses it into individual fields for use in subsequent Zap steps. - -For most actions, select the correct API call if your app expects something other than the default, then paste the URL for your API call in the box under _API Endpoint_. Zapier will include each of your input form fields in the _Request Body_ automatically. - -If your API call expects input data in the core URL, you can reference any input field's key with the following text, replacing `key` with your field key: - -{% raw %}`{{bundle.inputData.key}}`{% endraw %} - -The defaults on all other settings work for most basic API calls. If you need to configure more options, though, click _Show options_ to add URL Params, HTTP Headers, set your action to omit empty parameters, or customize the request body. Alternately, switch to [code mode](#code) to write custom JavaScript code for your action. - -![Test Zapier API Call](https://cdn.zappy.app/800d5dc90285243ce473c0ca6d2087e0.png) - -Once your API call is added, test it inside the Zapier visual builder with testing data. Authenticate with your app if you haven't already, then fill in each input field under the _Configure Test Data_ section with data that will work in your app. Click _Test Your Result_ to have Zapier run the action as it would inside a Zap—and see the results instantly. - -If your app returns an error, be sure to check: - -- Authentication: Did your app's authentication work correctly in the authentication step? You can only test an integration once you've connected an app account to Zapier. -- Test Data: Did your test data include the details your app expects, such as actual dates in date fields or complete email addresses in email address fields? -- Input Field Keys: Did you use the same field keys in your input field as your API expects? Double-check that in the Input Designer, and change if needed. -- API Call Customization: Does your API expect something different than the standard API call details Zapier sets by default? You may need to use custom coding if the options you need aren't available. - -### Define Sample Data and Output Fields - -![Zapier Define Output Fields](https://cdn.zappy.app/6c7d6b82dc27d49959d7390682405922.png) - -Every time your action step runs, your API will return data to Zapier—ideally detailing the item that was added to your app or found via a search. Each item includes multiple details, including any attribute users would add via the Zap input form, along with other attributes or details that users may not care about as much. - -Zapier lets you define the most important fields with friendly field names. Each field you define will show up first in the output field list after the Zap runs, and will be usable in subsequent Zap steps. - -First, fill in sample data by clicking the _Use Response from Test Data_ button to import the fields your app sent to Zapier in the previous test, or add your own JSON-formatted fields. This data will also be used as a fallback in the Zap Editor if users skip the test step for the action, so that these fields can still be mapped into other steps. Make sure the data you include with those fields is non-private, non-identifiable testing data that can be shared publicly. - -Then click _Generate Output Field Definitions_ and Zapier will list a table of the fields with the keys on the left and the field type on the right. Add a human-friendly name for each field in the center column, especially if users might expect a different name than the API provides, as in the GitHub example above where `body` becomes "Issue Details". Then select the field type. Lastly, click _Save Output & Finish_ to complete your action. - - -## How to Use Custom Code in Zapier Actions - -![Zapier visual builder code mode](https://cdn.zappy.app/c8887685a87f49f8bcc1dca815214334.png) - -The default API settings form is the best option for most actions. If your action needs customized API calls, scripting to manipulate input field data, or other unique features, you can add custom JavaScript code for your API request. - -To use custom code, click the _Switch to Code Mode_ button. Zapier will translate your default API call settings into JavaScript code the first time you switch to code mode for an easy way to start. If you switch back to form mode, though, Zapier will not transfer your code settings back to the form. - - -## How to Add a Search Action - -![Zapier Search action settings](https://cdn.zappy.app/3e47ad8a26c30fb761fdd60390d8705e.png) - -Building a search action is much the same as building a create action, only with a couple extra steps. Select *Search* as your action type, then fill in the core action settings as normal. - -At the bottom of the settings page, you'll see an option to pair your search with a create action. That lets your action also create an item if the search does not return any results. - -If you wish to do so, first add a relevant create action to your Zap. If your action is looking for contacts, say, you would need a *Add New Contact* action to pair with the search, say. You can open your integration's _Actions_ page in a new tab and add a new create action if your integration does not have an appropriate one already. - -Then, in your new search action's settings, check the _Pair an existing create action_ box, and select the relevant action from the _Create Action_ menu. Additionally, add a new label that Zapier will show on this step if users choose to have the action create new items as well. - -The remainder of your action setup is much like building a Zapier trigger. You will need to add an [Input Form](https://platform.zapier.com/build/input-designer) to gather data for the search. Most search actions only include a single input field, sometimes along with a drop-down menu to select filter data. - -Finally, in the API configuration, add your API endpoint where Zapier will by default pass the search query in a `GET` call, then test the request and define output fields as with other actions. - -![Example Search action in Zapier](https://cdn.zappy.app/32ba8f867d02cf60cb6c344a0447b5a5.png) - -When users use the search action in a Zap, Zapier will show your core search action settings that you set in the input designer by default. Then, if users check to create an item if nothing is found, Zapier will load the create action's input fields inside the search action so users can fill both out. - -## Viewing Actions in a Zapier Integration - -![Actions inside Zapier](https://cdn.zappy.app/5d3c2e8f9f6cf0f6daadd3ee97fa5e80.png) - -Whenever a user selects your app's integration in a Zapier action step, they'll see every create and search action in your integration. Zapier shows Create actions first, followed by Search actions. Within the Create and Search sections, actions are listed in alphabetical order. - -You can change actions' visibility at any time, if you don't want an action to be shown. Open the action in the Zapier visual builder, to the _Settings_ tab, and scroll to the bottom of the page to the _Visibility Options_ section. Select _Hidden_ if you want to keep users from being able to use this action (often used if an action is deprecated but should keep working in users' existing Zaps). - -## How to Remove an Existing Action - -![Remove Zapier action](https://cdn.zappy.app/809321da0cd78edef6f464eb1f803855.png) - -You can remove an action from Zapier visual builder's _Actions_ page. Click _Actions_ in the left sidebar, then click the gear beside any action you wish to remove. Select _Delete_, then confirm to remove the action fully. - -If you remove an action from a live Zapier integration, this will break existing Zaps. As such, before removing an action, always [create a new major version](https://platform.zapier.com/manage/versions-ui) of your integration, remove the action from the new version, then follow best practices for migrating users when introducing breaking changes to an integration. diff --git a/docs/_build/actions/action.md b/docs/_build/actions/action.md new file mode 100644 index 00000000..98334417 --- /dev/null +++ b/docs/_build/actions/action.md @@ -0,0 +1,37 @@ +--- +title: Action +order: 1 +layout: post-toc +redirect_from: + - /quickstart/build-action + - /docs/actions + +--- + +# Action + +Every Zap starts with a single trigger that watches for new or updated data, starting the user's workflow. Action steps then make use of that data. + +Zapier actions create or update new data into apps through API calls that pass data from user customized [input fields](https://platform.zapier.com/build/add-fields). + +![Zapier Action Visual Builder](https://cdn.zappy.app/57f28534d180f2a642ebe0be2e236c32.png) + +Zaps can have one or more actions. + +There are two types of actions to select. + +## 1. Create actions + +Most Zapier integrations should at a minimum include create actions to let users add items to their app automatically. Common actions by app category [here](https://platform.zapier.com/quickstart/integration-design-examples) should be used for inspiration when building your app. + +_Create_ actions in Zaps can create new items in an app or update existing items. The output returned should be an object containing individual fields that will be parsed for mapping into subsequent Zap steps. + +## 2. Search actions + +_Search_ actions find existing items in an app and can optionally be paired with _create_ actions to add a new item if the search does not return a result. + +Search actions let users do more with the data they’ve already added to your app; such as avoiding adding duplicate items or look up info about an item, for example weather, conversion, and contact lookup, to use in a subsequent step. + +The output returned by a _search_ should be a JSON-formatted array sorted with the best match first. Only the first item will be returned. For no match found, a `200` with an empty array must be returned. + +Zapier strongly recommends against action steps that delete or remove data. To prevent data loss, action steps should only add or update data. If you are considering adding a delete action to your app, consider alternative actions for items such as deactivating, unsubscribing, or canceling, instead of deleting items completely. \ No newline at end of file diff --git a/docs/_build/actions/create.md b/docs/_build/actions/create.md new file mode 100644 index 00000000..14194a4e --- /dev/null +++ b/docs/_build/actions/create.md @@ -0,0 +1,62 @@ +--- +title: Add a create action +order: 3 +layout: post-toc +redirect_from: +--- + +# Add a create action + +## 1. Add the action settings + +* Open the _Actions_ tab in Zapier's Platform UI from the sidebar on the left, and select **Add Action**, selecting your action type. New actions are _create_ type by default, and they add new data or update existing data to your app. + +![Zapier visual builder action settings](https://cdn.zappy.app/c845778e65b58839d1fac151d805bb55.png) + +> **Note**: You cannot change an action type once you click _Save and Continue_ on a new action. If you need to change the action type, delete the action and recreate it. + +* On the Settings page, specify the following: + +-- **Key**: A unique identifier for this action, used to reference the action inside Zapier. Does not need to be the same identifier as used in your API. Not shown to users. + +-- **Name**: A human friendly plain text name for this action, typically with a verb such as _Add_ or _Create_ followed by the name of the item this action will create in your app. Shown inside the Zap editor and on Zapier's app directory marketing pages. + +-- **Noun**: A single noun that describes what this action creates, used by Zapier to auto-generate text in Zaps about your action. + +-- **Description**: A plain text sentence that describes what the action does and when it should be used. Shown inside the Zap editor and on Zapier's app directory marketing pages. + +-- **Visibility Options**: An option to select when this action will be shown. _Shown_ is chosen by default. Choose `Hidden` if this action should not be shown to users. `Hidden` is usually selected if you build a _create_ action solely to [pair with a search action](https://platform.zapier.com/build/search-create-action) but do not want it used on its own. + +* Click on the _Save and Continue_ button. + +## 2. Complete the Input Designer + +On the _Input Designer_ page, add user [input fields](https://platform.zapier.com/build/add-fields) for this action. All action steps _must_ include an input form for Zapier to gather the data needed to create or find items in your app. Add at least one input field to your action. + +Before building your action's input form, list each piece of data your app needs to create a new item. For example, if building an action to send an email, fields for the email address, subject, and email body would be needed. Your action will likely have several required fields, along with others that are optional, such as for tags or other details. + +Add action fields for each piece of data your app needs to create or find this item in your app. Add the fields in the order they're listed in your app, with _required_ fields first, for the best user experience. + +## 3. Set up the API Configuration + +The final page of building your action tells Zapier how to send the data to your API. + +A `POST` call populates for _create_ actions by default, sending a single item to the provided API endpoint. Zapier then expects a response with an object containing a single item, to be evaluated by [isPlainObject](https://lodash.com/docs#isPlainObject) and parsed into individual fields for use in subsequent Zap steps. + +Select the correct API call if your app expects something other than the default, then paste the URL for your API call in the box under _API Endpoint_. Zapier will include each of your input form fields in the _Request Body_ automatically. + +If your API call expects input data in the core URL, reference any input field's key with the following text, replacing `key` with your field key: + +{% raw %}`{{bundle.inputData.key}}`{% endraw %} + +The defaults on all other settings work for most basic API calls. If you need to configure more options, click _Show Options_ to add URL Params, HTTP Headers, set your action to omit empty parameters, or customize the request body. Alternately, switch to [Code Mode](https://platform.zapier.com/build/code-mode) to write custom JavaScript code for your action. + +![Zapier action API configuration](https://cdn.zappy.app/1b33f697838f7a4e160d4aa8ef3c6d93.png) + +## 4. Test your API request + +Configure test data to [test the _create_ action](https://platform.zapier.com/build/test-triggers-actions). Note that testing a POST or PUT request will create or update the item in your app. + +## 5. Define your output + +Define sample data and output fields following [the guide](https://platform.zapier.com/build/sample-data). diff --git a/docs/_build/actions/reorder-action.md b/docs/_build/actions/reorder-action.md new file mode 100644 index 00000000..18a81d22 --- /dev/null +++ b/docs/_build/actions/reorder-action.md @@ -0,0 +1,39 @@ +--- +title: Reorder or remove action +order: 4 +layout: post-toc +redirect_from: +--- + +# Reorder or remove action + +## Reordering actions + +Whenever a user selects your app's integration in a Zapier action step, they'll see every _create_ and _search_ action in your integration. Zapier shows _create_ actions first, followed by _search_ actions. Within the Create and Search sections, actions are listed in alphabetical order and this order cannot be changed. + +![Actions inside Zapier](https://cdn.zappy.app/5d3c2e8f9f6cf0f6daadd3ee97fa5e80.png) + +If you don't want an action to be shown, you can change the action's visibility at any time. + +To change an actions's visibility: +1. Log into the [Platform UI](https://zapier.com/app/developer). +2. Select your **integration**. +3. In the _Build_ section on the left sidebar, click **Actions**. +4. Click on the action whose visibility you wish to change. +5. Scroll to the bottom of the page to the **Visibility in Editor** and select `Hidden` if you want to keep users from being able to select the action +6. Users with that action selected in their existing Zaps would continue to be able to use it, but if they edit the Zap and select a different action, they will not be able to select the `Hidden` action again. + +## Removing actions + +You may want to remove an action your app no longer supports. Deleted actions cannot be restored. + +If you remove an action from a live Zapier integration, this will break existing Zaps. As such, before removing an action, always [create a new major version](https://platform.zapier.com/manage/versions) of your integration, hide the action in the new version, to allow users to [manually switch to a new action](https://platform.zapier.com/manage/change-keys) without breaking their Zaps. Monitor integration usage by action from the Dashboard to only remove actions with no usage. + +To remove an action: +1. Log into the [Platform UI](https://zapier.com/app/developer). +2. Select your **integration**. +3. In the _Build_ section on the left sidebar, click **Actions**. +4. Click on the ellipses for the action you wish to remove, and click **Delete**. +5. On the confirmation prompt, click **Delete** + +![Remove Zapier action](https://cdn.zappy.app/809321da0cd78edef6f464eb1f803855.png) \ No newline at end of file diff --git a/docs/_build/actions/search-or-create.md b/docs/_build/actions/search-or-create.md new file mode 100644 index 00000000..b752a5ff --- /dev/null +++ b/docs/_build/actions/search-or-create.md @@ -0,0 +1,30 @@ +--- +title: Add a search or create action +order: 5 +layout: post-toc +redirect_from: + - /docs/search-create + - /build/search-create-action +--- + +# Add a search or create action + +When adding a _search_ action type, you'll see the option to _Pair an existing search and a create to enable "Find or Create" functionality_ in the _Settings_ page. This embeds the _create_ inside the _search_ step to find or create items in one step of the Zap. + +## Add a _create_ action + +* Add a relevant _create_ action to your integration. If your _search_ action is looking for contacts, say, you would need a *Add New Contact* action to pair with it. Open your integration's _Actions_ page in a new tab and add a new _create_ action if your integration does not have an appropriate one already. + +## Configure the _search_ action + +* Back in your new _search_ action's settings, check the _Pair an existing search and a create_ box + +* Select the relevant action from the _Create Action_ menu and add a new label that Zapier will show on this step if users choose to have the action create new items as well. + +![](https://cdn.zappy.app/41334f793dfce14d21e6c35361179721.png) + +* When users use the search action in a Zap, Zapier will show your core _search_ action settings that you set in the _Input Designer_ by default. Then, if users click the checkbox to create an item if nothing is found, Zapier will load the _create_ action's input fields inside the search action so users can fill both out. + +![Example Search action in Zapier](https://cdn.zappy.app/32ba8f867d02cf60cb6c344a0447b5a5.png) + +* Configure the rest of your search action as normal, including the [Test API Request](https://platform.zapier.com/build/test-triggers-actions) and [Output](https://platform.zapier.com/build/sample-data) sections. \ No newline at end of file diff --git a/docs/_build/actions/search.md b/docs/_build/actions/search.md new file mode 100644 index 00000000..489811d2 --- /dev/null +++ b/docs/_build/actions/search.md @@ -0,0 +1,62 @@ +--- +title: Add a search action +order: 3 +layout: post-toc +redirect_from: +--- + +# Add a search action + +## 1. Add the action settings + +* Open the _Actions_ tab in Zapier's Platform UI from the sidebar on the left, and select **Add Action**, selecting your action type. New actions are _create_ type by default, and add new data or update existing data to your app. + +![Zapier Search action settings](https://cdn.zappy.app/3e47ad8a26c30fb761fdd60390d8705e.png) + +> **Note**: You cannot change an action type once you click _Save and Continue_ on a new action. If you need to change the action type, delete the action and recreate it. + +* On the Settings page, specify the following: + +-- **Key**: A unique identifier for this action, used to reference the action inside Zapier. Does not need to be the same identifier as used in your API. Not shown to users. + +-- **Name**: A human friendly plain text name for this action, typically with a verb such as _Find_ or _Search_ followed by the name of the item this action will find in your app. Shown inside the Zap editor and on Zapier's app directory marketing pages. + +-- **Noun**: A single noun that describes what this action searches, used by Zapier to auto-generate text in Zaps about your action. + +-- **Description**: A plain text sentence that describes what the action does and when it should be used. Shown inside the Zap editor and on Zapier's app directory marketing pages. + +-- **Visibility Options**: An option to select when this action will be shown. _Shown_ is chosen by default. + +* At the bottom of the settings page, you'll see an option to pair your _search_ with a _create_ action. That lets your [action also create an item](https://platform.zapier.com/build/search-or-create) if the search does not return any results. + +* Click on the _Save and Continue_ button. + +## 2. Complete the Input Designer + +On the _Input Designer_ page, add user [input fields](https://platform.zapier.com/build/add-fields) for this action. All action steps _must_ include an input form for Zapier to gather the data needed to create or find items in your app. Add at least one input field to your action. + +Before building your action's input form, list each piece of data your app needs to find an item. Most search actions only include a single input field, sometimes along with a drop-down menu to select filter data. + +## 3. Set up the API Configuration + +In the final _API Configuration_ page, add the API endpoint where Zapier will send the search request to. + +A `GET` call is used for search actions by default, and sends the data from the input form to your API endpoint. + +Zapier expects an array response with 0 or more items. If more than 1 item is returned in the array, Zapier shows only the first match, and parses it into individual fields for use in subsequent Zap steps. + +If you prefer your search to return multiple results, return the set of results as an array of objects ([line items](https://help.zapier.com/hc/en-us/articles/8496277737997)) under a descriptive key. However, using the standard approach is recommended, because not all integrations support line items directly, so users may need to take additional actions to reformat this data for use in their Zaps, depending which app they pair your _search_ with. + +If you'd still like to offer your users a _search_ that returns multiple matches, it is recommended to consider offering both a single item _search_ and multiple item _search_ - for example a `Find Record` that returns a single result and a `Find Record(s)` that could return multiple results. + +For no match found, a `200` with an empty array must be returned to ensure the _search_ step behaves as expected in the Zap editor. A _search_ that returns no results is still considered a successful action step and [should not return an error](https://platform.zapier.com/build/response-types). + +If you need to parse the response from the endpoint into the expected response type, switch to [Code Mode](https://platform.zapier.com/build/code-mode) to write custom JavaScript code for your action. + +## 4. Test your API request + +Configure test data to [test the _search_ action](https://platform.zapier.com/build/test-triggers-actions). Testing a GET request would be expected to return the item from the endpoint. + +## 5. Define your output + +Define sample data and output fields following [the guide](https://platform.zapier.com/build/sample-data). diff --git a/docs/_build/app-checks-reference.md b/docs/_build/app-checks-reference.md deleted file mode 100644 index 44df6667..00000000 --- a/docs/_build/app-checks-reference.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -order: 1000 -exclude: true ---- - - diff --git a/docs/_build/faq.md b/docs/_build/faq.md deleted file mode 100644 index 7161b13b..00000000 --- a/docs/_build/faq.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -title: Frequently asked questions -order: 21 -layout: post-toc -redirect_from: /docs/faq ---- - -# Frequently asked questions - - - -## Does Zapier auto-save integrations? - -_No_. Always remember to save your work when building integrations. Zapier asks you to save and continue in several spots while building integrations, so be sure to save at each point: - -![Save auth and API calls](https://cdn.zappy.app/197afa28db0a58da34f339553ea4631f.png) - -When adding authentication and API calls for triggers or actions, there are _Save & Continue_ buttons between each step. Click each one when you are finished adding details to your API call form or code mode editor. - -![Save triggers and actions](https://cdn.zappy.app/57809cc1b678825d0f2e96909270d3d8.png) - -When adding a new trigger or action, there is a _Save_ button after the Zap step details. Click that to save your new trigger or action step, before adding the input form and API configuration. - -![Save input fields](https://cdn.zappy.app/84ae560095048083c876d3a2274743f4.png) - -When adding a new field to an authentication, trigger, or action step's input field, click _Save_ after adding the field details. - - - -## Why are options grayed out for my CLI-built integration? - -![Zapier CLI integration in visual builder](https://cdn.zappy.app/1bf0fc78333fa9a48d6ed3b234f3e717.png) - -The Zapier Command Line Interface (CLI) is a separate SDK available to install on your local development machine to create Zapier integrations. It lets you work in code rather than a web based UI for more advanced integrations. - -Integrations created in the CLI cannot be edited in the visual builder UI. You can’t add triggers or actions, edit code or configurations, for instance. Zapier's platform site lists every integration you build, in the visual builder or CLI, but disables the core editing options for CLI-built integrations. These options will be grayed out in the UI. - -You _can_ manage the other details of your CLI integration from the UI, however, including: - -- Invite testers and collaborators -- Monitor integration usage -- Change environment variables -- Submit your integration to be made publicly available -- Promote a new integration version to public -- Migrate users between versions - -You can [export a CLI version of your builder project to a CLI format](https://platform.zapier.com/manage/export-integration) that you can edit and maintain on your local development machine. You can then create and push new versions of your integration via Zapier CLI, and can manage the details from the visual builder UI or the CLI. Once you enable CLI, though, you will not be able to edit or add authentication, trigger, or action details in the visual builder UI. - -If your app was originally built on our legacy platform, any custom code you wrote there will be accessible in a ‘scripting.js’ file in your exported CLI app. - - - -## Can I add files/attachments to a Trigger/Action using the Platform UI Visual Builder? - -No. If you'd like to work with file attachments in your app, you'll need to convert your app from the [Visual Builder to the CLI platform](https://platform.zapier.com/manage/export-integration) instead. - - - -## I got an "An array is expected" error. How do I fix that? - -With you add a polling trigger or search action to a Zap, the Zapier platform expects to get a bare array of the new or found items, sorted in reverse chronological order. APIs will instead return a result _object_ that contains the array of items the trigger needs. - -{% raw %} -For example, for a "Find Issue" search action with GitHub's API, we might start with a `https://api.github.com/repos/{{bundle.inputData.owner}}/ {{bundle.inputData.repo}}/issues/{{bundle.inputData.issue_number}}` request: -{% endraw %} - -![](https://cdn.zappy.app/a5516cc30abee4f84a58ac5b7b3dfc76.png) - -Test it, though, and Zapier will show an error message like the one below: - -![](https://cdn.zappy.app/2461b0e7f49ecf5aed90d429a59ad2bf.png) - -Dig into the API response in the HTTP tab, and you'll see that what was returned was an _object_ that contains the array of items we need, not the array itself: - -![](https://cdn.zappy.app/d569e3a05f643a9a199b5d85dc4a4fc2.png) - -What we need to return to Zapier is that array of channels. To do that we need to switch to "[Code Mode](https://platform.zapier.com/build/code-mode)" in our request. That lets us provide a JavaScript function to handle our request, where we can make needed changes to the structure or content of the result before we return data to the Zapier platform. - -For this request, wrap the response with an array instead of the default `return results`, to have Zapier return an array of issues. - -![](https://cdn.zappy.app/3bec13fa502f47ff1e5f9bfded052b4d.png) - -> Remember: "Code Mode" is a toggle; if you switch back to Form Mode your code will be ignored! [Learn more](#code). - -Now, retest the request and it should run successfully. - -![](https://cdn.zappy.app/af56c7fed5183aed462d2e7efbf78f8c.png) - - diff --git a/docs/_build/operating-constraints.md b/docs/_build/operating-constraints.md deleted file mode 100644 index b0881c99..00000000 --- a/docs/_build/operating-constraints.md +++ /dev/null @@ -1,283 +0,0 @@ ---- -title: Zapier operating constraints -order: 17 -layout: post-toc -redirect_from: /docs/constraints - ---- - -# Zapier operating constraints - -Zapier offers a relatively unique run-time environment for your integration and its requests to your API. The environment is stateless and restricts both execution time and payload size to offer normalized reliability and running time. There are three distinct contexts of this run-time that your integration will need to run within. - -- Zap step setup using the Zap editor -- Zap startup -- Zap step execution when a Zap runs - -This document exposes various operating constraints of these run-time modes, errors users and your integration could run into, and best practices. This information is targeted towards users of our CLI development environment, but many of the strategies can be used in [Code Mode](https://platform.zapier.com/build/code-mode) in our Platform UI. - -Many errors can be viewed in your integration's log monitoring in the [Platform UI](https://platform.zapier.com/build/testing#monitoring), or if using the [CLI](https://platform.zapier.com/reference/cli-docs#handling-throttled-requests), using `zapier logs`. - -# Zap step setup using the Zap editor - -There are three areas where a user will interact with your integration in the Zap Editor: - -- Testing -- Configuration with custom fields -- Zap Startup - -## Testing - -When users add steps to their Zaps using your integration, they have the opportunity to test the step to help them verify their configuration, which uses sample response data from your integration. Trigger test steps can provide multiple sample records a user can choose from. - -## Timeouts (triggers) - -**Constraint:** When a user clicks **Test Trigger** in the Zap editor, the output of your `perform` (polling) or `performList` (REST Hook) must be returned within 30 seconds. - -**Error messages a user could see if constraint is hit:** - -- _“The app did not respond in-time. It may or may not have completed successfully.”_ -- _"Problem creating Sample: Our computers ran into a problem"_ -- _“We couldn't find any more x. Create a new x in your account and try again.”_ - -**Best practice:** The Zap editor will only process three new records at a time for sample data, so one way of speeding up the response is by limiting your results to three records. To determine when the request is for sample data, use the bundle meta parameter `bundle.meta.isLoadingSample`. When that is set to `true`, the user is testing in the Zap editor, and your integration can respond with a limited payload. More on `bundle.meta` properties [here](https://platform.zapier.com/reference/cli-docs#bundlemeta). - -## Payload size (triggers) - -**Constraint:** When a user clicks **Test Trigger** in the Zap editor, the response payload must be less than 6MB. - -**Error messages a user could see if constraint is hit:** - -- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) - -**Best practice:** The Zap editor will only process three new records at a time for sample data, so one way of making sure your payload size is less than the limit is by limiting your results to three records. To determine when the request is for sample data, use the bundle meta parameter `bundle.meta.isLoadingSample`. When that is set to `true`, the user is testing in the Zap editor, and your integration can respond with a limited payload. More on `bundle.meta` properties [here](https://platform.zapier.com/reference/cli-docs#bundlemeta). - -## Timeouts (actions/searches) - -**Constraint:** When a user clicks **Test and Review** or **Retest and Review** in the Zap editor, the output of your `perform` must be returned within 30 seconds. - -**Error messages a user could see if constraint is hit:** - -- _“The app did not respond in-time. It may or may not have completed successfully.”_ - -**Best practice:** -Timeouts can occur on your API endpoint, or within the `perform` method processing the response payload. To speed up the `perform`, check for expensive processing operations, and consider reducing `z.console.log` calls, especially in looping code. - -## Payload size (actions/searches) - -**Constraint:** When a user clicks **Test and Review** or **Retest and Review** in the Zap editor, the response payload must be less than 6MB. - -**Error messages a user could see if constraint is hit:** - -- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) - -**Best practice:** If your API endpoint supports request filtering, one option is to provide input fields in the action/search so a user can decide what record field data they want to return. If that is not available, you might look at having multiple endpoints for this record data. Your integration could then provide multiple action/searches for the user so they can get a full record. - -## Step configuration with custom fields - -**Constraint:** If your trigger, action, or search supports retrieving custom fields from your API, you are imited to 1000 custom fields. - -**Error messages a user could see if constraint is hit:** - -- Slow rendering of the step when it is added or edited in the Zap editor -- Custom fields might not display -- Not all output fields will be available for mapping in later steps - -**Constraint:** If your trigger, action, or search supports retrieving custom fields from your API, the output of your method must be returned within 30 seconds. - -**Error messages a user could see if constraint is hit:** - -_“The app did not respond in-time. It may or may not have completed successfully.”_ - -**Constraint:** If your trigger, action, or search supports retrieving custom fields from your API, the response payload must be less than 6MB. - -_“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) - -**Best practice:** Here is an example of the way one integration works around all three of these issues. [Hubspot](https://zapier.com/apps/hubspot/integrations) offers a CRM product, and users often have thousands of custom fields for Company records. In their **_Create Company_** action, instead of presenting an overwhelming number of custom fields, they present a set of default fields that all companies have, then allow the user to select the other fields they might need from an **_Additional Properties to Retrieve_** dropdown menu field. The fields chosen are then retrieved by the Zap editor for user editing. This helps in both making sure the request can be accomplished within the time and size limits, and making sure the user can easily find the custom fields important to their specific workflow. - -![](https://cdn.zappy.app/4ac409c47f194303c54adff79fcd693f.png) - -# Zap startup - -## Timeouts and payload size (polling triggers) - -**Constraint:** When a user clicks the “On” button of a Zap, Zapier does some additional initialization that must be accomplished in 30 seconds. First, it tests the user’s authentication to your service. Then it uses the trigger's `perform` method to build a deduplication table of records, so that the Zap will not run for existing records. More on that process is [here](./dedupe). The payload returned from this request must also be less than 6 MB. - -**Errors a user will see if constraint is hit:** - -- Users will receive an email with an error message that includes the text _"could not be switched on"_. - -**Best practice:** There is also a `bundle.meta` property that you can take advantage of here, `bundle.meta.isPopulatingDedupe`. When this is set to `true`, the Zap is being enabled, and you can use that to create a distinct request. The deduplication process only uses the id property of each record, so one option to consider for this request is filtering the fields you return to reduce record size. -For those requests that might otherwise exceed timeout or size limits, you can make sure your filtered request is successful. Alternatively, If your filtered request has a lot of headroom in both time and size, you could instead use this to load more records into the Zap’s deduplication table than you usually request in your `perform`. This is especially relevant for an API that might return an inadvertent older record in a later polling request. - -**Example:** The [Salesforce](https://zapier.com/apps/salesforce/integrations) integration has an **_Updated Field on Record_** trigger that can trigger on older records that a user might not consider relevant for their running Zap. To help mitigate this, the integration uses a filtered request to download up to 104,000 records to the deduplication table during Zap startup. - -# Zap step execution - -Once a Zap is enabled, while the time and size constraints remain the same, the needs of the requests are a bit different, so we'll touch on best practices during Zap execution below. - -## Timeouts (triggers) - -**Constraint:** Each time a Zap executes, the trigger's `perform` (polling) method must finish processing in 30 seconds. Polling triggers run on an interval based on a user's Zapier plan (usually between 1 and 15 minutes). REST Hook triggers run on an inbound POST to their subscription URL. - -**Errors a user will see if constraint is hit:** - -- User will receive an email with an error message, usually with _"Trigger Partner Failure"_ in the message text. An example of the email sent when the trigger errors due to a timeout: - -![](https://cdn.zappy.app/17cc8fb9313f8b0920a7ccd6dd95e9b0.png) - -**Best practices:** - -- For polling triggers, if your API endpoint supports request filtering around number of records or datetime, using these to reduce the number of records returned -- For both types of triggers, optimize the `perform` scripting for manipulating the payload -- Use [console logging](https://platform.zapier.com/reference/cli-docs#console-logging) efficiently. It can help you determine where the issue might lie, but too much console logging can cause timeouts due to logging overhead. -- If you have multiple requests per record that are causing timeouts, use the Zapier platform dehydration functions, as explained [here](https://platform.zapier.com/reference/cli-docs#dehydration). Instead of making the request immediately, a dehydration pointer is created, and the request will be made if the Zap needs a hydrated property in a later step. - -## Payload size (polling triggers) - -**Constraint:** Each time a Zap executes, the trigger's response payload must be less than 6MB. - -**Errors a user will see if constraint is hit:** - -- User will receive an email with an error message, usually with _"Trigger Partner Failure"_ in the message text. - -**Best practices:** - -- If your API endpoint supports request filtering around number of records or datetime, using these to reduce the number of records returned -- If filtering isn't an option, consider using the simplest available endpoint on your API for the basic record data, and use Zapier platform [dehydration](https://platform.zapier.com/reference/cli-docs#dehydration) to request supplementary data. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. - -## Payload size (REST Hook triggers) - -**Constraint:** A POST to to a trigger's REST Hook subscription URL must be less than 10 MB. - -**Error messages a user could see if constraint is hit:** - -- User will receive an email with an error message, usually with _"Trigger Partner Failure"_ in the message text. - -**Best practices:** - -- If your REST Hook subscription endpoint supports filtering, one option is to provide input fields in the trigger so a user can decide what record data they want to return. -- Consider sending a notification REST Hook that includes minimal record data. You can then use additional API endpoints and Zapier platform [dehydration](https://platform.zapier.com/reference/cli-docs#dehydration) to request the supplementary record data. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. - -## Timeouts (actions) - -**Constraint:** A Zapier action API request cannot consistently be finished within 30 seconds - for example, file format conversion. - -**Errors a user will see if constraint is hit:** - -- An error in the Zap history of their Zap due to the request timing out - -**Best practice:** Use the webhook-based callback service the Zapier platform provides. This allows your action to be performed asynchronously, and when finished, POST to the callback URL. More on using this method [here](https://platform.zapier.com/reference/cli-docs#zgeneratecallbackurl). - -**What a user will see if callback service implemented:** - -- Zap will have Waiting/Delayed status in Zap history until the POST is received. - -## Payload size (actions/searches) - -**Constraint:** An action/search response payload must be less than 6 MB. - -**Error messages a user could see if constraint is hit:** - -- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) - -**Best practice:** Consider using the simplest available endpoint on your API for the basic record data, and use Zapier platform [dehydration](https://platform.zapier.com/reference/cli-docs#dehydration) to request supplementary data. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. - -## Reducing requests to your API - -**Constraint:** Each time a Zap runs and your integration is invoked can mean multiple requests to your API endpoints, depending on what your trigger/action seeks to accomplish. This can mean hundreds of requests/hour based on a Zapier customer plan, or thousands based on a Zap with an active REST Hook Trigger. - -**Best practice:** One way to reduce that API load is via the Zapier platform dehydration feature mentioned earlier. By putting these secondary requests behind a dehydration pointer, Zapier will only make this request once, although it might see these same records again and again based on the Zap’s polling cycle. Dehydration provides one other advantage - if there is an error in trying to hydrate the request, the error will be exposed in Zap history and the Zap can be replayed from there. - -More on dehydration again [here](https://platform.zapier.com/reference/cli-docs#dehydration). - -## Reducing file requests to your API - -**Constraint:** Each time a Zap step requests a file from your API, it will be accessed and downloaded. - -**Best practice:** Much like data dehydration, you can implement a file request using [dehydration](https://platform.zapier.com/reference/cli-docs#file-dehydration), so the file will only be accessed and downloaded when a later Zap step asks for it. - -To make this even more efficient, you can [stash the file](https://platform.zapier.com/reference/cli-docs#stashing-files) at Zapier. Rather than provide the file to the requesting step, Zapier will stash the file (under a dehydrated URL), so that only one request will ever be made for the file from your API. - -# Throttling - -There are a number of throttles that a Zapier user could encounter when using your integration, including those set by your API. - -## Throttling (your API) - -**Constraint:** Your API has request limits. - -**Errors a user will see if constraint is hit:** - -- If a trigger, user will receive an email with an error message about the trigger error -- If an action, user will see an error in Zap history - -**Best practice:** Add a specific 429 `Retry-After` header to your response, or specify a timed delay in your error response using a special `ThrottledError`. Instead of a user’s Zap erroring and halting, the request will be retried at the specified time. More on the retry [here](https://platform.zapier.com/reference/cli-docs#handling-throttled-requests). The user will see this message in Zap History instead of an error while the limit is still in place: -![](https://cdn.zappy.app/0933736266259b11771a0eba0aff23ce.png) - -## Webhook throttles (Zapier) - -**Constraint:** Zapier’s current webhook limits are [here](https://zapier.com/help/troubleshoot/behavior/rate-limits-and-throttling-in-zapier#step-4). We will issue a 429 response when your integration exceeds these throttle limits. - -**Errors a user will see if constraint is hit:** - -- User will receive an email with an error message about the trigger error - -**Best practice:** You should support a retry/back-off schedule to make sure the data is eventually received. - -## Polling trigger throttle (Zapier) - -**Constraint:** There is a default limit of 100 new items/poll after deduplication. More on that [here](https://zapier.com/help/manage/history/view-and-manage-your-zap-history#holding). - -**Errors a user will see if constraint is hit:** - -- The user will receive an email about held Zap runs, as well as a banner with the same information in their Zap history. - -**Best practices:** If your trigger will be returning > 100 new records consistently, we’d encourage you to look at these two options: - -- Converting your trigger to be REST Hook based. Webhook limits are much expanded (up to 10,000 requests in a 5 minute period). -- Add support for Transfer. This is a new Zapier service that supports paging so users can create a Zap to select and batch transfer up to 25,000 records at one time. More [here](https://platform.zapier.com/reference/transfer). - -# Error messages - -When writing user-facing error messages, keep the message below 250 characters total. Zapier truncates errors from integrations at 250 characters when displaying them to users. - -As an integration developer, you'll be able to see more detail in your [Monitoring](https://platform.zapier.com/build/testing#monitoring) page, including the error stacktrace. - -# Hydration/Dehydration - -[File dehydration](https://platform.zapier.com/reference/cli-docs#file-dehydration) is an extremely useful tool to remain within time and size constraints for Zapier triggers and actions. However, it does have its own limits. - -**Constraint**: There is a hard limit of 150MB on the size of dehydrated files. Depending on the complexity of the app, issues can also occur for files over ~100MB. - -**Errors a user will see if constraint is hit:** In their Zap history, the user will see an error like "Runtime exited with error: signal: killed". - -**Best practice**: If your integration regularly loads large files, provide checks on file size and don't perform hydration for files that are larger than ~100MB. Include messaging for users letting them know of the limit. - -# Important Zapier constraints summary - -| Time Limits | | -| ---------------------------------------------------------- | ---------- | -| Zap Editor test step: request(s) + scripting | 30 seconds | -| Polling trigger: request(s) + scripting | 30 seconds | -| REST Hook trigger: ingest and payload processing scripting | 30 seconds | -| Create/search action: requests(s) + scripting | 30 seconds | - -| Size limits | | -| --------------------- | -------------------- | -| Deduplication table | 105,000 rows per Zap | -| Custom fields | 1000 | -| Webhook payload | 10 MB | -| HTTP response payload | 6 MB | -| Downloaded files | ~120 MB | - -| Throttles | | -| ------------------------------------------------------------------------------------------------------------------- | --------------------------- | -| Polling trigger | Default: 100 new items/poll | -| REST Hook trigger | 10000 webhooks/5 minutes | -| | 30 webhooks/second | -| More on throttles [here](https://zapier.com/help/troubleshoot/behavior/rate-limits-and-throttling-in-zapier#step-3) | | - -| TCP/IP | | -| ----------------------- | --------------------------------------------------------------------------------------------------- | -| Integration assigned IP | [AWS-East](https://zapier.com/help/troubleshoot/behavior/cant-access-or-use-zapier-with-other-apps) | diff --git a/docs/_build/search-create-action.md b/docs/_build/search-create-action.md deleted file mode 100644 index fd7f88d3..00000000 --- a/docs/_build/search-create-action.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: Search or create action -order: 12 -layout: post-toc -redirect_from: /docs/search-create ---- - -## Search or create action - -![Zapier Action Options](https://cdn.zappy.app/3d803056c12640c99af4bd79add42a4c.png) - -Zaps start with a trigger, a Zapier step that watches for new data from an API and starts the Zap workflow. Then it’s up to action steps to make use of that data. - -Action steps can find and/or create items in apps. The most common actions—shown at the top of each Zap action step—are _Create_ actions, which as their name implies make new items from the data users enter. Then there are _Search_ actions, which can find data in apps and optionally create new items if the search returns no results. - -Creates add new data; Searches find existing data, and fill in gaps if needed. Creates return a single object to Zapier; Searches return an array of objects. - -Most Zapier integrations should at a minimum include create actions to let users add items to their app automatically. Anything people can build in your app could be made automatically with create action.That’s what most Zaps do for people. They add new projects, tasks, contacts, invoices, leads, deals, files, photos, and much more to apps whenever they’re needed. Create actions can also update existing items—something often paired with a Search to locate the item needing updates first. - -Search actions, then let users do more with the data they’ve already added to your app. Perhaps they want to avoid adding duplicate items—and prevent errors from your API. Maybe they need to look up info about an item to use in a subsequent step. Or for apps that are built around search—including weather, conversion, and contact lookup apps—search actions might be the integration feature where Zaps find info from this app then use it in subsequent steps. - -Search actions can optionally create items if nothing is found for the search. They can’t do this on their own, though—apps first need to have a create action to make the item, and then can pair the search step with a create step, embedding the create inside the search step to find or create items in one step. - -Create and Search actions differ not only in their purpose, but also in their API calls. Create actions by default POST data to an API, while Search actions by default GET data from an API like a Trigger. Create actions’ input fields gather data that is sent to the API to create new entries, while Search actions’ input fields gather data used to filter through data and return the closest match. Both can only do one thing at a time: Create actions make one new item, and search actions find the first matching result. - -Together, create and search actions give users a powerful way to connect apps, using data they’ve previously saved and adding new entries that can pull from existing data in all of their apps. diff --git a/docs/_build/troubleshooting/error-array-expected.md b/docs/_build/troubleshooting/error-array-expected.md new file mode 100644 index 00000000..3f9b11bf --- /dev/null +++ b/docs/_build/troubleshooting/error-array-expected.md @@ -0,0 +1,41 @@ +--- +title: Error - An array is expected +order: 10 +layout: post-toc +redirect_from: + - /build/faq#i-got-an-an-array-is-expected-error-how-do-i-fix-that +--- + +# Error: An array is expected + +## Error shown + +When you add a polling trigger or search action to a Zap, the Zapier platform [expects a bare array of new or found items returned](https://platform.zapier.com/build/response-types), sorted in reverse chronological order. An API may instead return a result _object_ that contains the array of items the trigger/search needs. + +{% raw %} +For example, for a "Find Issue" search action with GitHub's API, we might start with a `https://api.github.com/repos/{{bundle.inputData.owner}}/ {{bundle.inputData.repo}}/issues/{{bundle.inputData.issue_number}}` request: +{% endraw %} + +![](https://cdn.zappy.app/a5516cc30abee4f84a58ac5b7b3dfc76.png) + +When tested, Zapier will show an error message `Results must be an array, got: object,` + +![](https://cdn.zappy.app/2461b0e7f49ecf5aed90d429a59ad2bf.png) + +Check the API response in the HTTP tab of the _[Test your API Request](https://platform.zapier.com/build/test-triggers-actions)_ section, and you'll see an _object_ that contains the array of items we need was returned, not the array itself: + +![](https://cdn.zappy.app/d569e3a05f643a9a199b5d85dc4a4fc2.png) + +## Solution + +Instead, return that array of channels to Zapier. To do that switch to [Code Mode](https://platform.zapier.com/build/code-mode) in your request. That will allow you to provide a JavaScript function to handle the request, and make needed changes to the structure or content of the result before returning data to the Zapier platform. + +For this request, wrap the response with an array instead of the default `return results`, to have Zapier return an array of issues. + +![](https://cdn.zappy.app/3bec13fa502f47ff1e5f9bfded052b4d.png) + +> Remember: [Code Mode]((https://platform.zapier.com/build/code-mode)) is a toggle; if you switch back to Form Mode your code will be ignored! + +Now, retest the request and it should run successfully. + +![](https://cdn.zappy.app/af56c7fed5183aed462d2e7efbf78f8c.png) \ No newline at end of file diff --git a/docs/_build/troubleshooting/hydration-limits.md b/docs/_build/troubleshooting/hydration-limits.md new file mode 100644 index 00000000..9d31ab7e --- /dev/null +++ b/docs/_build/troubleshooting/hydration-limits.md @@ -0,0 +1,22 @@ +--- +title: Hydration/dehydration limits +order: 9 +layout: post-toc +redirect_from: +--- + +# Hydration/dehydration limits + +[File dehydration](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#dehydration) is an extremely useful tool to remain within time and size constraints for Zapier triggers and actions. However, it does have its own limits. + +## Constraint + +There is a hard limit of 150MB on the size of dehydrated files. Depending on the complexity of the app, issues can also occur for files over ~100MB. + +## Errors user will see if constraint is hit + +- In their Zap history, the user will see an error like `Runtime exited with error: signal: killed`. + +## Best practice + +If your integration regularly loads large files, provide checks on file size and don't perform hydration for files that are larger than ~100MB. Include messaging for users letting them know of the limit on file size in the trigger/action description or in a `Copy` field above the file input field. \ No newline at end of file diff --git a/docs/_build/troubleshooting/operating-constraints.md b/docs/_build/troubleshooting/operating-constraints.md new file mode 100644 index 00000000..2ee219b7 --- /dev/null +++ b/docs/_build/troubleshooting/operating-constraints.md @@ -0,0 +1,46 @@ +--- +title: Zapier operating constraints +order: 1 +layout: post-toc +redirect_from: +--- + +# Zapier operating constraints + +Zapier offers a relatively unique run-time environment for your integration and its requests to your API. The environment is stateless and restricts both execution time and payload size to offer normalized reliability and running time. There are three distinct contexts of this run-time that your integration will need to consider. + +- Zap step setup and testing using the Zap editor +- Zap startup - turning a Zap on +- Zap step execution when a Zap runs + +The following pages describe the operating constraints of these run-time modes, the errors your integration users could run into, and best practices. Developers in the Platform CLI development environment and those using [Code Mode](https://platform.zapier.com/build/code-mode) in the Platform UI will find these pages most relevant. + +Many errors can be viewed in your integration's log monitoring in the [Platform UI](https://platform.zapier.com/build/test-monitoring), or if using the [Platform CLI](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#handling-throttled-requests), by using `zapier logs` command. + +# Important Zapier constraints summary + +| Time Limits | | +| ---------------------------------------------------------- | ---------- | +| Zap Editor test step: request(s) + scripting | 30 seconds | +| Polling trigger: request(s) + scripting | 30 seconds | +| REST Hook trigger: ingest and payload processing scripting | 30 seconds | +| Create/search action: requests(s) + scripting | 30 seconds | + +| Size limits | | +| --------------------- | -------------------- | +| Deduplication table | 105,000 rows per Zap | +| Custom fields | 1000 | +| Webhook payload | 10 MB | +| HTTP response payload | 6 MB | +| Downloaded files | ~120 MB | + +| Throttles | | +| ------------------------------------------------------------------------------------------------------------------- | --------------------------- | +| Polling trigger | Default: 100 new items/poll | +| REST Hook trigger | 10000 webhooks/5 minutes | +| | 30 webhooks/second | +| More on throttles [here.](https://help.zapier.com/hc/en-us/articles/8496181445261#h_01H91ED0PQ782E3B34ZRB5DXF7) | | + +| TCP/IP | | +| ----------------------- | --------------------------------------------------------------------------------------------------- | +| Integration assigned IP | [AWS-East](https://zapier.com/help/troubleshoot/behavior/cant-access-or-use-zapier-with-other-apps) | \ No newline at end of file diff --git a/docs/_build/troubleshooting/reduce-api-requests.md b/docs/_build/troubleshooting/reduce-api-requests.md new file mode 100644 index 00000000..3b3ec2a8 --- /dev/null +++ b/docs/_build/troubleshooting/reduce-api-requests.md @@ -0,0 +1,26 @@ +--- +title: Reduce requests to your API +order: 7 +layout: post-toc +redirect_from: + - /build/operating-constraints#reducing-requests-to-your-api + - /build/operating-constraints#reducing-file-requests-to-your-api +--- + +# Reduce requests to your API + +## Trigger/action runs in a Zap + +### Constraint + +Each time a Zap runs and your integration is invoked, it can mean multiple requests to your API endpoints, depending on what your trigger/action seeks to accomplish. This can mean hundreds of requests/hour for your polling triggers based on a [Zapier customer's plan](https://zapier.com/pricing), or thousands based on a Zap with an active REST Hook Trigger from another app and an action in your app. + +For triggers/actions that include files in the output, each time a Zap step requests a file from your API, it will be accessed and downloaded from the relevant endpoint. + +### Best practice + +One way to reduce that API load is via the Zapier platform [dehydration feature](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#dehydration). By putting any secondary requests behind a dehydration pointer, Zapier will only make this request once, although it might see the same records again and again based on the Zap’s polling cycle. + +For file outputs, implementing dehydration means the file will only be accessed and downloaded when a later Zap step asks for it. + +To make this even more efficient, you can [stash the file](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#stashing-files) at Zapier. Rather than provide the file to the requesting step, Zapier will stash the file (under a dehydrated URL), so that only one request will ever be made for the file from your API. \ No newline at end of file diff --git a/docs/_build/troubleshooting/troubleshoot-action-payload.md b/docs/_build/troubleshooting/troubleshoot-action-payload.md new file mode 100644 index 00000000..bf1e3e90 --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-action-payload.md @@ -0,0 +1,38 @@ +--- +title: Troubleshoot action payload size +order: 5 +layout: post-toc +redirect_from: + - /build/operating-constraints#payload-size-actionssearches + - /build/operating-constraints#payload-size-actionssearches-1 +--- + +# Troubleshoot action payload size + +## Testing action in Zap editor + +### Constraint + +When a user clicks **Test and Review** or **Retest and Review** in the Zap editor, the response payload must be less than 6MB. + +### Errors user will see if constraint is hit + +- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) + +### Best practice + +If your API endpoint supports request filtering, one option is to provide input fields in the action/search so a user can decide what record field data they want to return. If that is not available, you might look at having multiple endpoints for this record data. Your integration could then provide multiple action/searches for the user so they can get a full record. + +## Action runs in a Zap + +### Constraint + +An action/search response payload must be less than 6 MB. + +### Errors user will see if constraint is hit + +- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) + +### Best practice + +Use the simplest available endpoint on your API for the basic record data, and use Zapier platform [dehydration](https://platform.zapier.com/reference/cli-docs#dehydration) to request supplementary data from other endpoints. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. \ No newline at end of file diff --git a/docs/_build/troubleshooting/troubleshoot-action-timeouts.md b/docs/_build/troubleshooting/troubleshoot-action-timeouts.md new file mode 100644 index 00000000..087b0f10 --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-action-timeouts.md @@ -0,0 +1,41 @@ +--- +title: Troubleshoot action timeouts +order: 4 +layout: post-toc +redirect_from: + - /build/operating-constraints#timeouts-actionssearches + - /build/operating-constraints#timeouts-actions +--- + +# Troubleshoot action timeouts + +## Testing action in Zap editor + +### Constraint + +When a user clicks **Test and Review** or **Retest and Review** in the Zap editor, the output of your `perform` must be returned within 30 seconds. + +### Errors user will see if constraint is hit + +- _“The app did not respond in-time. It may or may not have completed successfully.”_ + +### Best practice + +Timeouts can occur on your API endpoint, or within the `perform` method processing the response payload. To speed up the `perform`, check for expensive processing operations, and consider reducing `z.console.log` calls, especially in looping code. + +## Action runs in a Zap + +### Constraint + +Each time a Zap step runs, the action/search's `perform` method must finish processing in 30 seconds. If the API request cannot consistently be finished within 30 seconds - for example, file format conversion, an error will show. + +### Errors user will see if constraint is hit + +- An error in the Zap history of their Zap due to the request timing out + +### Best practice + +For longer-running requests, use the webhook-based callback service the Zapier platform provides. This allows your action to be performed asynchronously, and when finished, POST to the callback URL. More on using this method [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#zgeneratecallbackurl). + +A user will then see the [Waiting/Delayed status](https://help.zapier.com/hc/en-us/articles/20505304170637-Review-Zap-run-statuses) in Zap history for that Zap step, until the POST is received to the callback url, upon which the task will resume. + diff --git a/docs/_build/troubleshooting/troubleshoot-custom-fields.md b/docs/_build/troubleshooting/troubleshoot-custom-fields.md new file mode 100644 index 00000000..6437e95b --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-custom-fields.md @@ -0,0 +1,33 @@ +--- +title: Troubleshoot custom fields +order: 6 +layout: post-toc +redirect_from: + - /build/operating-constraints#step-configuration-with-custom-fields +--- + +# Troubleshoot custom fields + +## Configuring the trigger/action in Zap editor + +### Constraint + +If your trigger, action, or search supports retrieving custom fields from your API, these are limited to 1000 custom fields, the output of the method to retrieve the fields must be returned within 30 seconds and the response payload must be less than 6MB. + +### Errors user will see if constraint is hit + +- Slow rendering of the step when it is added or edited in the Zap editor +- Custom fields might not display +- Not all output fields will be available for mapping in later steps +- _“The app did not respond in-time. It may or may not have completed successfully.”_ +- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) + +### Best practice + +Here is an example of the way one integration works around all three of these constraints. [Hubspot](https://zapier.com/apps/hubspot/integrations) offers a CRM product, and users often have thousands of custom fields for Company records. + +In the **_Create Company_** action, instead of presenting an overwhelming number of custom fields, they present a set of default fields that all companies have, then allow the user to select the other fields they might need from an **_Additional Properties to Retrieve_** dropdown menu field. + +The fields chosen are then retrieved by the Zap editor for user editing. This helps in both making sure the request can be accomplished within the time and size limits, and making sure the user can easily find the custom fields important to their specific workflow. + +![](https://cdn.zappy.app/4ac409c47f194303c54adff79fcd693f.png) \ No newline at end of file diff --git a/docs/_build/troubleshooting/troubleshoot-throttles.md b/docs/_build/troubleshooting/troubleshoot-throttles.md new file mode 100644 index 00000000..e9f4ba12 --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-throttles.md @@ -0,0 +1,64 @@ +--- +title: Troubleshoot throttles +order: 8 +layout: post-toc +redirect_from: + - /build/operating-constraints#throttling-your-api + - /build/operating-constraints#webhook-throttles-zapier + - /build/operating-constraints#polling-trigger-throttle-zapier +--- + +# Troubleshoot throttles + +## Throttling by your API + +### Constraint + +Your API has request limits. + +### Errors user will see if constraint is hit + +- If a trigger, user will receive an email with an error message about the trigger error +- If an action, user will see an error in Zap history + +### Best practice + +Add a specific `Retry-After` header to your 429 response, or specify a timed delay in your error response using a special `ThrottledError`. Instead of a user’s Zap erroring and halting, the request will be retried at the specified time. + +More on the retry [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#handling-throttled-requests). The user will see a [Waiting/Scheduled](https://help.zapier.com/hc/en-us/articles/20505304170637-Review-Zap-run-statuses) message in Zap history instead of an error while the limit is still in place. + +![](https://cdn.zappy.app/0933736266259b11771a0eba0aff23ce.png) + +If implementing a `ThrottledError`, you could consider implementing a jitter for handling 429 errors, that could look something like this to randomize the frequency of the retries as well: + +`throw new z.errors.ThrottledError('message here', 60 + Math.floor(Math.random() * 60))` + +Keep in mind that adding custom error handling with `ThrottledError` would likely require a [new integration version](https://platform.zapier.com/manage/versions), whereas adding to the headers could be implemented on your API's end. + +## Webhook throttles by Zapier + +### Constraint + +Zapier’s current webhook limits are [here](https://help.zapier.com/hc/en-us/articles/8496181445261#h_01H91ED0PQ56S166BSB7MJNZNT). A 429 response is returned if your integration exceeds these limits in number of webhooks sent to Zapier. + +### Errors user will see if constraint is hit + +- User will receive an email with an error message about the trigger error + +### Best practice + +You should support a retry/back-off schedule to make sure the data is eventually received. + +## Polling trigger throttles by Zapier + +### Constraint + +There is a default limit of 100 new items recognized per poll after deduplication. More on that [here](https://help.zapier.com/hc/en-us/articles/8496181445261-Rate-limits-and-throttling-in-Zapier#h_01H91ED0PQ1HK1G1YFTZ9NSPRN). + +### Errors user will see if constraint is hit + +- The user will receive an email about held Zap runs, as well as a banner with the same information in their Zap history. + +### Best practice + +If your trigger will be returning > 100 new records consistently, consider converting your trigger to be REST Hook based. Webhook limits are higher (up to 10,000 requests in a 5 minute period). \ No newline at end of file diff --git a/docs/_build/troubleshooting/troubleshoot-trigger-payload.md b/docs/_build/troubleshooting/troubleshoot-trigger-payload.md new file mode 100644 index 00000000..825605df --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-trigger-payload.md @@ -0,0 +1,69 @@ +--- +title: Troubleshoot trigger payload size +order: 3 +layout: post-toc +redirect_from: + - /build/operating-constraints#payload-size-triggers + - /build/operating-constraints#payload-size-polling-triggers + - /build/operating-constraints#payload-size-rest-hook-triggers + - /build/operating-constraints#timeouts-and-payload-size-polling-triggers +--- + +# Troubleshoot trigger payload size + +## Testing trigger in Zap editor + +### Constraint + +When a user clicks **Test Trigger** in the Zap editor, the response payload must be less than 6MB. + +### Errors user will see if constraint is hit + +- _“Scripting payload too large ('n' bytes but max is 6291456bytes).”_ - ('n' is the number of bytes in the payload.) + +### Best practice + +The Zap editor will only process three new records at a time for sample data, so one way of making sure your payload size is less than the limit is by limiting your results to three records. + +To determine when the request is for sample data, use the bundle meta parameter `bundle.meta.isLoadingSample`. When that is set to `true`, the user is testing in the Zap editor, and your integration can respond with a limited payload. More on `bundle.meta` properties [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#bundlemeta). + +## Turning Zap on + +### Constraint + +When a user toggles a Zap with a polling trigger “On”, Zapier does some additional initialization that must be accomplished in 30 seconds. + +First, it tests the user’s authentication to your service. + +Then it uses the trigger's `perform` method to build a [deduplication table](https://platform.zapier.com/build/deduplication) of records, so that the Zap will not run for existing records. The payload returned from this request must also be less than 6 MB. + +### Errors user will see if constraint is hit + +- Users will receive an email with an error message that includes the text _"Your Zap could not be turned on"_. + +### Best practice + +There is a `bundle.meta` property that you can take advantage of here, `bundle.meta.isPopulatingDedupe`. When set to `true`, the Zap is being enabled, and you can use that to create a distinct request. The deduplication process only uses the `id` property of each record, so one option to consider for this request is filtering the fields you return to reduce record size. + +More on `bundle.meta` properties [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#bundlemeta). + +For those requests that might otherwise exceed timeout or size limits, you can make sure your filtered request is successful. Alternatively, if your filtered request has a lot of headroom in both time and size, you could instead use this to load more records into the Zap’s deduplication table than you usually request in your `perform`. This is especially relevant for an API that might return an inadvertent older record in a later polling request. + +**Example:** The [Salesforce](https://zapier.com/apps/salesforce/integrations) integration has an **_Updated Field on Record_** trigger that can trigger on older records that a user might not consider relevant for their running Zap. To help mitigate this, the integration uses a filtered request to download up to 104,000 records to the deduplication table during Zap startup. + +## Trigger runs in a Zap + +### Constraint + +Each time a Zap executes, the trigger's response payload must be less than 6MB for a polling trigger and less than 10 MB for a REST Hook trigger. + +### Errors user will see if constraint is hit + +- User will receive an email with an error message, usually with _"Trigger Partner Failure"_ in the message text. + +### Best practice + +- For polling triggers, if your API endpoint supports request filtering around number of records or datetime, using these to reduce the number of records returned +- If filtering isn't an option, consider using the simplest available endpoint on your API for the basic record data, and use Zapier platform [dehydration](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#dehydration) to request supplementary data. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. +- For REST Hook triggers, if your REST Hook subscription endpoint supports filtering, one option is to provide input fields in the trigger so a user can decide what record data they want to return. +- Consider sending a notification REST Hook that includes minimal record data. You can then use additional API endpoints and Zapier platform [dehydration](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#dehydration) to request the supplementary record data. A dehydration pointer is created for each subsequent request, and this pointer will only be resolved if the Zap needs a hydrated property in a later step. \ No newline at end of file diff --git a/docs/_build/troubleshooting/troubleshoot-trigger-timeouts.md b/docs/_build/troubleshooting/troubleshoot-trigger-timeouts.md new file mode 100644 index 00000000..8131f443 --- /dev/null +++ b/docs/_build/troubleshooting/troubleshoot-trigger-timeouts.md @@ -0,0 +1,47 @@ +--- +title: Troubleshoot trigger timeouts +order: 2 +layout: post-toc +redirect_from: + - /build/operating-constraints#timeouts-triggers + - /build/operating-constraints#timeouts-triggers-1 +--- + +# Troubleshoot trigger timeouts + +## Testing trigger in Zap editor + +### Constraint + +When a user clicks **Test Trigger** in the Zap editor, the output of your `perform` (polling) or `performList` (REST Hook) must be returned within 30 seconds. + +### Errors user will see if constraint is hit + +- _“The app did not respond in-time. It may or may not have completed successfully.”_ +- _"Problem creating Sample: Our computers ran into a problem"_ +- _“We couldn't find any more x. Create a new x in your account and try again.”_ + +### Best practice + +The Zap editor will only process three new records at a time for sample data, so one way of speeding up the response is by limiting returned results to three records when a trigger is tested. + +To determine when the request is for sample data, use the bundle meta parameter `bundle.meta.isLoadingSample`. When that is set to `true`, the user is testing in the Zap editor, and your integration can respond with a limited payload. More on `bundle.meta` properties [here](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#bundlemeta). + +## Trigger runs in a Zap + +### Constraint + +Each time a Zap executes, the trigger's `perform` method must finish processing in 30 seconds. Polling triggers run on an interval based on a [user's Zapier plan](https://zapier.com/pricing) (between 1 and 15 minutes). REST Hook triggers run on an inbound POST to their subscription URL. + +### Errors user will see if constraint is hit + +- User will receive an email with an error message, usually with _"Trigger partner failure"_ in the message text. An example of the email sent when the trigger errors due to a timeout: + +![](https://cdn.zappy.app/0247e40bb198cd439e63cdfb6cc58bdb.png) + +### Best practices + +- For polling triggers, if your API endpoint supports request filtering around number of records or datetime, use these to reduce the number of records returned +- For both types of triggers, optimize the `perform` scripting for manipulating the payload +- Use [console logging](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#console-logging) efficiently. It can help you determine where issues might lie, but too much console logging can cause timeouts due to logging overhead. +- If you have multiple requests per record that are causing timeouts, use the Zapier platform [dehydration functions](https://github.com/zapier/zapier-platform/blob/main/packages/cli/README.md#dehydration). Instead of making the request immediately, a dehydration pointer is created, and the request will only be made if the Zap needs a hydrated property in a later step. \ No newline at end of file diff --git a/docs/_manage/account-and-team/add-team.md b/docs/_manage/account-and-team/add-team.md index e5c71a03..cf5c2eca 100644 --- a/docs/_manage/account-and-team/add-team.md +++ b/docs/_manage/account-and-team/add-team.md @@ -16,10 +16,10 @@ You can add team members to your integration to collaborate, contribute, and vie - **Collaborator**: Collaborators are granted read-only access to the integration. Collaborator access is recommended for product, leadership, partnership, marketing, and other teams seeking access to integration data for analysis and record-keeping without direct involvement in its creation and maintenance. While they cannot make direct changes to the integration, they can: -- View performance data -- View the integration history -- Review and comment on feature requests and bug reports -- Access tools to embed your integration throughout your site to drive user adoption + * View performance data + * View the integration history + * Review and comment on feature requests and bug reports + * Access tools to embed your integration throughout your site to drive user adoption ## Invite team members diff --git a/docs/_quickstart/how-it-works/how-zapier-works.md b/docs/_quickstart/how-it-works/how-zapier-works.md new file mode 100644 index 00000000..0bfeedd5 --- /dev/null +++ b/docs/_quickstart/how-it-works/how-zapier-works.md @@ -0,0 +1,34 @@ +--- +title: How Zapier works +order: 1 +layout: post-toc +redirect_from: + - /quickstart/introduction + - /docs/zapier-intro +--- + +# How Zapier works + +[Zapier is a tool](https://zapier.com/how-it-works) that helps you automate repetitive tasks between two or more apps, no code necessary. Our customers use Zapier to move information from one app to another automatically rather than manually. Each Zap you create starts with a trigger (something that happens in one app) and then one or more actions (something else that happens in another app). + +In order to connect your app to the {{ site.partner_count }} apps on the Zaper Platform to allow your users to build Zaps, your app will need to have a publicly-accessible API which you can use to build your Zapier integration. + +For an intro to APIs in general, check out the [guide](https://zapier.com/learn/apis/). + +When you're ready to get started, [the UI tutorial](https://platform.zapier.com/quickstart/ui-tutorial) offers a great introduction to building your first Zapier integration. + +## What do Zapier integrations include? + +Zapier integrations are comprised of three core concepts: Authentication, Triggers and Actions. + +Authentication connects an app to Zapier. Users authenticate their account with an app to allow Zapier to access their data in that app. Once a user authenticates, Zapier will use the same authentication credentials for every API call the integration makes on the user's behalf. + +Triggers are how your app's users can start Zaps (automated workflows) whenever an item is added or updated in your app. + +Actions are how your app's users can create new or update existing items in your app. + +## How does building an integration work? + +All new Zapier integrations are built using Zapier Platform v3, the latest version of our developer platform. You can build integrations using Zapier Platform UI, an online visual builder to create integrations in a form layout. Or, you can use Zapier Platform CLI, a command line interface to build integrations in JavaScript code from your local development environment. + +Both interfaces use the same Zapier Platform and function the same internally, with some [differences to consider when building](https://platform.zapier.com/quickstart/ui-vs-cli). \ No newline at end of file diff --git a/docs/_quickstart/how-it-works/private-vs-public-integrations.md b/docs/_quickstart/how-it-works/private-vs-public-integrations.md new file mode 100644 index 00000000..629cff71 --- /dev/null +++ b/docs/_quickstart/how-it-works/private-vs-public-integrations.md @@ -0,0 +1,79 @@ +--- +title: Private vs public integrations +order: 3 +layout: post-toc +redirect_from: + - /private_integrations/private-vs-public-integrations + - /embed/zapier-plugin-chatgpt +--- +# Private vs public integrations + +When building an integration on the Zapier Platform, you must specify the intended audience. The intended audience determines whether the integration will be private or public: + +* Public integration: For access to all Zapier customers and published in the [Zapier App Directory](https://zapier.com/apps). +* Private integration: For personal, internal (e.g. with your team) or controlled-access use. + +Both private and public integrations can connect to Zapier’s app directory of over [{{ site.partner_count }} integrations](https://zapier.com/apps). Depending on your intended audience, there will be different features available and limitations to what the integration can do. + +> **Note**: The intended audience is different from your integration’s status. All integrations, regardless of intent, start with a private status. Learn more in [Zapier integration publishing requirements](https://platform.zapier.com/publish/integration-publishing-guidelines). + + +## Public integrations + +Public integrations are suitable for the following use cases: + +* Connect your app product to Zapier for public use. +* Gain exposure from Zapier’s 3 million+ users. + + By creating a public integration, you’ll have access to these features: + +* Join the [Zapier Partner Program](https://zapier.com/platform/partner-program). +* Publish your integration in [Zapier’s app directory](https://zapier.com/apps). +* [Create Zap templates](https://platform.zapier.com/publish/zap-templates). +* [Embed Zapier in your product](https://platform.zapier.com/embed/overview). +* [Embed Zap Templates in your product](https://platform.zapier.com/embed/zap-templates). +* Use [Zapier Issue Manager](https://platform.zapier.com/manage/user-feedback#3-consider-zapier-issue-manager) to manage bugs and feature requests. +* Users of your integration can [share a template of their Zaps](https://help.zapier.com/hc/en-us/articles/8496292155405-Share-a-copy-of-your-Zap). +* Users of your integration can use [Zapier's ChatGPT plugin](https://help.zapier.com/hc/en-us/articles/14058263394573). + +### Limitations + +If you’re building a public integration, there are specific limitations to be aware of: + +* To create a public integration, you need to meet the [Integration Ownership criteria](https://platform.zapier.com/publish/integration-publishing-guidelines#21-integration-ownership). +* You can have up to [100 admins and collaborators](https://platform.zapier.com/manage/add-team). +* You can’t restrict who uses your public integration. + + + +## Private integrations + +Private integrations are suitable for the following use cases: + +* Connect your internal tool or system to Zapier. +* Connect your app product to Zapier to exclusively allow your team to build workflows. +* Create an integration for a staging or testing environment. + +> **Note**: We strongly recommend against the use of an independent private integration for staging purposes in the case of an existing public integration. Instead, use a private [version](https://platform.zapier.com/manage/versions) for this purpose. + +By creating a private integration: + +* You control who has access to your integration. +* Your private integration won’t appear within [Zapier’s app directory](https://zapier.com/apps). + +### Limitations + +If you’re building a private integration, there are specific limitations to be aware of: + +* Rate limits depend on the Zapier plan of the integration owner. When using your private app in their Zaps, users' Zap runs will be [held](https://help.zapier.com/hc/en-us/articles/8496291148685-View-and-manage-your-Zap-history) if the cumulative calls across all users of your private integration exceed the following limits on the integration owner's plan: + + - Free, Starter, and Professional plans: 100 calls every 60 seconds. + - Team, or Company plans: 5000 calls every 60 seconds. + - To increase a private integration rate limit for your users, [upgrade your Zapier plan](https://help.zapier.com/hc/en-us/articles/8496277302157-Change-or-cancel-your-Zapier-plan). + - To request an increase in the rate limit for your private integration beyond 5000 calls, contact our [Sales team](https://zapier.com/l/contact-sales). + +* You can have up to [100 admins and collaborators](https://platform.zapier.com/manage/add-team). +* You can invite up to [100 users by email](https://platform.zapier.com/manage/sharing#2-invite-users-by-email). There’s no limit when [sharing access using a public link](https://platform.zapier.com/manage/sharing#1-invite-users-with-a-public-link), but note this access cannot be revoked once a user accepts the invitation link. +* [Embedding](https://platform.zapier.com/embed/overview) Zapier and [Zap templates](https://platform.zapier.com/publish/zap-templates) are not supported. +* [Sharing a template of Zaps](https://help.zapier.com/hc/en-us/articles/8496292155405-Share-a-copy-of-your-Zap) is not supported. +* Your app won't appear as an option on [Zapier's ChatGPT plugin](https://help.zapier.com/hc/en-us/articles/14058263394573). \ No newline at end of file diff --git a/docs/_quickstart/how-it-works/zapier-integration-structure.md b/docs/_quickstart/how-it-works/zapier-integration-structure.md new file mode 100644 index 00000000..3e6d96d2 --- /dev/null +++ b/docs/_quickstart/how-it-works/zapier-integration-structure.md @@ -0,0 +1,52 @@ +--- +title: Zapier integration structure +order: 2 +layout: post-toc +redirect_from: + - /quickstart/project-structure + - /quickstart/zapier-integration-structure + - /manage/analyze-integration-performance#how-to-view-insights +--- + +# Zapier integration structure + +## Project Structure + +[Zapier's Developer Platform](https://developer.zapier.com/) includes everything needed to build and manage a new Zapier integration. When you access your integration project by name, you'll see the left sidebar outlines the core project structure. + +### Dashboard + +_Dashboard_ tab is used to monitor and analyze your integration's growth, usage, and embed metrics. You **must** be an [admin or collaborator](https://platform.zapier.com/manage/add-team) to view an integration’s dashboard. + +![Screenshot of Dashboard tab in Developer Platform](https://cdn.zappy.app/d7a53ee12f8fb94a44edbc0f8e3195ea.png) + +### Build + +_Build_ tab defines your integration: + + - _Version Overview_ shows the outline of the version selected in the [dropdown](https://cdn.zappy.app/ca49500dc40cd1986693223661ab22b2.png) + - _Authentication_ sets how users authenticate with your API; using basic, API key, digest, session, or OAuth v2 authentication. + - _Triggers_ control how Zapier gets data from your API into a Zap, with `GET` HTTP calls or REST Hooks. + - _Actions_ control how Zapier sends data to your API, including: + - _Create Actions_ to send new data from a Zap to your API, with `POST` or `PUT` HTTP calls to create or update items. + - _Search Actions_ to perform lookups through your API using `GET` calls. + - _Advanced_ manages environment variables to store secret values your integration needs to communicate with your API, such as API keys or client IDs and secrets, or manage switching between staging and production environments in a version. + +When planning your integration build, think through your integration and what features from your app your users might find the most valuable. Review [integration design examples](https://platform.zapier.com/build/recommended-integration-features) by app category for inspiration. + +Walk through building an integration with the [UI tutorial](https://platform.zapier.com/quickstart/ui-tutorial) or the [CLI tutorial](https://platform.zapier.com/quickstart/cli-tutorial). + +### Manage + +_Manage_ tab is where you access tools to maintain your integration: + + - _Versions_ gives an [overview of each version's status](https://platform.zapier.com/manage/versions), user activity and for published apps; the changelog included in a promotion + - _Sharing_ is where you [give users access](https://platform.zapier.com/manage/sharing) to private versions via an invite link to all versions or an email invite to a specific version + - _Manage Team_ is used to [add team members](https://platform.zapier.com/manage/add-team) to manage your integration + - _Monitoring_ gives access to [logs for requests](https://platform.zapier.com/build/test-monitoring#steps) made to your API by your Zapier integration + - _History_ shows the 50 most recent audit logs for changes to your integration + - _Bugs & Feature Requests_ are reported by users for published apps and should be used to communicate on these issues with Zapier Developer Support + +### Embed + +_Embed_ tab shows for [public integrations](https://platform.zapier.com/quickstart/private-vs-public-integrations) only and describes a [variety of ways](https://platform.zapier.com/embed/full-zapier-experience) to surface your Zapier integration directly within your own product. It allows your users to search for apps that connect with yours, see popular workflows used with your app, and (most importantly) enables them to sign up for Zapier, build Zaps and edit them, too — without leaving your product. \ No newline at end of file diff --git a/docs/_quickstart/how-zapier-works.md b/docs/_quickstart/how-zapier-works.md deleted file mode 100644 index afe85d80..00000000 --- a/docs/_quickstart/how-zapier-works.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: How Zapier works -order: 1 -layout: post-toc -redirect_from: - - /quickstart/introduction - - /docs/zapier-intro ---- - -# How Zapier works - -Your app can't do everything. It shouldn't. Despite every new feature request, the best thing is a clear focus on what makes your app unique. - -For everything else, there are Zapier integrations. [Zapier](https://zapier.com/) is the most popular way to automate tasks through customized workflows with {{ site.partner_count }} web apps. Using Zaps, what we call automated Zapier workflows, Zapier watches for new or updated data in connected apps, then use that data to do tasks in that or other connected apps. Zaps let your app rely on other best-in-class tools to do the extra things your users want, freeing your app to focus on its core features. - -Build a Zapier integration, and you’ll clear dozens of your app’s top feature requests at once. You don’t need to build custom integrations with every app. One Zapier integration connects your app to every other Zapier integrated app, with more added every day. - -And it’s not much harder than building a form. - -## What is a Zapier integration? - -Zapier integrations are different from standalone apps. Say you were building a new email app. You would either use Gmail and Exchange’s APIs to connect to their services, or would build in support for IMAP, SMTP, and/or POP3 protocols. Your app would likely need a database to store every email message, a UI to manage folders, and an editor to write or view HTML email messages. It would need to support every core feature an email service like Gmail offers. - -Zapier integrations are far simpler. Instead of a complete application for every part of an API, Zapier integrations are instead a curated set of an API’s most important features. - -Zapier runs in the background, automatically watching for new or updated items in connected apps then using that data to find, create, and/or update items in apps. - -Take Gmail’s API for example. It includes API calls to check forwarding and IMAP settings, see the history of a mailbox, undelete messages, and more—along with the more popular options to watch mailboxes for new emails, create new draft messages, and send emails. What should go in Gmail’s Zapier integration? - -You first would add Gmail authentication, likely using Zapier's OAuth v2 tool to quickly let users connect their Gmail account through a Gmail standard login experience. - -You then would add triggers, the API calls that would tell Zapier when new items came into Gmail. Users would want to watch for new emails, and might also want to watch for new draft emails, labels, and attachments. - -Then add actions, API calls that let Zapier do something with Gmail. Users would want to send email messages, and likely also want to create new labels and draft messages. You would want to add a search action to find email messages. - -Those core features would let users automate their inbox and fit it into their ecosystem of apps. Extra Gmail API calls to see the mailbox history or check IMAP settings wouldn’t be nearly as useful, and couldn’t fit well into a Zap. - -Your app’s Zapier integration will be the same. Think through your app’s core API calls. Those that surface new data would be great for triggers; if they support lookups and filtering, they may also make great search actions. The API calls to create or update things in your app would make great actions. And the API calls for settings, deleting data, or seldom-used features would likely be best left out—they're not things users would want to automate on a regular basis. - -## What do Zapier integrations include? - -Zapier integrations require three core things: Authentication, curated API features, and forms. - -Start with Authentication. Most apps require authentication, from API keys or usernames and passwords to OAuth login flows. When building a Zapier integration, first tell Zapier how to authenticate your apps’ users. Set this once and Zapier will use the same authentication scheme for every API call it makes. The same goes for users: Once they’ve authenticated your app in Zapier, they can use any of its triggers and actions without authenticating again (unless they wish to add a second account). - -Next, decide which parts of your app fit best with Zapier. Anything to watch for new data, find existing data, or add new data would likely fit in well. Figure out which of these are most important to your users and would fit best into automated workflows, and list the API calls and input data needed. - -Then turn that input data into forms. Triggers often don’t need extra detail—the API call is enough to get the newest data from your app, and you only need more info to filter that new data (say, to watch for emails with specific labels or from certain mailboxes). Actions, on the other hand, _always_ need data to create new things, the email addresses and names and dates and prices and more Zapier uses to create messages, invoices, events, tasks, and everything else in apps. For that, you need a form. Inside Zapier, users always see a form to fill in data, either with plain text or mapped input fields from previous steps. - -You build that form in Zapier Input Designer when creating Zapier actions (and triggers, when they need to filter for specific data). List the data your API endpoints need to create and find items, and make matching form fields in your Zapier integration actions. That together with the action API call will let a simple form in Zapier create anything in your app. - -Repeat that for every trigger and action your Zapier integration needs. Then test your integration—and get 10 or more others to help you test it—and you can release your Zapier integration to the world. - -## How does Zapier work? - -All new Zapier integrations are built using Zapier Platform v3, the latest version of our development platform. You can build an integration using Zapier's Platform CLI, a command line interface to build integrations in JavaScript code from your local development environment. Or, you could build integrations using Zapier Platform UI, an online visual builder to create integrations in a form layout. - -Both interfaces use the same Zapier Platform and function the same internally. In general, Zapier integrations include definitions of API calls for triggers that watch for new and updated data, searches that request specific data, and create actions that send new data to an API. Zapier bundles your app definition along with any input data received from users in life Zaps, prepares API requests, includes authentication details, and makes the API call. Zapier then parses the API response for individual fields and deduplicates the results from Trigger and Search steps that expect an array of results. - -Zapier then takes action depending on the step. For triggers, if the item is new, Zapier then runs the remaining Zap steps. For searches, if an item exists, Zapier will perform resource hydration, parse its details and run subsequent steps in the Zap; if it does not exist, Zapier may stop the Zap or run a create action to add that item, depending on user selection in the Zap setup. For actions, Zapier will return the results after creating the item, and either run subsequent steps in the Zap if the Zap includes additional steps, or stop the Zap and log this run of the Zap as successful. - -Here's a diagram example of how this works with a trigger step; search and create steps work similarly with their differing final steps as outlined above: - -![Zapier Platform Diagram](https://cdn.zapier.com/storage/photos/54fe2e91170f3337ed8648ec29e97aaf.png) - -Trigger steps's internal workflow differs if triggered with a rest hook as well. - -See [Zapier's Platform CLI documentation](https://zapier.github.io/zapier-platform-cli/#getting-started) for more detail on how Zapier integrations work. - - diff --git a/docs/_quickstart/private-vs-public-integrations.md b/docs/_quickstart/private-vs-public-integrations.md deleted file mode 100644 index 16c41b68..00000000 --- a/docs/_quickstart/private-vs-public-integrations.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: Private vs public integrations -order: 4 -layout: post-toc -redirect_from: - - /private_integrations/private-vs-public-integrations - - /embed/zapier-plugin-chatgpt ---- -# Private vs public integrations - -When building an integration on the Zapier Platform, you must [specify the intended audience](https://platform.zapier.com/build/add). The intended audience determines whether the integration will be private or public: - -* Public integration: For public use and accessible to all Zapier customers. -* Private integration: For personal, internal (e.g. with your team), personal, or controlled-access use. - -Both private and public integrations can connect to Zapier’s app directory of over [5000+ integrations](https://zapier.com/apps). Depending on your intended audience, there will be different features available and limitations to what the integration can do. - -> **Note**: The intended audience is different from your integration’s status. All integrations, regardless of intent, start with a private status. Learn more in [Zapier integration publishing guidelines](https://platform.zapier.com/publish/integration-publishing-guidelines). - - - -## Public integrations - -Public integrations are suitable for the following use cases: - -* Connect your product to Zapier for public use. -* Gain exposure from Zapier’s 3 million+ users. - - - - By creating a public integration, you’ll have access to these features: - -* Join the [Zapier Partner Program](https://zapier.com/platform/partner-program). -* Publish your integration in the [Zapier’s app directory](https://zapier.com/apps). -* [Create Zap templates](https://platform.zapier.com/partners/zap-templates). -* [Embed Zapier in your product](https://platform.zapier.com/embed/overview). -* [Embed Zap Templates](https://platform.zapier.com/embed/zap-templates). -* Use [Zapier Issue Manager](https://platform.zapier.com/partners/zim) to manage bugs and feature requests. -* Users of your integration can [share a copy of their Zaps](https://help.zapier.com/hc/en-us/articles/8496292155405-Share-a-copy-of-your-Zap). -* Users of your integration can use [Zapier's ChatGPT plugin](https://help.zapier.com/hc/en-us/articles/14058263394573). - -### Limitations - -If you’re building a public integration, there are specific limitations to be aware of: - -* To create a public integration, you need to meet the [Integration Ownership criteria](https://platform.zapier.com/publish/integration-publishing-guidelines#21-integration-ownership). -* You can have up to [100 admins and collaborators](https://platform.zapier.com/manage/invite-team-member). -* You can’t restrict who uses your public integration. - - - -## Private integrations - -Private integrations are suitable for the following use cases: - -* Connect your internal tool or system to Zapier. -* Extend what you can do with [Webhooks](https://help.zapier.com/hc/en-us/articles/8496326446989-Send-webhooks-in-Zaps) or [Code](https://help.zapier.com/hc/en-us/articles/8496310939021-Use-JavaScript-code-in-Zaps) steps. -* Connect your product to Zapier to build workflows for your team. -* Create an integration for a staging or testing environment. - -By creating a private integration: - -* You control who has access to your integration. -* Your private integration won’t appear within [Zapier’s app directory](https://zapier.com/apps). - -### Limitations - -If you’re building a private integration, there are specific limitations to be aware of: - -* [Rate limits](https://platform.zapier.com/quickstart/private-integration-rate-limits) depend on the Zapier plan of the integration owner. -* You can have up to [100 admins and collaborators](https://platform.zapier.com/manage/invite-team-member). -* You can invite up to [100 users by email](https://platform.zapier.com/manage/share-integration#invite-users-by-email). There’s no limit when [sharing using a public link](https://platform.zapier.com/manage/share-integration#invite-users-with-a-public-link). -* [Zap templates](https://platform.zapier.com/publish/zap-templates) are not supported. -* [Sharing a copy of Zaps](https://help.zapier.com/hc/en-us/articles/8496292155405-Share-a-copy-of-your-Zap) is not supported. -* Your app won't appear as an option on [Zapier's ChatGPT plugin](https://help.zapier.com/hc/en-us/articles/14058263394573). - - - - - - diff --git a/docs/_quickstart/private_integration_rate_limits.md b/docs/_quickstart/private_integration_rate_limits.md deleted file mode 100644 index ef034e2d..00000000 --- a/docs/_quickstart/private_integration_rate_limits.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Private integration rate limits -order: 9 -layout: post-toc -redirect_from: /private_integrations/private-integration-rate-limits ---- -# Private integration rate limits - -Private integration rate limits are based on your current Zapier plan. When users use your private app in their Zaps, their Zap runs will be [held](https://help.zapier.com/hc/en-us/articles/8496291148685-View-and-manage-your-Zap-history) if they exceed the following limits: - -- Free, Starter, and Professional plans: 100 calls every 60 seconds. -- Team, or Company plans: 5000 calls every 60 seconds. - -This rate limit is cumulative across all users of your private integration. - -## Increasing private integration rate limits - -To increase a private integration rate limit for your users, you can [upgrade your Zapier plan](https://help.zapier.com/hc/en-us/articles/8496277302157-Change-or-cancel-your-Zapier-plan). To request an increase in the rate limit for your private integration beyond 5000 calls, contact our [Sales team](https://zapier.com/l/contact-sales). diff --git a/docs/_quickstart/zapier-integration-structure.md b/docs/_quickstart/zapier-integration-structure.md deleted file mode 100644 index 3d5b207b..00000000 --- a/docs/_quickstart/zapier-integration-structure.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: Zapier integration structure -order: 2 -layout: post-toc -redirect_from: /quickstart/project-structure ---- - -# Zapier integration structure - -## Project Structure - -![Zapier Visual Builder new integration](https://cdn.zappy.app/86ebc2be692ec2f0ca729b92667ee74b.png) - -_Build and manage your app's integration in the Zapier Platform UI_ - -[Zapier's Platform UI Builder](https://developer.zapier.com/){:target="_blank"} includes everything needed to build a new Zapier integration. The left sidebar outlines the core project structure. Each part of your integration definition for the Zapier platform is in the _Build_ tabs: - -- _Authentication_ sets how users authenticate with your API, using basic, API key, digest, session, or OAuth v2 authentication. -- _Triggers_ control how Zapier gets data from your API into a Zap, with `GET` HTTP calls or webhooks. -- _Actions_ control how Zapier sends data to your API, including: - - _Create Actions_ to send new data from a Zap to your API, with `POST` or `PUT` HTTP calls to create or update items. - - _Search Actions_ to perform lookups through your API using `GET` calls. -- _Advanced_ manages environment variables to store secret data your integration needs to communicate with your API, including API keys or client secrets. - -To build an integration, you need to define the core details of your API and build input forms so users can enter the data that Zapier will send to your API. The Zapier platform then automatically handles the authentication flow, [deduplication](https://platform.zapier.com/build/dedupe), and keeps track of which things have already been processed. - -This is where you need to think through your integration. What outputs from your app would make useful triggers for users’ Zaps, and what inputs would your app need to create items from a Zap’s action? For an email service, say, a *Send Email* action would need a recipient email address, subject, and message body. - -For our example integration, we want to make an action that creates GitHub issues, which need an issue title, body, and repository name. List each detail needed to build items in your app, as you'll need to build a form to gather that data while creating your Zapier integration. Check API documentation for available endpoints and required fields. For our GitHub example, we used the documentation [here](https://docs.github.com/en/rest/quickstart?apiVersion=2022-11-28). - -Back in the Zapier Visual Builder, there are a few more tools under the _Manage_ tab to maintain your Zapier integration with versions, analytics, logs and, for published apps; bugs and feature requests reported by users. - -First, though, you need to build that integration. Let’s start with authentication. diff --git a/docs/_reference/natural_language_actions_api.md b/docs/_reference/ai-actions.md similarity index 90% rename from docs/_reference/natural_language_actions_api.md rename to docs/_reference/ai-actions.md index 9a548f49..686bab65 100644 --- a/docs/_reference/natural_language_actions_api.md +++ b/docs/_reference/ai-actions.md @@ -2,7 +2,9 @@ title: AI Actions order: 4 layout: post-toc -redirect_from: /zapier_products/natural-language-actions-api +redirect_from: + - /zapier_products/natural-language-actions-api + - /reference/natural-language-actions-api --- # AI Actions