Twilio SMS to RocketChat #channel Results in Blank Message


Hello, i am attempting to create a webhook that will post an SMS message received via a Twilio number to a specific channel on our rocketchat server , based on this Twilio/Slack tutorial (was hoping the underlying tech between Slack/RocketChat would be similar enough.)

However, I am completely stuck as the message seems to arrive into the specific room (posted by SMS Admin, alias for Rocket.Cat) but the body of the message is blank.

As such, I am guessing the http parameters are incorrect:
{“text”: “{{trigger.message.Body}}”}

Any assistance shall be greatly appreciated.


Visual reference for Twilio Studio HTTP Parameters


Here’s how I’ve done this:

Configured an Incoming Webhook on Rocket.Chat with the following script:

class Script {

	 * @params {object} request
	process_incoming_request({ request }) {
		const data = request.content;
        const msg = {
          content: {
            attachments: []

		msg.content.text = data.Body;
        return msg;

Then copied the Webhook URL and pasted it in the Messaging Webhook, in Twilio:


Woo woo, thank you thank you.

At first I just added the script you provided and same result… then I noticed you were not using studio for your number…so I switched from “A MESSAGE COMES IN = Studio Flow/Twilio-Test” (duh)

To your example of “A MESSAGE COMES IN=Webhook…”

and wallah. Super awesome.

Thank you.


Really cool… how could I get the phone number in the message of the sms sender in the message?


nm. I figured out data.From