⚙ Operations Hub

JoeFromPinch
Participante

Format phone number to add country code

resolver

Is there a way to add a format workflow to automatically convert a phone number to add a country code? I use Hubspot to call a lot but our third party systems only collect the phone number without country code, which Hubspot requires to validate it and ring it.

2 Soluciones aceptadas
karstenkoehler
Solución
Miembro del salón de la fama | Partner
Miembro del salón de la fama | Partner

Format phone number to add country code

resolver

Hi @JoeFromPinch,

 

Then it depends on how your phone numbers are formatted exactly. In Germany, for example, numbers without country code start with a 0. That 0 is removed when the country code is dialed.

 

E.g. 030 1234567 would turn into +49 30 1234567

 

I could achieve that with the workflow below:

 

karstenkoehler_0-1683873550856.png

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

Ver la solución en mensaje original publicado

Hubjoy
Solución
Participante

Format phone number to add country code

resolver

Attaching an example of a US Phone number change here: @AClark80 , @hkoops 

 

1. Use the custom mode to create your own formula

2. Use 'concat' to append the phone number with the country code

3. Copy the appended value to the contact phone number
Screenshot 2024-09-03 at 3.05.51 PM.png

Screenshot 2024-09-03 at 3.06.04 PM.png

Ver la solución en mensaje original publicado

21 Respuestas 21
ELabuschagne
Participante

Format phone number to add country code

resolver

Hi there, we receive numbers from an internaional contact base, is there a way to format the numbers and assign the country code to them? For example if the contact is US based, it adds a +1, and when the contact is UK based it ads the +47, but then also determine from which country they are in order to amend accordingly?


*The HubSpot phone number contact property does not currently allow us to include the country code verifier in the form submission.

0 Me gusta
AClark80
Participante

Format phone number to add country code

resolver

I would like the solution for just adding the +1 to the contact phone number.

 

0 Me gusta
madisonpfeifle
Participante

Format phone number to add country code

resolver

I'd also like to see a US +1 example or resource for this as well. Any tips, @karstenkoehler? Thank you!

SWilliams07
Participante

Format phone number to add country code

resolver

Why is format data only available in ops hub? Us marketers would find it extreemly useful for this very purpose

karstenkoehler
Miembro del salón de la fama | Partner
Miembro del salón de la fama | Partner

Format phone number to add country code

resolver

Hi @JoeFromPinch,

 

Which HubSpot subscription are you on? In Operations Hub Professional, you can use the Format data workflow action to change the formatting of your phone number and add a country code at the beginning.

 

Without Operations Hub Professional, you'd have to look into third-party tools such as Insycle. (If upgrading to Operations Hub Professional is an option, let me know and I can share more use cases that can be easily implemented in this hub and improve data quality.)

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

JoeFromPinch
Participante

Format phone number to add country code

resolver

I do have Ops Hub professional. I tried to use the Format data workflow but I couldn't figure out exactly what to do with it. 

0 Me gusta
karstenkoehler
Miembro del salón de la fama | Partner
Miembro del salón de la fama | Partner

Format phone number to add country code

resolver

Hi @JoeFromPinch,

 

That depends on where the information about the country code lives. Do you have that in a separate property? What would determine which country code is added at the beginning of a phone number?

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

JoeFromPinch
Participante

Format phone number to add country code

resolver

All our numbers are in the same country. So I need to just insert the same number every time.

0 Me gusta
karstenkoehler
Solución
Miembro del salón de la fama | Partner
Miembro del salón de la fama | Partner

Format phone number to add country code

resolver

Hi @JoeFromPinch,

 

Then it depends on how your phone numbers are formatted exactly. In Germany, for example, numbers without country code start with a 0. That 0 is removed when the country code is dialed.

 

E.g. 030 1234567 would turn into +49 30 1234567

 

I could achieve that with the workflow below:

 

karstenkoehler_0-1683873550856.png

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

teloss79
Miembro

Format phone number to add country code

resolver

how do you prevent other 0's being formatted within the number ?

jruocco
HubSpot Employee
HubSpot Employee

Format phone number to add country code

resolver

Hi There! I believe the "number of instances" makes sure that this logic only applies to the first "0" in the phone number. I hope this helps!

0 Me gusta
BérangèreL
Administrador de la comunidad
Administrador de la comunidad

Format phone number to add country code

resolver

Hi @teloss79,

Thank you for reaching out to the Community!

Here are some resources that might be of interest as well:

Format your data with workflows
Custom Formula Functions

@karstenkoehler thank you for your help!

Could you please explain how the workflow you suggested would work with additional "0" within the phone number to help @teloss79, please?

Thanks a lot!

Have a great day!

Best,
Bérangère


Saviez-vous que la Communauté est disponible en Français ?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings!


0 Me gusta
MHolzer
Colaborador

Format phone number to add country code

resolver

Wouldn't this workflow also replace 0 inside of the Phone numbers?
So if you have a phone number which goes like this:
01573099230

Would the workflow not replace all 0s with +49? 
Which would get you the result of:
+491573+499923+49

0 Me gusta
JoeFromPinch
Participante

Format phone number to add country code

resolver

Super helpful! Thank you.

0 Me gusta
karstenkoehler
Miembro del salón de la fama | Partner
Miembro del salón de la fama | Partner

Format phone number to add country code

resolver

Hi @JoeFromPinch,

 

Happy to help. Make sure to test this first by copying the formatted phone number into another custom property. Search and replace actions can be hard to clean up if you're doing something wrong (e.g. searching all space characters in a word document and replacing them with nothing).

 

When everything looks good in the test property, you can unleash your workflow on the actual thing.

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

hkoops
Participante

Format phone number to add country code

resolver

What if you didn't need to replace numbers in the phone number but add a country code (currently phone numbers have no country code - US's country code is +1)? Can you give an example of how you would set that up?
The SMS feature won't work unless the number is specifically formatted with country code, parentheses, and hyphens. Ie +1 (555) 555-5555
I'm not sure how to make that specific format work in the workflows. I have Op Hub Pro.

SOConsulting
Miembro

Format phone number to add country code

resolver

I need to find a way to solve this issue as well.

@karstenkoehler do you have a solution for this? I'm using the concat("+1",[enrolled_object.phone]) solution noted in this thread but I need the format to be +1 (555) 555-5555 (FYI, all numbers would be from the US)

0 Me gusta
AClark80
Participante

Format phone number to add country code

resolver

I would too.  Did you find a solution?

 

0 Me gusta
eparma
Miembro

Format phone number to add country code

resolver

I'd like to see a United States +1 example/resource too. Thank you!

Hubjoy
Solución
Participante

Format phone number to add country code

resolver

Attaching an example of a US Phone number change here: @AClark80 , @hkoops 

 

1. Use the custom mode to create your own formula

2. Use 'concat' to append the phone number with the country code

3. Copy the appended value to the contact phone number
Screenshot 2024-09-03 at 3.05.51 PM.png

Screenshot 2024-09-03 at 3.06.04 PM.png