Reference · Tools
Customer.io
Interact with the Customer.io marketing automation platform to manage customers, track events, retrieve campaign data and metrics, and manage segment membership.
The Customer.io node manages customer profiles, tracks behavioural events, reads campaign details and metrics, and adds or removes people from manual segments. The credential's region setting decides whether calls go to the Global or EU tracking host. A typical build is upserting a customer on signup, then tracking each meaningful action as an event that campaigns can react to.
- Node type
- Action
- Parameters
- 28
- Outputs
- Output, Error
- Credentials
- Customer.io API
Customer.io
Marketing automation — manage customers, track events, campaigns, and segments in Customer.io.
Overview
Customer.io is a marketing automation platform. This tool supports: creating/updating/deleting customers via the Tracking API, tracking customer and anonymous events, retrieving campaign details and metrics via the App API, and adding/removing customers from manual segments. The region setting on the credential determines which tracking hostname is used (Global or EU).
Category: Communication
Tool Name: customer_io
Version: 1
Appearance: Icon: lucide-Users | Color: #4BC2DF
Node Type
Action — processes input items and produces output
Input / Output
| Direction | Port(s) |
|---|---|
| Input | Input |
| Output | Output, Error |
Credentials
This tool requires Customer.io API credentials. See the Credentials Guide for setup instructions.
Resources
| Resource | Value |
|---|---|
| Campaign | campaign |
| Customer | customer |
| Event | event |
| Segment | segment |
Operations
| Resource | Operation | Value | Description |
|---|---|---|---|
| Campaign | Get | get | Retrieve a single campaign’s details |
| Campaign | Get Many | getAll | Retrieve every campaign in the workspace |
| Campaign | Get Metrics | getMetrics | Retrieve a campaign’s delivery metrics over time |
| Customer | Create or Update | upsert | Create a customer, or update them if the ID already exists |
| Customer | Delete | delete | Delete a customer |
| Event | Track | track | Track an event against a known customer |
| Event | Track Anonymous | trackAnonymous | Track an event with no customer attached |
| Segment | Add Customer | add | Add customers to a manual segment |
| Segment | Remove Customer | remove | Remove customers from a manual segment |
Parameters
Campaign: Get Many takes no parameters of its own — see All Operations.
Campaign: Get
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Campaign ID | number | Yes | 0 | The unique identifier for the campaign. Supports expressions. |
Campaign: Get Metrics
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Campaign ID | number | Yes | 0 | The unique identifier for the campaign. Supports expressions. |
| Period | options | No | days | Specify the metric period. |
Options: hours, days, weeks, months | ||||
| JSON Parameters | boolean | No | false | Whether to supply the additional fields as raw JSON instead of the structured field list. |
Additional Fields (additionalFieldsJson) | json | No | — | Additional fields as raw JSON object. (shown when JSON Parameters is true) |
Additional Fields (additionalFields) | collection | No | {} | Additional fields in structured form. (shown when JSON Parameters is false) |
| — Steps | number | No | 0 | Number of time periods to return. Max: 24 hours, 45 days, 12 weeks, 120 months. |
| — Type | options | No | empty | Specify the metric type. |
Options: email, empty (no type filter — return the campaign’s combined metrics), push, slack, twilio, urbanAirship, webhook |
Customer: Create or Update
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ID | string | Yes | — | The unique identifier for the customer. Supports expressions. |
| JSON Parameters | boolean | No | false | Whether to supply the additional fields as raw JSON instead of the structured field list. |
Additional Fields (additionalFieldsJson) | json | No | — | Additional customer fields as raw JSON. (shown when JSON Parameters is true) |
Additional Fields (additionalFields) | collection | No | {} | Additional customer fields in structured form. (shown when JSON Parameters is false) |
| — Custom Properties | fixedCollection | No | {} | Your own attributes on the customer profile. Add one entry per property. |
| — — Key | string | Yes | — | Property name. |
| — — Value | string | Yes | — | Property value. |
string | No | — | The email address of the customer. | |
| — Created At | dateTime | No | — | The date/time the customer was created. Will be converted to UNIX timestamp (seconds). |
Customer: Delete
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| ID | string | Yes | — | The unique identifier for the customer. Supports expressions. |
Event: Track
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Customer ID | string | Yes | — | The unique identifier for the customer. Supports expressions. |
| Event Name | string | No | — | The name of the event to track. A value is required for the call to succeed. |
| JSON Parameters | boolean | No | false | Whether to supply the additional fields as raw JSON instead of the structured field list. |
Additional Fields (additionalFieldsJson) | json | No | — | Additional event fields as raw JSON. (shown when JSON Parameters is true) |
Additional Fields (additionalFields) | collection | No | {} | Additional event fields in structured form. (shown when JSON Parameters is false) |
| — Custom Attributes | fixedCollection | No | {} | Custom key-value attributes for the event. |
| — — Key | string | Yes | — | Attribute name. |
| — — Value | string | Yes | — | Attribute value. |
| — Type | string | No | — | Used to change event type. For Page View events, set to “page”. |
Event: Track Anonymous
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Event Name | string | Yes | — | The name of the event to track. Supports expressions. |
| JSON Parameters | boolean | No | false | Whether to supply the additional fields as raw JSON instead of the structured field list. |
Additional Fields (additionalFieldsJson) | json | No | — | Additional event fields as raw JSON. (shown when JSON Parameters is true) |
Additional Fields (additionalFields) | collection | No | {} | Additional event fields in structured form. (shown when JSON Parameters is false) |
| — Custom Attributes | fixedCollection | No | {} | Custom key-value attributes for the event. |
| — — Key | string | Yes | — | Attribute name. |
| — — Value | string | Yes | — | Attribute value. |
Segment: Add Customer
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Segment ID | number | Yes | 0 | The unique identifier of the manual segment. Supports expressions. |
| Customer IDs | string | Yes | — | Comma-separated list of customer IDs to add to or remove from the segment. |
Segment: Remove Customer
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Segment ID | number | Yes | 0 | The unique identifier of the manual segment. Supports expressions. |
| Customer IDs | string | Yes | — | Comma-separated list of customer IDs to add to or remove from the segment. |
All Operations
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Max Concurrency | number | No | 10 | Maximum number of items to process concurrently. |
Output Data
The response is merged into the item JSON — the incoming fields pass through and binary data is forwarded.
| Resource / Operation | Output |
|---|---|
Campaign / get | One item carrying the campaign record |
Campaign / getAll | One item per campaign in the workspace |
Campaign / getMetrics | One item carrying the metric series for the campaign |
Customer / upsert | One item with id plus the profile fields that were written — email, created_at (a UNIX timestamp in seconds) and data holding your custom properties. Customer.io returns an empty body on success, so the node reports back what it stored |
Customer / delete | success: true |
Event / track | success: true |
Event / trackAnonymous | success: true |
Segment / add | success: true |
Segment / remove | success: true |
Reference a field downstream by expression, e.g. {{ $json.id }}.
Usage Examples
- Create or update a customer in Customer.io
- Track a customer event in Customer.io
- Get all campaigns from Customer.io
- Add a customer to a segment in Customer.io
- Delete a customer from Customer.io
Example Configuration
Get one campaign:
{
"type": "customer_io",
"parameters": {
"resource": "campaign",
"operation": "get",
"campaignId": 123
}
}
List every campaign:
{
"type": "customer_io",
"parameters": {
"resource": "campaign",
"operation": "getAll"
}
}
Get five days of email metrics for a campaign:
{
"type": "customer_io",
"parameters": {
"resource": "campaign",
"operation": "getMetrics",
"campaignId": 456,
"period": "days",
"jsonParameters": false,
"additionalFields": {
"steps": 5,
"type": "email"
}
}
}
The same request with the additional fields supplied as raw JSON:
{
"type": "customer_io",
"parameters": {
"resource": "campaign",
"operation": "getMetrics",
"campaignId": 456,
"period": "weeks",
"jsonParameters": true,
"additionalFieldsJson": "{\"steps\": 10, \"type\": \"push\"}"
}
}
Create or update a customer with custom properties:
{
"type": "customer_io",
"parameters": {
"resource": "customer",
"operation": "upsert",
"id": "{{ $json.userId }}",
"jsonParameters": false,
"additionalFields": {
"email": "john.doe@example.com",
"createdAt": "2024-01-15T10:30:00Z",
"customProperties": {
"customProperty": [
{ "key": "subscription", "value": "premium" },
{ "key": "region", "value": "us-west" }
]
}
}
}
}
Delete a customer:
{
"type": "customer_io",
"parameters": {
"resource": "customer",
"operation": "delete",
"id": "user123"
}
}
Track a purchase against a known customer:
{
"type": "customer_io",
"parameters": {
"resource": "event",
"operation": "track",
"customerId": "{{ $json.userId }}",
"eventName": "purchase_completed",
"jsonParameters": false,
"additionalFields": {
"customAttributes": {
"customAttribute": [
{ "key": "amount", "value": "99.99" },
{ "key": "currency", "value": "USD" }
]
}
}
}
}
Track an event with no customer attached:
{
"type": "customer_io",
"parameters": {
"resource": "event",
"operation": "trackAnonymous",
"eventName": "newsletter_signup",
"jsonParameters": false,
"additionalFields": {
"customAttributes": {
"customAttribute": [
{ "key": "source", "value": "homepage" }
]
}
}
}
}
Add several customers to a manual segment in one call:
{
"type": "customer_io",
"parameters": {
"resource": "segment",
"operation": "add",
"segmentId": 789,
"customerIds": "user123,user456,user789"
}
}
Remove a customer from a segment:
{
"type": "customer_io",
"parameters": {
"resource": "segment",
"operation": "remove",
"segmentId": 789,
"customerIds": "user456"
}
}
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
Use Customer.io to manage customers, track events, view campaigns, and manage segment membership in the Customer.io marketing automation platform.
Notes
- Create or Update is an upsert. The ID you pass is the customer’s identifier in Customer.io — a new profile is created if it does not exist, and merged into if it does.
- Event Name must be set on Event: Track, even though the field is not marked required in the editor; the call fails without it.
- Additional Fields as raw JSON must be a JSON string, not an object — for example
"{\"steps\": 10}". Anything that is not valid JSON is skipped rather than sent. - Custom Properties and Custom Attributes use their group key. The entries go under
customProperties.customPropertyandcustomAttributes.customAttributerespectively, each a{ "key": …, "value": … }object. - Created At is converted to a UNIX timestamp in seconds before it is sent.
- Segments must be manual. Add Customer and Remove Customer only apply to manual segments; membership of a data-driven segment is computed by Customer.io and cannot be edited here.
- Customer IDs is one comma-separated string, so a single node run can move a whole batch of customers in or out of a segment.
Choosing between the two Additional Fields inputs
- Leave JSON Parameters off to pick fields from the structured list — the editor validates them and shows you what each one does.
- Turn it on to build the whole field object with an expression, which is the right choice when the shape is decided at run time.
Frequently asked questions
Does Create or Update overwrite an existing customer?
It is an upsert. The ID you pass is the customer's identifier in Customer.io — a profile is created if none exists and merged into if one does, so you can call it repeatedly without duplicating people.
Why does Event: Track fail without an obvious reason?
Event Name is required even though the editor does not mark it as such. The call fails without it, which is the most common cause of a Track step erroring immediately.
Why is my raw-JSON additional-fields value being skipped?
It has to be a JSON string, not an object — for example `"{\"steps\": 10}"`. Anything that is not valid JSON is dropped rather than sent, so nothing errors and the field simply never arrives.
Can I add someone to any segment?
Only manual segments. Membership of a data-driven segment is computed by Customer.io from its own rules and cannot be edited through the API. Customer IDs is a single comma-separated string, so one run can move a whole batch.
Build with the Customer.io node
Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Customer.io API credentials first.
Open BusyBotLast updated . Spotted something wrong? Tell us.