Build Your Integration
Add New Data With an Action
The input form in Zapier actions lets users map fields from trigger and previous action steps to your app
Zapier actions push new data or update existing data into your API from input fields that users set in their Zaps. Zapier includes search actions to find data in an app, and create actions to add new items via API calls.
Adding an action to your Zapier integration works much like building a trigger. Only here with create actions, Zapier will POST
or PUT
the data users enter in the input fields to your API—and every action needs an input form to gather data and send to your app.
Let’s add an Action to our example GitHub integration so Zapier can send data to GitHub. This tells the Zapier Platform how to create the Zap Editor form where users can configure their Zaps and map data to and from the API, then tells it how to make calls to the API endpoint.
1. Configure Action Settings
Each action starts with adding details to a form.
Enter your new action settings, as with your trigger. Select a Create action since this action will create new issues; then include a key, name, noun, and description for an issue. The type of action cannot be changed once created, so you will need to decide whether the response type you expect to use for your action would be better served by a Search or a Create.
2. Design an Action Input Field Form
Add a new field for every piece of data users need to send to your app for this action
Then add the input fields from the Input Designer tab. Select from Input Field that let users enter static text, Dynamic Fields that pull in data from triggers, and Line Item Groups to include line item data.
Each field type includes its own settings—and you can preview the finished input form on the right
For our example GitHub integration, we need 4 input fields: owner
to add the repository’s owner, title
to list your issue title, repo
to add the repository’s name, and body
to add details about the issue. Add the first three as you did in the Trigger setup, with the default string
field type and the owner
, title
, or repo
keys respectively. Then, for the issue details, select a Text field type so users can enter longer text and use the body
key.
Learn more about Input forms in our detailed input designer docs.
3. Configure Your API
Add the URL where Zapier will send data to your app
Now, select the API Configuration tab in Zapier Visual Builder to tell Zapier how to send the data to the API. Select the POST
API call, then enter GitHub’s issue API endpoint with the {{bundle.inputData.fields}}
fields as with the trigger:
https://api.github.com/repos/{{bundle.inputData.owner}}/{{bundle.inputData.repo}}/issues
Zapier will automatically include the owner
and repo
from the input fields in your API request body. Click the Show Options button to see the mapped fields and customize/remove them if needed—Zapier includes all the input fields by default - keep the issue title
and body
that this GitHub endpoint expects in the request body, and use the owner
and repo
fields in the URL path.
4. Test Your Action
Test your action by sending data to it as users will in their Zaps
Then test the API request. As with the trigger, add sample data in the Configure Test Data form, using a real GitHub repo along with example text and body for your issue. Click Test Your Result, and Zapier will try creating an issue with your test data.
5. Define Your Action Output Fields
Add example data and user friendly names to your app’s most popular fields, especially those that users set in the input form for this action
Finally define sample data and output fields, as in the trigger setup, including example JSON data with the most popular fields, and reader-friendly names so users can easily identify which fields to map in subsequent actions. If a label is not specified, the JSON field name on the left will be used.
Save your action, and you now have a complete Zapier integration with authentication, a trigger, and an action!
Your Action in Zap Editor
Your GitHub Action’s fields let you type in text or map data from previous steps in your Zap so Zapier can copy it into the app. Users clicking into a field can select data from previous steps to use in that field. Then, when the Zap runs, Zapier copies the data that triggered the Zap run and/or any previous steps, and uses it to make the new item in your app—a new GitHub issue in this case.