This step adds the current contact to a specified Segment when reached in the Automation flow.
Common use cases:
- Cohorts — Add contacts to a cohort segment after a specific event.
- Lifecycle — Segment contacts as they progress through onboarding.
- Engagement — Group contacts who completed a specific action.
How it works
Using the dashboard
Using the API
Define a Add to segment step and select the segment from the dropdown.
The add_to_segment step accepts a single segment_id field.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.automations.create({
name: 'Tag VIP Users',
steps: [
{
key: 'start',
type: 'trigger',
config: { eventName: 'purchase.completed' },
},
{
key: 'vip_users',
type: 'add_to_segment',
config: {
segmentId: '83a1e324-26dc-47eb-9b28-ba8b6d1fe808',
},
},
],
connections: [{ from: 'start', to: 'vip_users', type: 'default' }],
});
Configuration
The ID of the segment to add the contact to.
{
"key": "add_to_vip",
"type": "add_to_segment",
"config": {
"segment_id": "83a1e324-26dc-47eb-9b28-ba8b6d1fe808"
}
}