Webhooks setup guide
Ingesting webhook events into Propel
This guide will show you how to send JSON events to Propel over HTTPS from any application or SaaS service.
You will learn how to:
Requirements
- You have a Propel account.
Step 1: Create a Webhook Data Pool
Navigate to Data Pools
In the Console, click on “Data Pools” in the left-hand menu. Click on “Create Data Pool” and select “Webhook”.
Define the schema
The default schema contains two columns:
Column | Type | Description |
---|---|---|
_propel_received_at | TIMESTAMP | The timestamp when the event was collected in UTC. |
_propel_payload | JSON | The JSON Payload of the event. |
In the Payload section on the right-hand side, you can enter or paste a sample JSON event. This feature allows you to:
- Visualize the structure of your incoming data
- Automatically extract top-level and nested JSON keys
- Create specific columns for these extracted keys
By providing a sample event, you can easily customize your Data Pool’s schema to match your data structure.
For this guide, we’ll use the TacoSoft sample data:
After adding the sample JSON, click on “Extract nested properties” to create columns representing the nested JSON keys.
Set created_at
as your default timestamp. Click “Next”.
If a required field is missing from the sample event, Propel will reject the event with an HTTP 400 Bad Request
error.
Configure Authentication
Configure authentication for your webhook URL:
- To enable HTTP basic authentication, specify a username and password.
- For initial testing, you can leave these fields blank.
- You can always edit these settings later.
After configuring (or skipping) authentication, click “Next” to proceed.
Configure data type and settings
Select whether your data is “Append-only” or “Mutable data”.
To learn more, read out guide on Selecting table engine and sorting key.
Answer the questions in the wizard to complete the setup.
Confirm your table settings and click “Continue”.
Set a name and description
Enter a name and description for your new Data Pool and click “Next”.
After creating the Data Pool, you’ll be provided with a unique HTTP URL. This URL is where you’ll send your JSON data for ingestion.
Step 2: Send events to the Webhook Data Pool
Prepare your data
Create a JSON array of events you want to send to the Webhook Data Pool.
Here’s an example:
Send the data
Send a POST request to the Webhook Data Pool’s URL using curl or any HTTP client. Here’s an example using curl:
Check the response
You should expect a 200 OK
with multiple “Event processed successfully” messages in the body of the response, one for each event.
Step 3: View your events in the Data Pool
Navigate to your Data Pool
Click on “Data Pools” in the Console, and then select your Data Pool.
View the data
Head over to the “Preview Data” tab, and you should see the events data as POSTed, reflected in the schema we defined.