View as Markdown
Customer.io icon

Customer.io ACTION

Add Customers to Segment

Add people to a manual segment by ID. You are limited to 1000 customer IDs per request. See the docs here
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Customer.io account once, then configure and run Add Customers to Segment from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "customer_io-add-customers-to-segment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    customer_io: { authProvisionId: "apn_xxxxxxx" },
    customerIds: ["Customer ID"],
    segmentId: "Segment ID",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Add Customers to Segment inputs
Property Type Description
customerIds Customer ID string[]
The customer IDs you want to add to the segment.
Required
segmentId Segment ID string
The identifier for a segment. You can find your segment's ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage.
Required
idType Id Type string
The type of ids you want to use. All of the values in the ids array must be of this type. If you don't provide this parameter, we assume that the ids array contains id values.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
customer_io-add-customers-to-segment
Version
0.0.3
App
Customer.io
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes