Formatter Features: formatting phone numbers

  • 1 September 2021
  • 2 replies
  • 4924 views
Formatter Features: formatting phone numbers
Userlevel 7
Badge +9

Hello everyone! Jesse Parker here, doing a deep-dive into how best use the Formatter utility to format/manipulate phone numbers. Apps that send and receive phone number data often require different number formatting so this can be a useful tool to modify numbers and minimize issues when sending data from one app to another.

This option can be found at:

Formatter by ZapierNumbersFormat Phone Number

TI3tq0wwfBIQyR475n-RIyQxro4Jz3N_6kBqVIkmZ-d2KoGzcCix6p0Uypff3y-KoAUYXc4L6Qq6oitvWVvdHwvu-HOx_XrUv1YiG2Nvf33dgFwGFRmOJjE5bxqC6gBekDNBEwGI=s0

What it Looks Like

BY637yCJq4YeV7HqWLWABRRrd6JLSgduYmh2oer8RQuC4Lu-g_8B8-SJ8t6_7v9YuoyCqTkcdxcVQ3sWlX2_dN2_O-wLGpw6fOkJNXilZdqgmesLvwyVsawFYgpfC3gzht-vopwk=s0

It can...

  • Check to see if a phone number is valid or not

  • Format a phone number based on a list of pre-selected formats including:

    • E164

    • National

    • International

    • RFC3966

    • International, No Country Code

    • International, No Hyphens

    • National, No Parenthesis

    • No Symbols, National

    • No Symbols, International

It can not...

  • Automatically detect the country code of a phone number (workaround)

  • Remove a “+” and/or pre-existing country code from data coming from your trigger step (workaround)

  • Extract a phone number from a block of text (workaround)

  • Lookup a country by country code and vice-versa (workaround)

  • Format numbers when country codes from the trigger step, vary

Getting Started

The first thing we’ll take a look at is understanding each of the fields in your “Format Phone Number” action step.

7Kn1IoU9E4u6xKJ5dVFMSTlL47IjXPofm-45GyJNxrihyvSQLy-JxN-pha4CO1GWmBMWBJ6GNfW8zHFB5DlETfO7_oA0LRyJs10LoGZGZrrc1H_kwVcf5epz5IFgLBzwg5mOESQz=s0

  • Input: The phone number that comes from the app you’ve selected in your trigger (Step 1)

  • To Format: A drop-down field that asks what formatting you’d like the phone number to be in. 

  • Phone Number Country Code: This is the  2-letter ISO country code of the phone number you are wanting to format. If you do not see your country listed, you can select "Use a Custom Value (advanced)" and enter an ISO country code (list of 2-letter ISO country codes here). Alternatively, if the ISO country code is included in the data coming from your trigger step, you can dynamically select it here by also using the “custom value” option. 

  • Validate Phone Number: This field is set to “Yes” by default. This means that the Zap will check if the phone number is valid for the country code selected (the United States is the default). 

Configure the Action Step

Select a phone number from the data returned in your trigger step, in the “Input” field.

a8UXzKdJvVAnH0-TEclQolsUqho3hMwOJuyshw3hHJbfaArlIoloRqMbqMjM8rbKrD3QgZx0lDhlEokKeiyBbkjr8lCHFrx7OMCEJfFIoVJxoHUDWHrsqenkVj2a6OIMT3gCjlxT=s0

Select the format you’d like to transform the phone number into, in the “To Format” drop-down field.

yC8NuXo8EAskQg77sp5RDh28aeOtCaiHQdNoiG4fECpuj5__1sbwCcL-iseg2TkL4qOkF1Rf00xZ0STeO3RGHpfcJ2P36lT7AXjQEWuR8ARhjjwUPASv679k9ompa-W-8LrThkuM=s0

Next, select the Country Code of the phone number and if you’d like for the Zap to validate the number.

qUngM4MBb1nsWvd_LOfrGbJf9ddI0jFzoinSYgznUlD_EGI-oH9t9wkV80he--hlQc0QvQC_6iZUPV1ECGvE9X3hTKJkd-Og6HdVrjvwVkxYKOz_1L6O-ixy5hsXPzhQpf6F2BTZ=s0

Lastly, test your action to make sure the phone number is formatted in the way you expected.

e5TPO-VJed0lIT4YFDuPvTmaZSbGxXCbSm7rhz_G-RqHh6cuCBhQxx-4abeZegns38pSS0t8aav3wEO-1qqyDunvUg7HrVxf-pLh-XvMec65NOF1s2OEgSUnoqDtbmqH6sVYp8p2=s0

Tricky Things to Note

Fake phone numbers (e.g. there is no 555 area code in the United States), phone numbers with too many or not enough numbers, or phone numbers with invalid characters will not be transformed if the “Validate Phone Number” field is set to “Yes”, even if everything else is set up correctly.

Other Resources

Using Extract Pattern to get phone numbers, emails and other types of text from a field.

Coming up in the Series

Next up in the Formatter Features series we'll be taking a look at extracting emails and URLs using Formatter. Until next time!


2 replies

Can the hyperlinks in this article please be updated. Many don’t work.

Userlevel 7
Badge +9

@jamesforpm sure thing! To confirm, is it only these 2 bullets that need updated links, or are there others?

  • Extract a phone number from a block of text (workaround)

  • Lookup a country by country code and vice-versa (workaround)

Let me know!

Reply