Skip to content
AutomatedOn Help Centre

How phone numbers are formatted for SMS and WhatsApp

Twilio needs phone numbers in E.164 format: a +, the country code, then the number, with no spaces. AutomatedOn tidies up the number in a message template's Recipient before sending, so most common formats work.

How numbers are converted

First, everything except the digits (and a leading +) is removed, so spaces, dashes and brackets don't matter. Then:

If the number…AutomatedOn…Example
starts with +keeps it as it is+44 7700 900123 becomes +447700900123
starts with 00replaces 00 with +0033 6 12 34 56 78 becomes +33612345678
starts with 0replaces the 0 with the default country code07700 900123 becomes +447700900123
starts with any other digitadds the default country code in front7700900123 becomes +447700900123

The default country code is +44 (UK) unless Three 17 has set a different one for your Twilio set-up.

Numbers that are rejected

After converting, the number must be a + followed by up to 15 digits, not starting with 0. If it isn't, the message is not sent and the record fails with an error like:

'12345abc' is not a valid E.164 phone number.

Empty numbers

If the Recipient token has no value for a record, the message is not sent and that record fails.

SMS length limit

An SMS can be up to 1,600 characters after all tokens have been filled in. A longer SMS is not sent, and the record fails. WhatsApp messages don't have this limit in AutomatedOn.

WhatsApp

For WhatsApp, the same number rules apply. AutomatedOn adds the whatsapp: prefix Twilio needs, so don't add it yourself.

Checking before you go live

The Test tab shows the number each record would be sent to, but it doesn't check the number format or the SMS length. Look at a few previews to make sure the numbers look right.

Was this guide helpful?