In simple terms, a Webhook is basically a notification that is sent to a destination (URL) when an event occurs. With Zoho Forms, you can send a form submission to a URL or a third party web application of your choice as soon as a submission occurs.
If you are looking to process the data collected through Zoho Forms in your web application or use it in your business workflows, you can use Webhooks. You can receive form submissions as soon as it's collected without having to use APIs.
For example, you can directly store the collected data in your database, display it on your website, and do a lot more.
To configure a Webhook,
Click the Integrations tab from the form builder and select Webhooks from the left menu.
Click Configure Webhook and fill the following details:
|application/json||All except file attachments|
|application/x-www-form-urlencoded||All except form attachments and subform data|
|multipart/form-data||All except subform data|
See the response format for each content type here.
- Payload Parameters: Under this section, choose the fields whose data should be transferred using Webhooks.
- Under Payload Parameters, define a parameter name and choose the relevant form fields under Parameter Value.
- When using application/json content type, you can also transfer data from Subform using Webhooks.
- URL Parameters: If you would like to send additional information along with the collected data, you can specify it in this section. For example, you can include a secret key to every request being sent. This would help you in filtering out authenticate requests. These parameters will be added as query strings to the URL. Click on Add Parameters and enter the parameter name, value in the text boxes provided.
Example: If you have set up basic authentication for your webhook URL, you can receive a corresponding header by setting up the custom header as follows:
The custom header 'Authorization' will appear as:
Authorization: Basic dXNicm5hbWU6cGFzc3dvcmQ=
Note: The following must be noted while setting up a Custom Header :
- A standard (system) header cannot be redefined.
- A custom header name must contain alphanumeric characters only. Only special characters allowed are underscore (_), period(.), and hyphen(-).
- Duplicate names are not allowed.
- Click Save to save your settings and Webhooks will be enabled for this form.
- application/json - When you choose this content type, you will receive your response format as shown below.
"Name": "Richard Johnson",
"Dep_Name": "Elizabeth Parker",
"Dep_Name": "Michelle Johnson",
Using this content type, you can transfer Subform data from your form. However, you cannot transfer form attachments through Webhooks.
- application/x-www-form-urlencoded - When you choose this content type, you will receive your response format as shown below.
Using this content type, you cannot transfer form attachments and Subform data through Webhooks.
- multipart/form-data - When you choose this content type, you will receive your response format as shown below.
Using this content type, you cannot transfer Subform data through Webhooks. You cannot use this content type if you have configured the Manage Form Attachments option in your form.
Note: When using application/json or application/x-www-form-urlencoded content format, you can store your attachments in third-party cloud services using the Manage Form Attachments option and the link to the attachments can be sent through Webhooks.