Twilio Route Error

I’m trying to Route to Twilio but keep getting the error:

error building route request: error validating twilio message: %!w()

The first part of the message makes me believe that the problem is in the build but the second part makes me believe that there is a problem with the SID or Token.

I believe I have the initial Route Information filled out correctly. I have static From and To numbers.

My JSONata is:

{
“body”: {
“customMessage”: body.vehicle_name & " is " & body.motion & ": " & “Latitude and Longitude Finder on Map Get Coordinates” & $string(best_lat) & “&long=” & $string(best_lon)
}
}
Edit: I commented out the url in the message and got the same result.

I’ve tried keys “text” and “twilioBody” that I found in the forum. I must be doing something wrong. Any Ideas?

Thanks,
Joe

Hi @scavoj,

Is the route working with a static customMessage string? I would also try using the JSONata Exerciser to test out your expression using the JSON from a valid event.

Rob

Rob,

Yes I used webhook.site to check the JSONata and it is correct. Same result.

But I’m waiting on regulatory compliance for the twilio phone number. I think I filled out the information correctly. I’m going to wait for the approved status to send messages and try it again. The process of getting a number and filling out the info is a bit confusing.

Thanks,
Joe