Hi everyone ![]()
I’m trying to build a WhatsApp integration using n8n + Twilio + OpenAI Assistants API. When a user sends a WhatsApp message, I route the webhook input into an assistant and then try to send a response back via Twilio using the Reply to User on WhatsApp-Send SMS node.
But I keep getting this error:
Bad request - Invalid ‘To’ phone number
Even though I see the incoming number like this:
From: whatsapp:+918902781099
I also tried this in the **To** field:
{{ "whatsapp:" + $node["Incoming WhatsApp Message-Webhook"].json["body"]["From"].replace("whatsapp:", "").trim() }}
But it still fails.
Here’s a screenshot of the Twilio node:
What I suspect:
The problem may be with how I’m referencing the number, or maybe the expression isn’t resolving correctly from the webhook.
What I tried:
- Logging the
Fromvalue with aSetnode → confirms it’swhatsapp:+918902781099 - Using
replace("whatsapp:", "")logic - Tried both
.json["From"]and.json["body"]["From"]
Would love help from anyone who has faced this with WhatsApp or Twilio nodes inside n8n. Happy to share full workflow if needed.
Thanks ![]()

