I don't have country code but countries on my Google Sheets, how to get country codes?

Hi!

I’m trying to send phone numbers to monday.com board from google sheets but I don’t have the country codes that monday.com needs on my sheets, but I have countries.

Can you recommend a solution to add the country code for each row that I send to monday from sheets?

Hi. one solution would be to use a lookup table in your Google Sheets to match the country name to its corresponding country code. You could then use a formula or script to automatically add the country code to the phone number before sending it to monday.com.

If you need additional support, please don’t hesitate to reach out.

Cheers
//HFBR

3 Likes

Another solution would be to use a service like Opencage Data which provides a simple way to find the country code using the country name.

You can also use a script like this one in your google sheet:

function addCountryCode(country, phone) {
var countryCode = {“Afghanistan”: “93”, “Albania”: “355”, “Algeria”: “213”, “American Samoa”: “1 684”, “Andorra”: “376”, “Angola”: “244”, “Anguilla”: “1 264”, “Antarctica”: “672”, “Antigua and Barbuda”: “1 268”, “Argentina”: “54”, “Armenia”: “374”, “Aruba”: “297”, “Australia”: “61”, “Austria”: “43”, “Azerbaijan”: “994”, “Bahamas”: “1 242”, “Bahrain”: “973”, “Bangladesh”: “880”, “Barbados”: “1 246”, “Belarus”: “375”, “Belgium”: “32”, “Belize”: “501”, “Benin”: “229”, “Bermuda”: “1 441”, “Bhutan”: “975”, “Bolivia”: “591”, “Bosnia and Herzegovina”: “387”, “Botswana”: “267”, “Brazil”: “55”, “British Indian Ocean Territory”: “246”, “British Virgin Islands”: “1 284”, “Brunei”: “673”, “Bulgaria”: “359”, “Burkina Faso”: “226”, “Burma (Myanmar)”: “95”, “Burundi”: “257”, “Cambodia”: “855”, “Cameroon”: “237”, “Canada”: “1”, “Cape Verde”: “238”, “Cayman Islands”: " 345", “Central African Republic”: “236”, “Chad”: “235”, “Chile”: “56”, “China”: “86”, “Christmas Island”: “61”, “Cocos (Keeling) Islands”: “61”, “Colombia”: “57”, “Comoros”: “269”, “Cook Islands”: “682”, “Costa Rica”: “506”, “Croatia”: “385”, “Cuba”: “53”, “Cyprus”: “357”, “Czech Republic”: “420”, “Democratic Republic of the Congo”: “243”, “Denmark”: “45”, “Djibouti”: “253”, “Dominica”: “1 767”, “Dominican Republic”: “1 809”, “East Timor”: “670”, “Ecuador”: “593”, “Egypt”: “20”, “El Salvador”: “503”, “Equatorial Guinea”: “240”, “Eritrea”: “291”, “Estonia”: “372”, “Ethiopia”: “251”, “Falkland Islands”: “500”, “Faroe Islands”: “298”, “Fiji”: “679”, “Finland”: “358”, “France”: “33”, “French Polynesia”: “689”, “Gabon”: “241”, “Gambia”: “220”, “Georgia”: “995”, “Germany”: “49”, “Ghana”: “233”, “Gibraltar”: “350”, “Greece”: "

2 Likes

If you need additional support, please don’t hesitate to reach out.

Cheers
//HFBR

1 Like

Or you could also use a switch() function in your scenario to use this mapping. :smiley:

2 Likes

Hi @onurbolaca, you can use the Phone Number module to validate the number and get the data you need for Monday.com

I share an example.

image

4 Likes

Thank you all for your nice answers,

@Francisco_Fontes this module is very useful but it cannot find the country code by the name of the country.

@Callinetic Is there a way to switch in json values on switch tool? Because there are 250 countries :smiley:

You could try using the ISO app (see https://www.make.com/en/integrations/iso) to convert the country name to the ISO country code, and then use the returned two-character country code as the “Default country for parsing” as part of the input to the Phone Number app.

3 Likes

Hi @DavidGurr_Make,

This one is crazy. End product by make.

Just wanted to say thank you for mentioning the phone number app in Make.com. I had been struggling for 3 hours with some complex reg exp to handle some cases around phone numbers and I was getting desperate. The phone number module solved it in a second.
Thank you so much :pray:

1 Like