Webhooks | Configuring a Webhook - Zoho Forms

Configuring a Webhook

In simple terms, a webhook is a way for one system or application to send real-time data to another system or application as soon as an event occurs. 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 form entry is received.

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, 
  1. Click the Integrations tab under Developer & Automation, select Webhooks.

  2. Click Configure Webhook and fill the following details:
    Webhooks configuration

    • Webhook URL: The URL to which the form submission should be sent.

    • Content Type:  We send notifications to your Webhook URL through an HTTP POST request. The request body, containing the form data will be sent in one of these content formats:
      Content-Type
      Data Transferred
      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 typhere

    • Authorization TypeSelect the desired Authorization type to be either General or one that is a configured connection in the Control Panel. If you choose Connections to be the Authorization Type, you can choose the appropriate connection from the list in Connection Name
      If a new connection is added, click the refresh icon next to the Connection Name dropdown list to select the newly added connection. Read more on creating connections.
      Notes
      Note: The Connection Name will only list the existing active connections. Read more about Connections.

    • Payload Parameters: Under this section, choose the fields whose data should be transferred using Webhooks.

      1. Under Payload Parameters, define a parameter name and choose the relevant form fields under Parameter Value.
      2. When using application/json content type, you can also transfer data from Subform using Webhooks.
      3. When using Payment field in the form, you can transfer the payment details via Webhooks. The supported fields are: Payment Amount, Payment Status, Payment Currency and Payment Transaction ID. Zoho Forms typically passes the transaction status and the form submission asynchronously, since the form submission and the payment status isn't done at the same time.

        How do asynchronous payment transactions work? 
        After the form submission, the respondent is redirected to the payment site. Initially, a pending status via webhooks is sent for the payment transactions within a few seconds. The final response is known only when the merchant initiates the transaction.
Note: We recommend enabling the workflow option while setting up the Payment field. This ensures that the real-time Payment Status and Transaction ID are sent via webhooks, instead of the pending status.
  1. 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. 

  2. Custom Headers: You can set a custom header name and value to be passed with your collected data. 

    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:
    Custom Headers

    The custom header 'Authorization' will appear as:

    Authorization: Basic dXNicm5hbWU6cGFzc3dvcmQ= 

Notes

Note: The following must be noted while setting up a Custom Header :

  1. A standard (system) header cannot be redefined. 
  2. A custom header name must contain alphanumeric characters only. Only special characters allowed are underscore (_), period(.), and hyphen(-).
  3. Duplicate names are not allowed.
Click Save to save your settings and Webhooks will be enabled for this form.
InfoTo learn about whitelist IP addresses, click here.

How to re-push values into an integrated service after fixing the cause of integration failure?

  1. Go to the All Entries section of your form.
  2. Click the filter-by All Entries dropdown in the top-left corner.
  3. Scroll down and select Webhooks - Failed Entries option from the list.
    Failed entries
  4. Select the failed entries and click Re-push.
Notes
Note: You can re-push the failed entries only twice.

Set Alert on Integration Failure

Once your integration settings are saved, you can choose to receive an email alert if the integration fails.
To do so,
  1. Click Set Alert in the top-right corner.
  2. Configure the email alert template and click Save.
    Integration Failure Alert
  3. To stop receiving email alerts on integration failure, click Remove Alert.
Notes
Note:
  1. The option to set an email alert on integration failure is available only in our paid plans.
  2. You can send email alerts to a maximum of 5 users within your organization.
  3. An email alert will be triggered only on the first occurrence of integration failure every 24 hours.