FruxonDocs

Twilio

Twilio Programmable Messaging integration for sending and receiving SMS and WhatsApp messages

The Twilio integration lets your agents send and receive SMS and WhatsApp messages through a Twilio account. It powers the participant dispatcher (so a contact bound to a Twilio channel can message your agent and get replies) and exposes agent-facing tools for sending and inspecting messages directly.

Prerequisites

You need a Twilio account with:

  1. An Account SID and Auth Token from your Twilio Console.
  2. A verified sender phone number in E.164 format (e.g. +14155238886). For WhatsApp, this is the WhatsApp-enabled number on your account.
  3. A Messaging webhook URL configured in the Twilio Console on your number — point it at the webhook URL Fruxon generates for the participant binding (so inbound messages reach your agent).

Setup

  1. Open Integrations and select Twilio.
  2. Click Add Integration Config.
  3. Give the config a display name (e.g., "Twilio — Support Line").
  4. Paste your From Number (E.164, e.g. +14155238886). This is the verified sender used on every outbound message.
  5. Choose Account SID + Auth Token and paste:
    • Account SID (the username Twilio uses for HTTP Basic auth)
    • Auth Token (the password)
  6. Save the config.

Each Twilio number has a single Messaging webhook URL in the Twilio Console. Fruxon assigns one webhook per Twilio config; copy it into the Messaging → A MESSAGE COMES IN field for your number so inbound SMS / WhatsApp messages reach the dispatcher.

Channels

Twilio exposes a single channel descriptor:

ChannelDescription
smsA phone-number conversation — SMS or WhatsApp, identified by an E.164 phone number (e.g. +14155238886).

Bind participants to a Twilio channel under Network → Participants to let your agents reach a contact by phone or WhatsApp.

Triggers

TriggerDescription
twilio.message.receivedFires when an SMS or WhatsApp message arrives at the configured Twilio number. Requires the Twilio webhook to be registered against this tenant's Fruxon ingress.

The trigger payload includes the standard inbound-message fields (payload.text, payload.from, payload.from_name, payload.conversation_name, payload.conversation_address, payload.session_id, payload.event_type) plus Twilio-specific fields:

  • payload.message_attributes.from — E.164 sender number.
  • payload.message_attributes.to — E.164 Twilio number the message arrived at.

Available Tools

ToolDescription
send_smsSend an SMS or WhatsApp message to a phone number you choose. The sender defaults to the config's From Number; pass from to override (E.164, a whatsapp:-prefixed number, or a Messaging Service SID). Returns the Twilio message resource, including its SID and initial status.
get_message_statusLook up a message by its SID (from send_sms) and return its current delivery status (queued, sent, delivered, undelivered, failed) plus any error code/message.
lookup_phone_numberValidate and format a number via Twilio Lookup — confirm it's real and well-formed, get its E.164/national formats and country code, and optionally request carrier/line-type details with fields=line_type_intelligence.

Each tool authenticates with the config's Account SID + Auth Token. Results are returned as a uniform { ok, status_code, data } envelope: ok reflects whether Twilio accepted the request, and data carries Twilio's own JSON response (the message resource, the lookup result, or the error body) so the agent can react to failures rather than aborting.

On this page