Twilio
Send SMS messages and make phone calls with Twilio.
On this page
Connect
Auth type: Credentials form (custom_auth). Fill in the fields the provider needs (listed below). They are stored encrypted in the vault.
| Field | Type | Description |
|---|---|---|
accountSidrequired | text | Your Twilio Account SID |
authTokenrequired | secret | Your Twilio Auth Token |
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("twilio", "get_message", {
"message_sid": "<message sid>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Twilio answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "twilio-get-message",
name: "Twilio: Get Message",
description: "Calls Twilio when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("twilio", {
"action": "get_message",
"message_sid": "<message sid>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/twilio/get_message" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"message_sid":"<message sid>"}}'Actions
get_messagein catalog
Get Message. Retrieves the details of a specific message.
| Input | Type | Description |
|---|---|---|
message_sidrequired | text | The unique identifier (SID) of the message to retrieve. It starts with "SM" or "MM". |
make_callin catalog
Call Phone. Call a number and say a message.
| Input | Type | Description |
|---|---|---|
fromrequired | id (picked from your account) | The phone number to send the message from |
torequired | text | The phone number to call. Must be in E.164 format (e.g., +15558675310). |
messagerequired | long text | The text message to be converted to speech and spoken to the recipient. |
voiceoptional | one of "alice" | "man" | "woman" | The voice to use for the text-to-speech message. |
languageoptional | one of "en-US" | "en-GB" | "es-ES" | "fr-FR" | "de-DE" | The language to use for the text-to-speech message. |
sendDigitsoptional | text | A string of keys to dial after the call is connected. Use 'w' for a half-second pause. |
timeoutoptional | number | The number of seconds to let the phone ring before assuming no answer. Default is 60. |
send_smsin catalog
Send SMS. Send a new SMS message
| Input | Type | Description |
|---|---|---|
fromrequired | id (picked from your account) | The phone number to send the message from |
bodyrequired | text | The body of the message to send |
torequired | text | The phone number to send the message to |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
download_recording_media
Download Recording Media. Download the media file for a specific recording.
| Input | Type | Description |
|---|---|---|
recording_sidrequired | text | The unique identifier (SID) of the recording to download. It starts with "RE". |
formatoptional | one of "mp3" | "wav" | The desired audio format for the download file. |
channelsoptional | one of "1" | "2" | Specify whether to download a mono or dual-channel file. Note: Dual-channel may not be available for all recordings. |
phone_number_lookup
Phone Number Lookup. Lookup information about a phone number.
| Input | Type | Description |
|---|---|---|
phone_numberrequired | text | Phone Number |
Details
- Id
twilio- Category
- Communication
- Tags
- sms, voice, phone, messaging
- Package
@activepieces/piece-twilio@0.4.5- Tier
- Built in