Make + Twilio: Dynamic Messages Failing – What Am I Missing?

Hey everyone, I need your help!

I’ve been setting up a Make scenario to automatically respond to WhatsApp messages using Twilio and OpenAI (GPT-3.5-turbo). Everything works great when I manually type a message in the Twilio “Create a Message” module, but the moment I try to send a dynamic value generated by OpenAI, I get hit with this error:

BundleValidationError - Prohibited value in parameter ‘messageBody’

Super frustrating because it only happens when the message is dynamic, not when I enter it manually.

Here’s how my scenario is set up:

:one: Webhook receives messages from WhatsApp via Twilio
:two: HTTP Request sends the query to OpenAI (GPT-3.5-turbo).
:three: Set Variable stores OpenAI’s response in mensaje_limpio, applying replace() to remove special characters.
:four: Twilio - Create a Message takes mensaje_limpio and sends it back to the WhatsApp user.

What I’ve tried so far (but no luck):

:check_mark: Removed special characters and line breaks (replace("\n", " ")).
:check_mark: Used trim() to eliminate hidden white spaces.
:check_mark: Checked the “Set Variable” output – mensaje_limpio looks like a clean, normal text.**
:check_mark: Manually entering a message in Twilio works just fine, but when using mensaje_limpio, Twilio refuses it.**

What I’m trying to figure out:

:pushpin: How to make Twilio accept the dynamic response from OpenAI without throwing an error.
:pushpin: If there’s a way to force Make to send the value as plain text, without any weird encoding issues. (even thouhg im not sure that this is the problem)
:pushpin: Whether Make is passing the value in a format that Twilio doesn’t like.

I’ll be recording a quick video showing my setup and the exact error I’m getting


, so if anyone has faced this before, I’d love to hear your thoughts!

Any help would be massively appreciated—been stuck on this for hours! :weary_face::fire:

1 Like

Its there anyone that could help? @Simo :grimacing:

Hey Ricardo,
Not sure about this - If you check the input value passed by Make to the Twilio module, what does it look like?

Another thing you may try is to enclose the mapped value on the Twilio module in quotation marks

1 Like