Format Australian Phone Numbers Automatically in HubSpot
Australian numbers arrive in a dozen shapes: 0412345678, 0412 345 678, (07) 3000 0000. One Data Hub Professional workflow rewrites them all into +61 format as they arrive.
3. Create the Formatting Action
Now for the action that does the actual work. Format Data sits under Data Hub, which is where the old Operations Hub tools ended up when HubSpot consolidated them, so if you go hunting through the menus for Operations Hub you won't find it. Check the path in your own portal before you follow the screenshots.
Add a new action, and go down to Data Ops. From here select Format Data and follow these steps:
1. Select the property you want to format, in this case it'll be Phone Number.
2. Turn Custom Mode ON.
How many phone formats are in your contact list?
Every import brought its own, and the dialler notices.
3. Place your cursor before the Phone Number token and select Insert > Function > regex_replace.
4. The formula comes in two parts, the first is to remove any non-number characters. The second part is to replace the first 0 in a number to "+61".
5. Your Formula should look something like this. You can copy and paste this formula, just make sure to replace "PropertyGoesHere" with the correct property (either phone number or mobile number).
regex_replace(regex_replace([PropertyGoesHere], "[^0-9]", ""), "^0", "+61")
The +61 part is not cosmetic. ACMA sets the Australian numbering plan, so a mobile is 04XX XXX XXX written for someone here and +61 4XX XXX XXX written for anything outside the country. Dropping the leading zero and putting +61 in front is what makes the number callable from an overseas SIM and readable by any calling, SMS or WhatsApp tool bolted onto your CRM, most of which expect that international format and fail without it. If the same records have text sitting in a number field, that is the same corner of the menu: here is a related Data Hub property conversion.
4. Turn On Your Workflow
That's it. Turn your workflow on and you're ready to go. You can add the same action to any workflow that touches a number property, so pick the ones that matter: the mobile your calling tool dials, and the phone number your team reads off the record.
Formatting new records leaves the back catalogue alone, so this is one job on a longer list. It sits inside the wider data hygiene clean-up this fits into, and if you want one more built on the same tools, try another Data Hub hack using the same consolidated tools. Doing the lot across a portal is how we handle data hygiene as part of a RevOps build.
Worth fixing the numbers already in the database?
Formatting new entries leaves years of old ones untouched.