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?
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.
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.
So if it thinks that the body is blank, it could be that I am using the wrong key inside the body for the custom message. I’ve tried several that I found in forum messages here. All of which gave me the same error. Do you know what the correct key is?