View as Markdown
MSG91 icon

MSG91 ACTION

Send SMS

Send SMS messages to one or multiple recipients. 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 Send SMS 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-send-sms",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    msg91: { authProvisionId: "apn_xxxxxxx" },
    templateId: "Template ID",
    shortUrl: 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.

Send SMS inputs
Property Type Description
templateId Template ID string
The ID of the template to use for the SMS
Required
shortUrl Short URL boolean
If set to true, the URL will be shortened using the MSG91 URL shortener
Required
shortUrlExpiry Short URL Expiry integer
The expiry time for the short URL in seconds
Optional
realTimeResponse Real Time Response boolean
If set to true, the response will be returned immediately
Optional
recipients Recipients string[]
An array of objects containing the recipient details. Example: [{"mobiles": "919999999999", "VAR1": "VALUE 1", "VAR 2": "VALUE 2"}]
Required

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-send-sms
Version
0.0.2
App
MSG91
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes