Send events to Twilio’s Segment and trigger workflows using your chatbot agent. Learn how to configure the Segment block, find your Write Key, and use actions like Identify, Alias, Event, and Page.
The Segment block enables you to send events to Twilio’s Segment and trigger workflows. It utilizes the Segment Analytics Node.js library to send server-side events, ensuring compatibility with non-web browser devices.
In the following example, we will configure the Track action to send user information to Segment.
Create a new block group and collect user data (Name, Username, and Email).
We can use a random variable to create a random userID.
Add user input blocks to collect user data.
Add the Segment block and select the Track action.
Fill in the required parameters:
User ID: Use the variable that holds the random user ID.
Email: Use the variable that holds the user’s email address.
Here is an overview of a simple flow that collects user data and sends it to Segment using the Track action.
Once configured, the Segment block will send the user information to Segment using the Identify action.
When we run the scenario, the Segment block will send the user information to Segment using the Track action.
And once we check the Segment dashboard, we can see the event was received successfully.
If we check the source debugger, we can see the event details and the properties sent to Segment.