Skip to main content

Standardize US phone numbers with multiple format options and validation

Workflow preview

Workflow preview
100%
Standardize US phone numbers with multiple format options and validation preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. 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 s...

Best for

  • Engineering automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Sunny Thaper.

Original n8n.io source

1.1 Workflow description

Title
Standardize US phone numbers with multiple format options and validation
Workflow name
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.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 2 - Check if first digit is valid country code

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 3 - Add valid country code

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Strip phone number formatting

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 5 - Check number of digits in phone number

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 6 - Format phone numbers

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Clear invalid number

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

3. Summary Table

Workflow Standardize US phone numbers with multiple format options and validation
Complexity intermediate
Nodes 7
Categories Engineering
Author Sunny Thaper
Published 01 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3812/3812.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Standardize US phone numbers with multiple format options and validation do?

: 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 s...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.