Last updated Nov 6, 2024: Updated images.
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 Zapier — Numbers — Format Phone Number
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.
-
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.
Select the format you’d like to transform the phone number into, in the “To Format” drop-down field.
Next, select the Country Code of the phone number and if you’d like for the Zap to validate the number.
Lastly, click the Test step button to test your action to make sure the phone number is formatted in the way you expected.
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!