Skip to main content
Version: Streamsheets 2.5

TWILIO.SMS.SEND

star This is a premium feature.

info

This function is experimental and subject to change or review.

Sends a SMS message to specified phone number. In its simplest form only text and recipient number are required. But for more advanced settings it is also possible to pass a JSON object containing additional parameters. Please refer to https://www.twilio.com/docs/sms/send-messages for more information about available and supported options (as of 2021-07-30).

Syntax

=TWILIO.SMS.SEND(APIKey, TextOrJSON, [ToContact], [FromContact], [ResponseTarget])

Arguments

NameTypeDescription
APIKeyAn API key or JSON to authorize against Twilio service
TextOrJSONThe text to send or a JSON which contains the text and additional required or optional parameters
ToContact (optional)StringThe recipient phone number, in E.164 format. Not required if specified within passed JSON.
FromContact (optional)StringA Twilio phone number of the sender, in E.164 format, or short code. Not required if specified within passed JSON.
ResponseTarget (optional)Specify inbox, outbox, cell or cell-range to write any response to

Return

A unique random request ID which can be used with REQUESTINFO to check the state of the request. In case of an error the corresponding error-code is returned.

Examples

AB
1Useraccount-sid
2Passwordauth token
3bodyHello from Twilio!
4to+4915123456780
5from+4915123456789
FormulaResultComment
=TWILIO.SMS.SEND(JSON(A1:B2),B3,B4,B5,INBOX())
Sends a SMS with text "Hello from Twilio!" to +4915123456780
=TWILIO.SMS.SEND(JSON(A1:B2),JSON(A3:B5))
Same as before but using JSON to specify required information