Skip to main content
All CollectionsIntegrations
Configuring webhooks
Configuring webhooks

In Claspo you can configure webhooks and send the data collected using the widgets to any marketing software.

V
Written by Vitalii Shumilov
Updated over a month ago

Adding webhooks integration

To add the webhook integration to the Claspo widget:

  1. When creating a new widget, click + Add integration on the Integrations step.

    Or,

    When editing the existing widget, go to Widgets → select the widget → Integrations and click + Add integration.

  2. Select Webhooks from the list of apps.

    The New Webhook' window opens where you can configure the webhook settings. See the following section.

Configuring webhook settings

Configure the webhook settings as described in the sections below, then click Done.

Entering integration name

By default, the widget's name is used as the webhook’s Integration name. To change it, enter the new name in the Integration name field.

Configuring webhook connection

To configure the webhook connection:

  1. Enter the webhook URL in the corresponding field. Only HTTPS protocol is supported.

  2. To use authentication, toggle the Authentication slide button and select the authentication method from the dropdown menu.

  3. Enter the authentication parameters depending on the selected authentication method:

  • Bearer token: Enter the access token in the Token field.

  • Basic: Enter webhook access login and password in the corresponding fields.


NOTE

You can use headers for other types of authentication, for example, using an API key.


Adding headers

Webhook integration in Claspo has two default (standard) headers:

  • Content-Type

  • User-Agent

To add custom headers:

  1. Click + Add header in the Headers section.

  2. Enter the header’s key and value in the corresponding columns.

Editing webhook body

By default, our system adds the fields used in the widget. In the Body section, you can edit the fields, which data you want to send to your webhook destination.

There are two types of fields you can add to the webhook body:

  • Widget fields: Those are the contact fields you add when editing a Claspo template. For example, email, first name, last name, phone number.

  • System fields: Those are the fields depending on the site where a widget is displayed. For example, site language, browser, operation system, device.

You can remove or add the fields in the JSON code in the Body section.

To add more fields:

  1. Add the new line with the field parameter in the JSON code. For example, country.

  2. Place the cursor between the straight quotation marks that must contain the field’s value.

  3. Expand the Paste field name dropdown menu and start typing the field name in the Field search box or,

    Scroll down and select the field from the list.

    The field’s value is added in the required format.


NOTE

  • All the variables in the code must be contained in straight quotation marks (""). For example, {"email": "{{email}}"}.

  • When a variable is substituted with a value, the value type becomes a string.

  • If your widget has an optional field and it is not filled in by the site visitor, the empty value is passed.

  • When the form is filled, the variables in the double curly brackets will be substituted with values.


Our system instantly validates the entered code and shows error messages.

The following example shows the Invalid JSON format message because of the missing comma.

In case of a typo in the variable name, the displayed error message is Variable not found:{{variable name}}.

Did this answer your question?