n8n

How to Automate Phone Number Formatting for CRM?

Keep phone numbers clean before they reach your CRM or texting tools. The workflow accepts a raw phone number, fixes the format, and flags bad data. Teams use it to prepare leads, support contacts, and call lists with less manual work.

It runs when another workflow calls it through the When Executed by Another Workflow trigger. First, Strip phone number formatting keeps only digits using a simple pattern. Next, Check number of digits in phone number routes numbers based on length. Then, Check if first digit is valid country code decides if a country code is present. If it is missing, Add valid country code adds 1 to the front. If any rule fails, Clear invalid number returns a blank value. Format phone numbers outputs the original input and the final formatted value for easy saving.

Set it up as a sub workflow and map your phone field to the Phone Number input. Expect fewer failed calls and cleaner CRM records, which saves time and SMS cost. Many teams can cut manual clean up from hours each week to a few minutes. This is useful for lead intake forms, CSV imports, dialer queues, and help desk tickets. It keeps your contact data consistent so downstream systems run smoothly.

What are the key features?

  • Called by other workflows using the When Executed by Another Workflow trigger with a Phone Number input.
  • Removes non digit characters so only numbers remain before validation.
  • Routes by digit count to separate valid, potentially valid, and invalid numbers.
  • Checks if the first digit is a valid country code and handles missing codes.
  • Adds country code 1 when needed to standardize numbers for North America.
  • Clears invalid inputs by returning an empty value to avoid bad saves.
  • Outputs both the original input and a formatted number for easy storage.
  • No external credentials required, simple to maintain and reuse.

What are the benefits?

  • Reduce manual cleanup from 2 hours per week to 5 minutes
  • Improve phone data accuracy by 80% with one standard format
  • Cut invalid SMS or call attempts by 50% by filtering bad numbers
  • Reuse a single callable cleaner across forms, imports, and apps
  • Lower support time on failed outreach by flagging errors early

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Name the workflow clearly, for example Phone Number Standardizer, and enable it.
  3. Open the When Executed by Another Workflow node and confirm the workflow input field is named Phone Number. Set the type to string if your numbers may start with zero.
  4. Open Strip phone number formatting and review the expression that extracts digits. Keep it as is to allow any input like (555) 123 4567 or +1 555 123 4567.
  5. Open Check number of digits in phone number and confirm the rules for 10 and 11 digits. Add or edit rules if your operation needs different lengths.
  6. Open Check if first digit is valid country code and adjust the condition if your region uses other country codes or formats.
  7. Open Add valid country code and change the prefix from 1 to your preferred country code if needed. Switch the field type to string if you must preserve leading zeros.
  8. Open Format phone numbers and choose which fields you want to output, such as the original input and a normalized number ready for your CRM.
  9. Open Clear invalid number and decide what value to return for invalid inputs. A blank string is the default and prevents saving bad data.
  10. In your parent workflow, add an Execute Workflow node. Select this standardizer workflow, map your raw phone field to Phone Number, and set the node to wait until finished.
  11. Run tests with examples like (555) 123-4567, 15551234567, and 12345. Check the output fields and branches, then fine tune digit rules and country code checks as needed.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.