Data Hub

RMazzucchelli7
Member

How to Bulk assign Country phone number format

SOLVE

Hi everyone, I'm looking for a way to bulk assign country codes (e.g. +61) to phone numbers in HubSpot. We have a large list of contacts with local phone numbers that are missing international dialing codes, and I'd like to clean this up efficiently. Has anyone successfully done this via: A workflow? Import with formulas in Excel/Google Sheets? A custom-coded action or third-party integration? Would love to hear what’s worked for you—or if there’s a HubSpot-native way I’ve missed. Thanks in advance!

0 Upvotes
2 Accepted solutions
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

How to Bulk assign Country phone number format

SOLVE

Hi @RMazzucchelli7,

 

If you know which country code belongs to each phone number, then the easiest option should indeed be an export/import.

  1. Export your contacts
  2. Open in Google Sheets or Excel
  3. Create a new column using a formula to prepend the country code: =IF(LEFT(A2,1)="+", A2, "+61" & A2) – This avoids adding the prefix to already-correct numbers.
  4. Save as CSV and import back into HubSpot, mapping the new phone number to the Phone number property.

Doing this with a custom code action is also possible. With the help of gen AI, a snippet could look like this:

 

exports.main = async (event, callback) => {
  const phone = event.inputFields['phone'];
  if (phone && !phone.startsWith('+')) {
    callback({ outputFields: { updated_phone: `+61${phone}` } });
  } else {
    callback({ outputFields: { updated_phone: phone } });
  }
};

 

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.

View solution in original post

0 Upvotes
MHolzer
Solution
Contributor

How to Bulk assign Country phone number format

SOLVE

there is a private beta to this, which seems easier then custom code

MHolzer_0-1751372935743.png

just request it at the product updates or via your CS or a Support so that you have it quicker
@RMazzucchelli7 

View solution in original post

0 Upvotes
2 Replies 2
MHolzer
Solution
Contributor

How to Bulk assign Country phone number format

SOLVE

there is a private beta to this, which seems easier then custom code

MHolzer_0-1751372935743.png

just request it at the product updates or via your CS or a Support so that you have it quicker
@RMazzucchelli7 

0 Upvotes
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

How to Bulk assign Country phone number format

SOLVE

Hi @RMazzucchelli7,

 

If you know which country code belongs to each phone number, then the easiest option should indeed be an export/import.

  1. Export your contacts
  2. Open in Google Sheets or Excel
  3. Create a new column using a formula to prepend the country code: =IF(LEFT(A2,1)="+", A2, "+61" & A2) – This avoids adding the prefix to already-correct numbers.
  4. Save as CSV and import back into HubSpot, mapping the new phone number to the Phone number property.

Doing this with a custom code action is also possible. With the help of gen AI, a snippet could look like this:

 

exports.main = async (event, callback) => {
  const phone = event.inputFields['phone'];
  if (phone && !phone.startsWith('+')) {
    callback({ outputFields: { updated_phone: `+61${phone}` } });
  } else {
    callback({ outputFields: { updated_phone: phone } });
  }
};

 

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.

0 Upvotes