Drip ACTION
Create Or Update Subscriber
Creates a new subscriber. If the email already exists, it will update the existing subscriber. See the docs here
- Action
- Writes data
- Destructive
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Drip account once, then configure and run Create Or Update Subscriber 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: "drip-create-or-update-subscriber",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
drip: { authProvisionId: "apn_xxxxxxx" },
email: "Email",
visitorUuid: "Visitor UUID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "drip-create-or-update-subscriber",
"configured_props": {
"drip": { "authProvisionId": "apn_xxxxxxx" },
"email": "Email",
"visitorUuid": "Visitor UUID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "drip",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "drip-create-or-update-subscriber",
arguments: {
email: "Email",
visitorUuid: "Visitor UUID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
email Email | string | The subscriber's email address. Optional Dynamic |
visitorUuid Visitor UUID | string | The uuid for a subscriber's visitor record. Either email or visitor_uuid must be included. Optional |
newEmail New Email | string | A new email address for the subscriber. If provided and a subscriber with the email above does not exist, this address will be used to create a new subscriber. Optional |
firstName First Name | string | The subscriber's first name. Optional |
lastName Last Name | string | The subscriber's last name. Optional |
address1 Address 1 | string | The subscriber's mailing address. Optional |
address2 Address 2 | string | An additional field for the subscriber's mailing address. Optional |
city City | string | The city, town, or village in which the subscriber resides. Optional |
state State | string | The region in which the subscriber resides. Typically a province, a state, or a prefecture. Optional |
zip ZIP | string | The postal code in which the subscriber resides, also known as zip, postcode, Eircode, etc. Optional |
country Country | string | The country in which the subscriber resides. Optional |
phone Phone | string | The subscriber's primary phone number. Optional |
smsNumber SMS Number | string | The subscriber's mobile phone number in E.164 formatting. E.g. "+16125551212". Only US-based numbers are supported at this time. Optional |
smsConsent SMS Consent | boolean | true if the person has granted consent to receive marketing and other communication via SMS; false otherwise. Default: false. If you're unsure whether or not you have gained legal SMS consent, check out our TCPA requirements article. Optional |
userId User Id | string | A unique identifier for the user in your database, such as a primary key. Optional |
timezone Timezone | string | The subscriber's time zone (in Olson format). Defaults to Etc/UTC Optional |
lifetimeValue Lifetime Value | string | The lifetime value of the subscriber (in cents). Optional |
ipAddress IP Address | string | The subscriber's ip address E.g. "111.111.111.11" Optional |
customFields Custom Fields | object | An Object containing custom field data. E.g. { "shirt_size": "Medium" } Optional |
tags Tags | string[] | An Array containing one or more tags. E.g. ["Customer", "SEO"]. Optional |
removeTags Remove Tags | string[] | An Array containing one or more tags to be removed from the subscriber. E.g. ["Customer", "SEO"]. Optional |
prospect Prospect | boolean | A Boolean specifiying whether we should attach a lead score to the subscriber (when lead scoring is enabled). Defaults to true. Note: This flag used to be called potential_lead, which we will continue to accept for backwards compatibility. Optional |
baseLeadScore Base Lead Score | integer | An Integer specifying the starting value for lead score calculation for this subscriber. Defaults to 30. Optional |
euConsent EU Consent | string | A String specifying whether the subscriber granted or denied GDPR consent. Optional |
euConsentMessage EU Consent Message | string | A String containing the message the subscriber granted or denied their consent to. Optional |
status Status | string | A String specifying the subscriber's status: either active or unsubscribed. Optional |
initialStatus Initial Status | string | A String specifying the subscriber's known status: either active or unsubscribed. To be used if subscriber's status is unchanged. 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
- drip-create-or-update-subscriber
- Version
- 0.0.4
- App
- Drip
- Authentication
- OAuth
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗