On contact, I have two property Country and Country Code.
I need to auto-update Country Code based on Country whenever a new contact is created.
I know I can use the workflow, but it is only useful if I have 4-5 countries. But if I have more than 100 countries, then it will become tough to handle that workflow.
is there any way where I don't need to hard code each and every country in my workflow. Like store the country and country code in list and in run time get the value from there.
As far as I know, with HubSpot's current phone number formatting feature, you still have to manually select the country code. So, you'd have to find some workaround to get the country code to auto-populate.
I think that Insycle could be of help here. Full disclosure, I work for Insycle, but it seems a good fit for your use case:
Format your phone number field with a country code, based on location data.
Autopopulate a "country code" field based on location data.
Format phone numbers using many pre-built templates for popular formats.