Twilio Segment setup guide
Ingesting events from Twilio Segment to Propel
This guide covers how to:
Requirements
- You have a Propel account.
- You have a Segment account.
Step 1: Create a Segment Data Pool
First, create a Segment Data Pool in Propel.
This will give you a dedicated HTTP endpoint for Segment to send events to.
Navigate to Data Pools
In the Console, click on “Data Pools” in the left-hand menu. Click on “Create Data Pool” and select “Twilio Segment”.
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 value in the records[i].data of the event. |
On the right, you’ll see a sample Segment event.
With the sample event or your own, you can:
- Extract top-level properties to create columns representing the top-level keys.
- Extract nested properties to create columns representing the nested JSON keys.
If a required field is missing from the sample event, Propel will reject the event with an HTTP 400 Bad Request
error.
Configure Authentication
You can enable basic authentication to secure your endpoint.
After configuring, click “Next” to proceed.
Configure the table settings
Select “Append-only”.
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 endpoint.
You’ll need this endpoint and key to configure your Segment webhook destination.
Step 2: Create the Segment webhook destination
Once you have the Data Pool created, we’ll need to create a Segment webhook destination that sends events to Propel.
Go to the 'Destinations' section of your Segment workspace
Once you are in the “Destinations” section of your Segment workspace, click on “Create Destination”.
Search and select Webhooks
Search for “Webhooks” and select it.
Click “Add Destination”.
Select a source for the destination
Select the source you want to send events to and click “Next”.
Give the destination a name and create it
Name your destination “Propel”, then click “Create destination”.
Create a mapping
Click “Mappings” tab and click “New mapping”.
Select the “Send an HTTP request” action, define the event trigger, and load a sample event. You’ll need the sample event to test your destination.
Enter your Segment Data Pool HTTP endpoint, “POST” as the method, and select batching of 500 events.
Finally, to test your destination, click “Send test event”.
Step 3: Preview data in Propel
Once events are in your Segment webhook destination, they are ingested directly to Propel.
By going to your Data Pool and clicking “Preview Data”, you’ll be able to see the records as they land.