View as Markdown
Twilio icon

Twilio ACTION

Send Message

Send an SMS text with optional media files. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Twilio account once, then configure and run Send Message 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: "twilio-send-message",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    twilio: { authProvisionId: "apn_xxxxxxx" },
    from: "From",
    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.

Send Message inputs
Property Type Description
from From string
The sender's Twilio phone number (in E.164 format), alphanumeric sender ID, Wireless SIM, short code, or channel address (e.g., whatsapp:+15554449999). The value of the from parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using messaging_service_sid, this parameter can be empty (Twilio assigns a from value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool
Required Dynamic
to To string
The destination phone number in E.164 format. Format with a + and country code (e.g., +16175551212).
Required
body Message Body string
The text of the message you want to send, limited to 1600 characters.
Required
mediaUrl Media URL string[]
The URL of the media you wish to send out with the message. The media size limit is 5MB. You may provide up to 10 media URLs per 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
twilio-send-message
Version
0.0.4
App
Twilio
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes