View as Markdown
Elastic Email icon

Elastic Email ACTION

Add Contact to Mailing List

Adds a new contact to a mailing list. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Elastic Email account once, then configure and run Add Contact to Mailing List 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: "elastic_email-add-contact",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    elastic_email: { authProvisionId: "apn_xxxxxxx" },
    email: "Email",
    listNames: ["List Names"],
  },
})

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 Contact to Mailing List inputs
Property Type Description
email Email string
The contact's email
Required
listNames List Names string[]
Names of the mailing lists
Optional Dynamic
status Status string
The initial status of the contact.
Optional
firstName First Name string
The contact's first name.
Optional
lastName Last Name string
The contact's last name.
Optional
customFields Custom Fields object
A key-value collection of custom contact fields which can be used in the system. Only already existing custom fields will be saved.
Optional
consentIP Consent IP string
IP address of consent to send this contact(s) your email. If not provided your current public IP address is used for consent.
Optional
consentDate Consent Date string
Date of consent to send this contact(s) your email. If not provided current date is used for consent.
Optional
consentTracking Consent Tracking string
Tracking of consent to send this contact(s) your email. Defaults to "Unknown".
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
elastic_email-add-contact
Version
0.0.4
App
Elastic Email
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes