Reference · Tools
Segment
Customer data platform for identifying users, tracking events, recording page views, and grouping users
The Segment node sends identify, track, page and group calls into Segment, which then fans them out to whichever destinations you have configured. A typical build is emitting server-side events from a workflow so they reach every analytics tool at once rather than being wired up individually.
- Node type
- Action
- Parameters
- 24
- Outputs
- Output, Error
- Credentials
- Segment API
Segment
Send identify, track, page, and group calls to Segment
Overview
Segment is a customer data platform (CDP). This tool integrates with the Segment HTTP Tracking API to let you identify users with traits, track events with properties, record page views, and associate users with groups. All data sent through Segment is routed to your connected destinations (analytics, warehouses, marketing tools, etc.).
Category: Analytics
Tool Name: segment
Version: 1
Appearance: Icon: lucide-BarChart | Color: #52BD94
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Segment API credentials. See the Credentials Guide for setup instructions.
Resources
| Resource | Value |
|---|---|
| Group | group |
| Identify | identify |
| Track | track |
Operations
Each resource has its own Operation list. Pick the resource first, then the operation.
| Resource | Operation | Value | Description |
|---|---|---|---|
| Group | Add | add | Add a user to a group |
| Identify | Create | create | Create an identity |
| Track | Event | event | Record the actions your users perform. Every action triggers an event, which can also have associated properties. |
| Track | Page | page | Record page views on your website, along with optional extra information about the page being viewed |
Parameters
Traits and Properties hold a list of key/value pairs, so their group key (traitsUi, propertiesUi) takes an array. Context and Integration hold a single record each, so their group key (contextUi, integrationsUi) takes one object.
Group: Add
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| User ID | string | No | — | The ID for the user. If omitted, an anonymous ID will be generated. |
| Group ID | string | Yes | — | A Group ID is the unique identifier which you recognize a group by in your own database. |
| Traits | fixedCollection | No | {} | Free-form dictionary of traits of the group, like name or employee count. Add one entry per trait. |
| — Key | string | No | — | — |
| — Value | string | No | — | — |
| Context | fixedCollection | No | {} | A dictionary of extra context for the call. |
| — Active | boolean | No | false | Whether a user is active |
| — IP | string | No | — | Current user’s IP address |
— Locale (locate) | string | No | — | Locale string for the current user, for example en-US |
| — Page | string | No | — | Dictionary of information about the current page in the browser, containing hash, path, referrer, search, title and URL |
| — Timezone | string | No | — | Timezones are sent as tzdata strings to add user timezone information, for example America/New_York |
| — App | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Version | string | No | — | — |
| — — Build | string | No | — | — |
| — Campaign | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Source | string | No | — | — |
| — — Medium | string | No | — | — |
| — — Term | string | No | — | — |
| — — Content | string | No | — | — |
| — Device | fixedCollection | No | {} | — |
| — — ID | string | No | — | — |
| — — Manufacturer | string | No | — | — |
| — — Model | string | No | — | — |
| — — Name | string | No | — | — |
| — — Type | string | No | — | — |
| — — Version | string | No | — | — |
Integration (integrations) | fixedCollection | No | {} | A dictionary of destinations to enable or disable. |
| — All | boolean | No | true | — |
| — Salesforce | boolean | No | false | — |
Identify: Create
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| User ID | string | No | — | The ID for the user. If omitted, an anonymous ID will be generated. |
| Traits | fixedCollection | No | {} | Free-form dictionary of traits of the user, like email or name. Add one entry per trait. |
| — Key | string | No | — | — |
| — Value | string | No | — | — |
| Context | fixedCollection | No | {} | A dictionary of extra context for the call. |
| — Active | boolean | No | false | Whether a user is active |
| — IP | string | No | — | Current user’s IP address |
— Locale (locate) | string | No | — | Locale string for the current user, for example en-US |
| — Page | string | No | — | Dictionary of information about the current page in the browser, containing hash, path, referrer, search, title and URL |
| — Timezone | string | No | — | Timezones are sent as tzdata strings to add user timezone information, for example America/New_York |
| — App | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Version | string | No | — | — |
| — — Build | string | No | — | — |
| — Campaign | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Source | string | No | — | — |
| — — Medium | string | No | — | — |
| — — Term | string | No | — | — |
| — — Content | string | No | — | — |
| — Device | fixedCollection | No | {} | — |
| — — ID | string | No | — | — |
| — — Manufacturer | string | No | — | — |
| — — Model | string | No | — | — |
| — — Name | string | No | — | — |
| — — Type | string | No | — | — |
| — — Version | string | No | — | — |
Integration (integrations) | fixedCollection | No | {} | A dictionary of destinations to enable or disable. |
| — All | boolean | No | true | — |
| — Salesforce | boolean | No | false | — |
Track: Event
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| User ID | string | No | — | The ID for the user. If omitted, an anonymous ID will be generated. |
| Event | string | Yes | — | Name of the action that a user has performed. |
| Context | fixedCollection | No | {} | A dictionary of extra context for the call. |
| — Active | boolean | No | false | Whether a user is active |
| — IP | string | No | — | Current user’s IP address |
— Locale (locate) | string | No | — | Locale string for the current user, for example en-US |
| — Page | string | No | — | Dictionary of information about the current page in the browser, containing hash, path, referrer, search, title and URL |
| — Timezone | string | No | — | Timezones are sent as tzdata strings to add user timezone information, for example America/New_York |
| — App | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Version | string | No | — | — |
| — — Build | string | No | — | — |
| — Campaign | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Source | string | No | — | — |
| — — Medium | string | No | — | — |
| — — Term | string | No | — | — |
| — — Content | string | No | — | — |
| — Device | fixedCollection | No | {} | — |
| — — ID | string | No | — | — |
| — — Manufacturer | string | No | — | — |
| — — Model | string | No | — | — |
| — — Name | string | No | — | — |
| — — Type | string | No | — | — |
| — — Version | string | No | — | — |
Integration (integrations) | fixedCollection | No | {} | A dictionary of destinations to enable or disable. |
| — All | boolean | No | true | — |
| — Salesforce | boolean | No | false | — |
| Properties | fixedCollection | No | {} | A dictionary of properties for the event. Add one entry per property. |
| — Key | string | No | — | — |
| — Value | string | No | — | — |
Track: Page
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| User ID | string | No | — | The ID for the user. If omitted, an anonymous ID will be generated. |
| Name | string | No | — | Name of the page. For example, most sites have a “Signup” page that can be useful to tag, so you can see users as they move through your funnel. |
| Context | fixedCollection | No | {} | A dictionary of extra context for the call. |
| — Active | boolean | No | false | Whether a user is active |
| — IP | string | No | — | Current user’s IP address |
— Locale (locate) | string | No | — | Locale string for the current user, for example en-US |
| — Page | string | No | — | Dictionary of information about the current page in the browser, containing hash, path, referrer, search, title and URL |
| — Timezone | string | No | — | Timezones are sent as tzdata strings to add user timezone information, for example America/New_York |
| — App | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Version | string | No | — | — |
| — — Build | string | No | — | — |
| — Campaign | fixedCollection | No | {} | — |
| — — Name | string | No | — | — |
| — — Source | string | No | — | — |
| — — Medium | string | No | — | — |
| — — Term | string | No | — | — |
| — — Content | string | No | — | — |
| — Device | fixedCollection | No | {} | — |
| — — ID | string | No | — | — |
| — — Manufacturer | string | No | — | — |
| — — Model | string | No | — | — |
| — — Name | string | No | — | — |
| — — Type | string | No | — | — |
| — — Version | string | No | — | — |
Integration (integrations) | fixedCollection | No | {} | A dictionary of destinations to enable or disable. |
| — All | boolean | No | true | — |
| — Salesforce | boolean | No | false | — |
| Properties | fixedCollection | No | {} | A dictionary of properties for the page. Add one entry per property. |
| — Key | string | No | — | — |
| — Value | string | No | — | — |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. Accepts 1–100. |
Output Data
Every operation is a 1-to-1 call: one input item produces exactly one output item, and no operation fans out. The Segment response is merged onto the input item’s JSON — the item passes through with the response fields added on top, plus a _segment block recording what was sent. Binary data on the input item is forwarded unchanged.
{
"_segment": {
"resource": "track",
"operation": "event",
"success": true
}
}
resourceandoperationecho the values used for that item, which is useful when the node is driven by expressions and each item takes a different path.successreflects the tracking API’s acknowledgement that the call was accepted. Segment accepts calls asynchronously, so it confirms receipt rather than delivery to your destinations.- A rejected call raises an item error instead, which your Error Handling mode routes.
Usage Examples
- Identify a user with traits like email and name
- Track a “Purchase Completed” event with price property
- Record a page view for “Pricing Page”
- Add a user to a company group
Example Configuration
Create a user identity with traits:
{
"type": "segment",
"parameters": {
"resource": "identify",
"operation": "create",
"userId": "{{ $json.userId }}",
"traits": {
"traitsUi": [
{ "key": "email", "value": "{{ $json.email }}" },
{ "key": "name", "value": "John Smith" },
{ "key": "plan", "value": "premium" }
]
},
"context": {
"contextUi": {
"active": true,
"ip": "192.168.1.100",
"timezone": "America/New_York"
}
}
}
}
Record a purchase event and fan it out to every destination:
{
"type": "segment",
"parameters": {
"resource": "track",
"operation": "event",
"userId": "{{ $json.userId }}",
"event": "Purchase Completed",
"properties": {
"propertiesUi": [
{ "key": "revenue", "value": "149.99" },
{ "key": "product_id", "value": "prod_789" },
{ "key": "currency", "value": "USD" }
]
},
"integrations": {
"integrationsUi": {
"all": true,
"salesforce": true
}
}
}
}
Record a page view with device context:
{
"type": "segment",
"parameters": {
"resource": "track",
"operation": "page",
"userId": "{{ $json.userId }}",
"name": "Pricing Page",
"properties": {
"propertiesUi": [
{ "key": "url", "value": "https://example.com/pricing" },
{ "key": "referrer", "value": "https://google.com" }
]
},
"context": {
"contextUi": {
"active": true,
"page": "https://example.com/pricing",
"device": {
"deviceUi": {
"type": "desktop",
"manufacturer": "Apple",
"model": "MacBook Pro"
}
}
}
}
}
}
Associate a user with a company account:
{
"type": "segment",
"parameters": {
"resource": "group",
"operation": "add",
"userId": "{{ $json.userId }}",
"groupId": "{{ $json.accountId }}",
"traits": {
"traitsUi": [
{ "key": "name", "value": "Acme Corporation" },
{ "key": "industry", "value": "Technology" },
{ "key": "employees", "value": "250" }
]
},
"context": {
"contextUi": {
"active": true,
"ip": "203.0.113.10"
}
}
}
}
Track an event without a user ID — Segment receives a generated anonymous ID instead:
{
"type": "segment",
"parameters": {
"resource": "track",
"operation": "event",
"event": "Page Viewed",
"properties": {
"propertiesUi": [
{ "key": "page_title", "value": "Homepage" }
]
}
}
}
Error Handling
| Mode | Behavior |
|---|---|
| stop | Halts workflow on first error |
| continue | Skips failed items, passes successful ones through |
| errorPort | Routes failed items to Error output port |
Tips
Send identify, track, page, and group calls to Segment customer data platform.
Parameter Dependencies
- The Operation list depends on the selected Resource, and the remaining parameters depend on the resource/operation pair.
- User ID is optional everywhere. Leave it empty and a fresh anonymous ID is generated for that call, so anonymous traffic still reaches your destinations — but two calls for the same visitor will not be linked.
- Every fixed collection nests under its own group key:
traitsUi,propertiesUi,contextUi,integrationsUi, and — inside context —appUi,campaignUi,deviceUi.
Choosing a Resource
- Identify writes who the user is: durable traits like email, name or plan.
- Track writes what the user did: a named action with properties, or a page view.
- Group ties an identified user to an account or organization, which is what B2B destinations key their reporting on.
Frequently asked questions
Is User ID required?
No, it is optional everywhere. Leave it empty and a fresh anonymous ID is generated for that call, so anonymous traffic still reaches your destinations — but two calls for the same visitor will not be linked to each other.
Which call type should I use?
Identify to attach traits to a person, track for an event they performed, page for a page or screen view, and group to associate them with an account or organisation.
Why do the parameters keep changing?
The operation list depends on the selected resource, and the remaining parameters depend on the resource and operation pair.
Which credential does it need?
A Segment API credential for the source you are writing into.
Build with the Segment node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Segment API credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.