Search code examples
twilio

Where do I specify the Template message body in a Twilio flow?


I'm building a Twilio Studio Flow. I created a template message and WhatsApp approved it. So I copied the template SID into my 1st widget when receiving a message. But it doesn't work when I try to use the template and my logs say:

Failure sending message: A text message body or media urls must be specified..

But I did specify the message body, both in the widget and when i applied for approval from WhatsApp


Solution

  • To use Content Templates successfully, please ensure that a Messaging Service is configured in your Twilio Studio Flow as it is required for sending messages. This should help resolve the issue you are facing with the message body specification.

    You can specify the messaging service under "Advanced Configuration" either by adding the SID manually or by referring to the flow variable {{trigger.message.MessagingServiceSid}}. Note this variable is only available if the messaging service links to the Studio webhook.

    enter image description here