Send webhooks in Zaps

Webhooks are automated messages sent between apps—a type of notification that includes detailed information about new items in apps. If you're on a paid plan, you can send webhooks in Zaps. You can also trigger Zaps from webhooks.

ratingStar icon Tip

Learn more about webhooks in this Zapier blog post: What are webhooks?.

1. Add a webhook action

  • In the Zap editor, click the plus + icon to add an action step.
  • Search for and select Webhooks by Zapier.
  • Click the Event dropdown menu and select a webhook option.

Webhooks by Zapier offers GET, POST, PUT methods, which include automatic data parsing, and you can also select Custom Request for other use cases.

Use GET if you want the step to retrieve information from a server. Use the POST or PUT methods if you’re sending files (file objects cannot be sent via Custom Request), or if you're not comfortable writing JSON or XML and would prefer the Zap to parse the information for you.

The app also offers a Custom Request option. This option offers more flexibility and allows you to type out JSON or XML, but is also much less forgiving. Unlike the POST, PUT, and GET methods, it does not automatically parse information for you.

Use Custom Request if your use case involves the following:

  • The PATCH or DELETE HTTP methods.
  • Sending a nested JSON array.
  • Sending empty values.
  • Extremely customized headers.

After you've selected the webhook option, click Continue.

2. Select the payload type

To make sure the request is sent in the way your app expects, select the correct format from the Payload Type dropdown menu.

There are three common serialization formats that you will see listed here: Form (also called URL-encoded), JSON, and XML. The following are examples of each format:

Form

first_name=Bryan&last_name=Helmig&age=27

JSON

{
  "first_name": "Bryan",
   "last_name": "Helmig",
   "age": 27
}

XML

<first_name>Bryan</first_name>
<last_name>Helmig</last_name>
<age>27</age>

You can also select Raw to send the request as-is. With this option, no data fields will be parsed.

3. Enter the URL to send the request to

In the URL field, enter the URL where your app’s API is able to receive requests.

It's recommended not to add URL parameters in this field. Instead, enter URL parameters in the Data fields.

4. Fill out the data fields

Fill out the Data section. If you’re using a templated action like PUT, POST, or GET (i.e. not a Custom Request), enter the key for the field on the left side, and the field value on the right. Data from previous steps can be used in the value field, and you can click the plus icon + to add more parameters if needed.

If you need to add nested values, you can define child objects by adding the parent object and a double underscore before the object. Below is an example of what this looks like when entered into the Data section. The | (pipe) symbol is used only to separate what goes in the left-side and the right-side fields, and doesn't need to be added to the Zap.

order | value
item__price | value
item__sku | value

That will turn into JSON that looks like this:

{"product": "value", "item": {"price": "value", "sku": "value"}}

For more detailed nesting, use the Custom Request action.

Using the Custom Request action

If you’re using Custom Request, type raw JSON (or other formats) directly into the Data field. Zapier will not parse or format this data for you and it will be sent exactly as entered, so it's recommended to use a JSON (or other) validator to verify that the syntax is correct.

miscEye icon Note

If you leave the Data section blank, all fields from the previous step will be sent as the Request Payload. If you see unexpected fields coming in from the Zap, check that the Data section for your webhook action has been filled.

5. Add headers and authentication

You can send specific headers by filling the fields in the Headers section.

You can also set up basic authentication (involving just a username and password, or username and API key) using the Basic Auth field.

miscEye icon Note

If your app requires more advanced authentication options, you can build a private app integration on Zapier’s Developer platform.

Additional resources

Learn more about:

Was this article helpful?
16 out of 48 found this helpful