View as Markdown
MSG91 icon

MSG91 ACTION

Launch Campaign

Launch a campaign using various communication channels (SMS, Email, WhatsApp, Voice, RCS). See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's MSG91 account once, then configure and run Launch Campaign 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: "msg91-launch-campaign",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    msg91: { authProvisionId: "apn_xxxxxxx" },
    campaignSlug: "Campaign Slug",
    to: ["To"],
  },
})

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.

Launch Campaign inputs
Property Type Description
campaignSlug Campaign Slug string
The unique identifier (slug) for the campaign to launch
Required
to To string[]
An array of objects containing the recipients of the campaign. Example: [{"name": "name", "email": "name@email.com", "mobiles": "919XXXXXXXXX", "variables": { "name": { "type": "your_type", "value": "your_value" }, "email": { "type": "text", "value": "john.doe@example.com" } }}]
Required
cc CC string[]
An array of objects containing the CC recipients of the campaign. Example: [{"name": "name", "email": "name@email.com" }]
Optional
bcc BCC string[]
An array of objects containing the BCC recipients of the campaign. Example: [{"name": "name", "email": "name@email.com" }]
Optional
replyTo Reply To string[]
An array of objects containing the Reply To recipients of the campaign. Example: [{"name": "name", "email": "name@email.com" }]
Optional
variables Variables object
An object containing the variables for the campaign. Example: {"name": { "type": "your_type", "value": "your_value"} }
Optional
attachments Attachments string[]
An array of objects containing the attachments of the campaign. Example: [{"fileType": "url or base64", "fileName": "your_filename", "file": "your_file" }]
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
msg91-launch-campaign
Version
0.0.2
App
MSG91
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes