Twilio ACTION
Make a Phone Call
Make a phone call passing text, a URL, or an application that Twilio will use to handle the call. 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 Make a Phone Call 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-make-phone-call",
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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "twilio-make-phone-call",
"configured_props": {
"twilio": { "authProvisionId": "apn_xxxxxxx" },
"from": "From",
"to": "To"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "twilio",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "twilio-make-phone-call",
arguments: {
from: "From",
to: "To",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
from From | string | The phone number or alphanumeric sender ID the message is from Required Dynamic |
to To | string | The destination phone number in E.164 format. Format with a + and country code (e.g., +16175551212). Required |
text Text | string | Plain text for Twilio to speak when the user picks up the phone. For TwiML or SSML, use the URL field instead. Provide exactly one of Text, URL, or Application SID. Optional |
url URL | string | The absolute URL that returns the TwiML instructions for the call. Provide exactly one of Text, URL, or Application SID. Optional |
applicationSid Application SID | string | The SID of an Application resource that will handle the call. You can use List Application SID Options to get a list of available options. Provide exactly one of Text, URL, or Application SID. Optional Dynamic |
timeout Timeout | integer | The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is 60 seconds and the maximum is 600 seconds. Optional |
record Record | boolean | Whether to record the call Optional |
trim Trim | string | Whether to trim any leading and trailing silence from the recording. Only applies when Record is enabled. Optional |
recordingTrack Recording Track | string | The audio track to record for the call. Default is both. Only applies when Record is enabled. Optional |
recordingCallbackUrl Recording Callback URL | string | The URL that we call when the recording is available to be accessed. Only applies when Record is enabled. 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-make-phone-call
- Version
- 1.0.1
- App
- Twilio
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗