Mailbluster ACTION
Create New Lead
Create a new lead. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Mailbluster account once, then configure and run Create New Lead 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: "mailbluster-create-lead",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
mailbluster: { authProvisionId: "apn_xxxxxxx" },
email: "Email",
subscribed: true,
},
})
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": "mailbluster-create-lead",
"configured_props": {
"mailbluster": { "authProvisionId": "apn_xxxxxxx" },
"email": "Email",
"subscribed": true
}
}'// 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": "mailbluster",
},
},
},
)
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: "mailbluster-create-lead",
arguments: {
email: "Email",
subscribed: true,
},
})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 | Email address of the lead. Required |
subscribed Subscribed | boolean | Lead is subscribed to receive email or not. Required |
firstName First Name | string | First name of the lead. Optional |
lastName Last Name | string | Last name of the lead. Optional |
fields Fields | object | An object containing field information of the lead. Field merge tag is the key and field value is the value. Optional |
timezone Timezone | string | Timezone of the lead. View supported timezones from here. Optional |
ipAddress IP Address | string | IP address of the lead. IP address is used to find country, city, latitude, longitude, timezone (if no timezone is given) etc of this lead & store them as meta. Optional |
doubleOptIn Double Opt-In | boolean | If true, the lead will receive the opt-in confirmation email. Optional |
tags Tags | string[] | Tag(s) name of the lead. For each tag, if tag already exists, it will be only attached to the lead. Otherwise, it will be created first and then get attached. Optional |
overrideExisting Override Existing | boolean | If lead exists, should it get overridden? Before creating a lead, we will try to find whether the lead already exists in the system using the provided email. This param controls if lead is found, we should override the lead info or throw an error message. 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
- mailbluster-create-lead
- Version
- 0.0.3
- App
- Mailbluster
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗