WhatsApp (Twilio)
Description
Section titled “Description”The WhatsApp - Twilio module allows sending WhatsApp messages using the Twilio API. It supports sending text messages and messages with multimedia content (images, documents, etc.) via media URL. The message can be customized with dynamic workflow variables. It is ideal for customer notifications, order confirmations, alerts and any automated communication via WhatsApp.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Twilio credentials |
| phoneNumber | text | Yes | Destination phone number |
| message | textarea | Yes | Message to send (supports {{variable}} variables) |
Credentials
Section titled “Credentials”The credential must contain the fields (configured in the module instance):
accountSid: Twilio account SIDauthToken: Twilio authentication tokenfrom: Source WhatsApp number (registered in Twilio, format: +1234567890)
To configure the credentials, a Twilio account with WhatsApp Business enabled is needed. The source number must be approved in the Twilio sandbox or in production.
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "messageId": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "cred_twilio_01", "phoneNumber": "+34612345678", "message": "Hola {{nombreCliente}}, tu pedido {{orderId}} ha sido enviado."}API Used
Section titled “API Used”- Twilio Messages API: Message sending via
client.messages.create() - Documentation: https://www.twilio.com/docs/whatsapp/api
- Supports dynamic variables
{{variable}}in the message field - If
data.mediaUrlis present, a multimedia message with the file URL is sent - The destination number is automatically prefixed with
whatsapp:for the Twilio API - The source number is taken from
config.fromand is also prefixed withwhatsapp: - The returned
messageIdis the message SID in Twilio, useful for tracking - Requires an active Twilio account with WhatsApp enabled
Related Nodes
Section titled “Related Nodes”- telegram (messaging via Telegram)
- slack (messaging via Slack)