Send an SMS
TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN with your secret names, and the numbers with your own. Use E.164 phone numbers with a leading +; from must be a Twilio number you own. On success, read {{steps.send_sms.result.message.sid}} and result.message.status (for example queued). If sending fails, confirm the credentials, sender number, destination, and Twilio account restrictions.
Send a WhatsApp message
to and from as E.164 numbers without a whatsapp: prefix; the tool adds it and rejects any other format. from must be a WhatsApp-enabled Twilio sender. media_urls is optional: pass a JSON array of publicly accessible URLs, or a single URL. The result has the same shape as SMS: result.message.sid, result.message.status, and result.message.num_media.
Supported media formats are JPEG, PNG, GIF, MP4, and PDF. To set up a test sender, follow Twilio’s WhatsApp documentation. Trial account recipient verification and messaging limits can change, so check Twilio’s current trial guidance before testing delivery.
Receive SMS or MMS from Twilio
- Set the step’s
auth_tokenconfig to a secret of typeTWILIO_AUTH_TOKENand publish the flow. Theauth_tokenis required: the endpoint runs the published version and answers401to every callback when that version has no usable Auth Token on itsINPUT_TWILIO_SMSstep. - Set the Twilio number’s incoming message webhook to
POST /api/v2/external/flows/:flowId/twilio-run, using your Jinba Flow host and published flow ID. - Send a message to the Twilio number and check the flow run. Twilio sends form-encoded data by default; the endpoint returns an empty TwiML response while the flow runs.
INPUT_TWILIO_SMS step, which parses it into result. Required fields include MessageSid, AccountSid, From, To, Body, and NumMedia; MMS messages add MediaUrl0–MediaUrl9 and MediaContentType0–MediaContentType9. Later steps read them as {{steps.receive_sms.result.Body}} or {{steps.receive_sms.result.From}}; to reply, send an SMS with to set to result.From and from set to result.To. If no event value is supplied or the payload is invalid, the tool returns INPUT_TWILIO_SMS_ERROR. Every callback is authenticated: the endpoint validates the X-Twilio-Signature header with the Auth Token from the published step’s auth_token config and answers 401 when the header is missing or the signature does not match. A retry of the same delivery is acknowledged without starting another run.