Personalization Tokens for Phone numbers don't have correct formatting

It seems that only incorrectly formatted phone numbers get correctly formatted when used as Personalization Tokens in Email Templates.

What can be done to work around this issue?

Example:

On the left is a Contact with two phone numbers. The Mobile number is not correctly formatted (it has not had “Apply number formatting” applied, and it is missing the country code).

The Phone number is correctly formatted (it had “Apply number formatting” applied and has been “validated” as a USA phone number)

However, when those two Properties are inserted into an Email Template (on the right) using Personalization Tokens, you see that the incorrectly formatted Mobile Phone number is now correctly formatted in the email - while the correctly formatted phone number looks bad in the email!

Any suggestions on how to both correctly format phone numbers on Contacts AND get them to look readable in Emails when using Personalization Tokens?

Hi @Coopr
Thank you for reaching out to the Community!
I’d like to invite some community members who are subject matter experts to join this conversation.
@karstenkoehler @Anton @sylvain_tirreau - Would you be able to share any insights on this? Your expertise would be greatly appreciated.
Best,
Victor

Hi @Coopr,

Mobile phone number (unvalidated, missing country code)
→ In the contact record: 4155552671
→ In the email: shows as 4155552671Phone number (validated with “Validate phone number” on)
→ In the contact record: +1 (415) 555-2671
→ In the email: shows as +1 415-555-2671 still readable, but loses the parentheses formatting.

Screenshot

(Left = Contact record, Right = Email preview)

  • What’s happening:

The contact record applies “Apply number formatting” purely in the UI - this is cosmetic.The email token renderer pulls the stored number value and formats it differently depending on whether the property is validated.For validated numbers, HubSpot stores them in E.164 internally, then outputs a “safe” readable form for email (+1 415-555-2671), but without the extra US-style formatting (parentheses).

  • Best practice workaround

If you want:

  1. Validated/E.164 for integrations and click-to-call
  2. Human-friendly US-style formatting in emails

…then keep two fields:

Validated/E.164 field for functional use.

Display field always in (XXX) XXX-XXXX format for emails.A workflow or Operations Hub custom code can sync these automatically so you get consistent validation and clean email display without touching values manually.

Thank you!

OK, this helps a bit!

Can you suggest a Workflow and/or Calculation Property that’d consistently return the nicely-formatted phone number?
And what I really want is a Calculated Property that is the concatenation of the nicely formatted Phone and Mobile Phone - the closest I’ve got is the following - but this returns only the ugly-formatted phone number(s)

if(is_known([properties.phone]), [properties.phone], if(is_known([properties.mobilephone]), [properties.mobilephone]))

Hi @Coopr and thanks for your reply!
I can see on this Idea “Allow calculated properties to build strings” the comment from @MFriberg which mentions (and explains about) using the advanced calculated property editor and the concatenate function, this might help you.
Here are some resources that can also give you some ideas:
- The “Concatenate” section on “Create calculation and rollup properties%20%3D%201699320016000-,concatenate,-Combine%20up%20to)”
- The solution from @karstenkoehler on “How to concatenate a property?
- The solution from @karstenkoehler on “Can I concatenate String, Date, and Number properties in HubSpot?
Now, let’s consult our Top Experts: Hi @Anton, @sylvain_tirreau and @Franci do you have other suggestions to help @Coopr, please?
Have a wonderful day and thanks so much!
Bérangère

There’s a built-in workflow function for formatting and validating phone numbers. It used to be in beta but I’m pretty sure it’s now available to everyone.

What I would do is create a workflow that formats and validates the phone numbers, and then concatenates them into a separate contact property, something like this:

I forgot one very important step in the workflow: Taking the parsed phone number and pasting that into the existing phone number/mobile phone number contact property. You can do this with another workflow action right after the format/parse one. The workflow action is “Edit Record” under CRM, and make sure you select “Action Outputs” from the top dropdown menu as shown in the screenshot.

You’ll have to create two of these workflow actions, one after each phone number format/parse action.