View as Markdown
Mailbluster icon

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)

SCHEMA

Inputs

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

Create New Lead inputs
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