After creating a webhook, you define the events in your application tables that will trigger this webhook to send data to another system. For example, you can define an event in which the webhook will be sent every time a new record is added to a table. Learn how to do this with Caspio UI and REST API.

Note: If multiple changes occur, the webhook messages might be sent in different order than the sequence in which those changes happened. To capture the time when each of the changes occurred, use the occurredAt property in the event payload. 

For information about the available events, see Event types.

Steps to create an event in Caspio platform

  1. In the left panel on the main screen, click Webhooks. 
  2. In the list of webhooks, hover over a webhook for which you want to configure an event, and then click Open. 
  3. In the upper-right corner of the Events tab, click Create event. 
  4. In the Details section, in the Object field, select a table for which you want to trigger the webhook.Details section of the Create event panel that shows basic settings for an event.
  5. In the Event type field, select the action in the source object that triggers the webhook. 
  6. For the table.recordUpdate event type, select the fields that you want to trigger the webhook:
    • If you want changes in any table field to trigger the webhook, click All fields.
      This option applies to all the fields that are currently in the table and any fields that you add to this table in the future.
    • If you want specific fields to trigger the webhook, click Selected fields, and then select the checkboxes for the specific fields.

    For table.recordUpdate events, a webhook sends a message only if a field value changes.

  7. Optional: If you do not want the event to start checking for updates right after you save it, clear the Active checkbox. 
  8. In the Payload section, specify what content you want to send to the destination service:
    • To send data from all the table fields, click Include all fields.
      This option applies to all the fields that are currently in the table and any fields that you add to this table in the future.
    • To send data from specific table fields, click Include selected fields, and then select the fields that you want to send in the webhook payload.
      The Payload section showing the selection of five fields, along with the sample payload structure.
      The payload preview is updated based on your selection.
  9. Save your settings by clicking Create or Create and add another if you want to define more events. 

Steps to create an event through Caspio REST API

Use the following operations to programmatically create and manage webhook events through Caspio REST API. For a full list of available operations, see our Swagger UI documentation.