Twilio RCS SendMessage

Twilio RCS SendMessage

Certified

Send an RCS message via Twilio

Posts a message to the Twilio Messages API through a Messaging Service that has an RCS sender, using Account SID and Auth Token for basic authentication. Twilio falls back to SMS when the recipient's device or carrier does not support RCS, so the same task covers both cases without extra configuration. Set body for a plain text message, contentSid to send a rich RCS content template, or both. Returns the Twilio message SID and delivery status from the API response. See the Twilio RCS documentation for details.

yaml
type: io.kestra.plugin.twilio.notify.rcs.SendMessage

Send an RCS alert on a failed flow execution.

yaml
id: alert_on_failure
namespace: company.team

tasks:
  - id: risky_step
    type: io.kestra.plugin.scripts.shell.Commands
    runner: PROCESS
    commands:
      - exit 1

errors:
  - id: send_rcs_alert
    type: io.kestra.plugin.twilio.notify.rcs.SendMessage
    accountSID: "{{ secret('TWILIO_ACCOUNT_SID') }}"
    authToken: "{{ secret('TWILIO_AUTH_TOKEN') }}"
    messagingServiceSid: "{{ secret('TWILIO_MESSAGING_SERVICE_SID') }}"
    to: "+15555550100"
    body: "Flow {{ flow.id }} failed on execution {{ execution.id }}."

Send a rich RCS message using a content template.

yaml
id: rcs_rich_notification
namespace: company.team

inputs:
  - id: recipient
    type: STRING

tasks:
  - id: send_message
    type: io.kestra.plugin.twilio.notify.rcs.SendMessage
    accountSID: "{{ secret('TWILIO_ACCOUNT_SID') }}"
    authToken: "{{ secret('TWILIO_AUTH_TOKEN') }}"
    messagingServiceSid: "{{ secret('TWILIO_MESSAGING_SERVICE_SID') }}"
    to: "{{ inputs.recipient }}"
    contentSid: "{{ secret('TWILIO_CONTENT_SID') }}"

  - id: log_result
    type: io.kestra.plugin.core.log.Log
    message: "Message sent. SID: {{ outputs.send_message.sid }}, status: {{ outputs.send_message.status }}"
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-twilio --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

Properties

Twilio Account SID

The Account SID used for basic authentication and to construct the Messages API URL

Twilio Auth Token

The Auth Token paired with the Account SID; store as a Kestra secret

Recipient phone number

The destination phone number in E.164 format, e.g. +15555550100

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Message body

The text content of the message

Content template SID

SID of a Twilio Content API template (HX...) to render as a rich RCS message. Either this or body must be set

Sender phone number

The Twilio phone number, alphanumeric sender ID, or short code to send from. Mutually exclusive with messagingServiceSid

Messaging Service SID

SID of a Twilio Messaging Service (MG...) to send through, which picks the sender from the service's pool. Required for channels configured on a Messaging Service, such as RCS. Mutually exclusive with from

Options

Optional HTTP client overrides for timeouts, charset, and headers

Definitions
connectTimeoutstring

Connect timeout

Time allowed to establish the HTTP connection before failing

connectionPoolIdleTimeoutstring
DefaultPT0S

Connection pool idle timeout

Deprecated, this option has no effect: Kestra's HTTP client does not support a connection pool idle timeout.

defaultCharsetstring
DefaultUTF-8

Default request charset

Charset applied to requests when not specified; defaults to UTF-8

headersobject

HTTP headers

HTTP headers to include in the request

maxContentLengthintegerstring
Default10485760

Max response size

Deprecated, this option has no effect: Kestra's HTTP client does not limit the response size.

readIdleTimeoutstring
DefaultPT5M

Read idle timeout

How long a read connection may stay idle before closing; defaults to 5m

readTimeoutstring
DefaultPT10S

Read timeout

Deprecated, this option has no effect: Kestra's HTTP client has no separate read timeout. Use readIdleTimeout instead.

Twilio message SID

Unique identifier assigned by Twilio to the sent message

Message status

Delivery status returned by Twilio, e.g. queued, sent, delivered