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.
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
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 section below for details on setting up a search action.
Check our Searches and Creates guide 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
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 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
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 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:
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
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
How to Add a Search Action
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 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.
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
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
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 of your integration, remove the action from the new version, then follow best practices for migrating users when introducing breaking changes to an integration.