Standardize US Phone Numbers with Multiple Format Options and Validation - n8n Workflow | Neura Market
Standardize US Phone Numbers with Multiple Format Options and Validation
## Workflow Overview:
This n8n workflow template takes a US phone number as input, validates it, and returns it in multiple standard formats, including handling extensions. It's designed to streamline the process of standardizing phone number data within your automations.
## How it Works:
**Input:** Accepts a phone number string as input. This number can be in various common formats (e.g., `(555) 123-4567`, `555.123.4567`, `+15551234567`, `5551234567x890`).
**Formatting Removal:** Strips all non-numeric characters to isolate the core number and any potential extension.
**Validation:**
- **Country Code Check:** Verifies if the number starts with the US country code (`+1` or `1`) or assumes US if no country code is present and the length is correct.
- **Length Check:** Ensures the main number component consists of exactly 10 digits after stripping formatting and the country code.
**Output Generation (if valid):** If the number passes validation, the workflow outputs the phone number in several standardized formats:
- **Number Only:** 5551234567
- **E.164 Standard:** +15551234567
- **National Standard:** (555) 123-4567
- **Full National Standard:** 1 (555) 123-4567
- **International Standard:** 00-1-555-123-4567
**Extension Handling:** If an extension is detected in the input, it is separated and provided as:
- **Extension (Number):** 890
- **Extension (String):** 890
**Use Cases:**
- Cleaning and standardizing phone number data in CRM systems.
- Formatting numbers before sending SMS messages via APIs.
- Validating user input from forms.
- Ensuring consistent phone number representation across different applications.
Platform
n8n
Category
Data & Analytics
Price
Free
Creator
Sunny Thaper
if
set
switch
executeWorkflowTrigger
How to import this workflow into n8n
1Purchase or download the workflow to get the n8n workflow JSON file.
2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
3Open each node marked with a credential warning and connect your own accounts and API keys.
4Run the workflow once manually to verify the data flow, then toggle it to Active.