Managing calls across various time zones can be a challenge, but with the power of an AI Agent of Brightcall and Zapier, you can automate and optimize your outreach efficiently. This guide will walk you through how to set up and schedule calls using your AI Agent, ensuring that leads from different regions are contacted/followed-up at the most appropriate times. To know more about IANA format for time zones, feel free to visit this article.
How to set up?
1. Open your Zapier account and create a Zap.
2. Add a trigger.
3. After the trigger step, add Code by Zapier
action
4. Choose Run Javascript
5. Configure the input data: variable name should be phone
as a value, you can add any field from the trigger.
6. Copy the code to the Code
field:
const phoneNumber = input.phone.replace(/\D/g, "")
const defaultCountryCode = 'Asia/Dubai' //Country code used by default
const timezonesByCountrycode = [
['46', 'Europe/Stockholm'], // Sweden
['355', 'Europe/Tirane'], // Albania
['376', 'Europe/Andorra'], // Andorra
['374', 'Asia/Yerevan'], // Armenia
['43', 'Europe/Vienna'], // Austria
['375', 'Europe/Minsk'], // Belarus
['32', 'Europe/Brussels'], // Belgium
['387', 'Europe/Sarajevo'], // Bosnia and Herzegovina
['359', 'Europe/Sofia'], // Bulgaria
['385', 'Europe/Zagreb'], // Croatia
['357', 'Asia/Nicosia'], // Cyprus
['420', 'Europe/Prague'], // Czech Republic
['45', 'Europe/Copenhagen'], // Denmark
['372', 'Europe/Tallinn'], // Estonia
['358', 'Europe/Helsinki'], // Finland
['33', 'Europe/Paris'], // France
['995', 'Asia/Tbilisi'], // Georgia
['49', 'Europe/Berlin'], // Germany
['30', 'Europe/Athens'], // Greece
['36', 'Europe/Budapest'], // Hungary
['354', 'Atlantic/Reykjavik'], // Iceland
['353', 'Europe/Dublin'], // Ireland
['39', 'Europe/Rome'], // Italy
['383', 'Europe/Belgrade'], // Kosovo
['371', 'Europe/Riga'], // Latvia
['423', 'Europe/Vaduz'], // Liechtenstein
['370', 'Europe/Vilnius'], // Lithuania
['352', 'Europe/Luxembourg'], // Luxembourg
['356', 'Europe/Malta'], // Malta
['373', 'Europe/Chisinau'], // Moldova
['377', 'Europe/Monaco'], // Monaco
['382', 'Europe/Podgorica'], // Montenegro
['31', 'Europe/Amsterdam'], // Netherlands
['389', 'Europe/Skopje'], // North Macedonia
['47', 'Europe/Oslo'], // Norway
['48', 'Europe/Warsaw'], // Poland
['351', 'Europe/Lisbon'], // Portugal
['40', 'Europe/Bucharest'], // Romania
['7', 'Europe/Kaliningrad'], // Russia (Kaliningrad)
['7', 'Europe/Moscow'], // Russia (Moscow)
['378', 'Europe/San_Marino'], // San Marino
['381', 'Europe/Belgrade'], // Serbia
['421', 'Europe/Bratislava'], // Slovakia
['386', 'Europe/Ljubljana'], // Slovenia
['34', 'Europe/Madrid'], // Spain
['41', 'Europe/Zurich'], // Switzerland
['90', 'Europe/Istanbul'], // Turkey
['380', 'Europe/Kyiv'], // Ukraine
['44', 'Europe/London'], // United Kingdom
['39', 'Europe/Vatican'], // Vatican City
['213', 'Africa/Algiers'], // Algeria
['244', 'Africa/Luanda'], // Angola
['229', 'Africa/Porto-Novo'], // Benin
['267', 'Africa/Gaborone'], // Botswana
['226', 'Africa/Ouagadougou'], // Burkina Faso
['257', 'Africa/Bujumbura'], // Burundi
['237', 'Africa/Douala'], // Cameroon
['238', 'Atlantic/Cape_Verde'], // Cape Verde
['236', 'Africa/Bangui'], // Central African Republic
['235', 'Africa/Ndjamena'], // Chad
['269', 'Indian/Comoro'], // Comoros
['242', 'Africa/Brazzaville'], // Congo (Brazzaville)
['243', 'Africa/Kinshasa'], // Congo (Kinshasa)
['225', 'Africa/Abidjan'], // Côte d'Ivoire
['253', 'Africa/Djibouti'], // Djibouti
['20', 'Africa/Cairo'], // Egypt
['240', 'Africa/Malabo'], // Equatorial Guinea
['291', 'Africa/Asmara'], // Eritrea
['268', 'Africa/Mbabane'], // Eswatini (Swaziland)
['251', 'Africa/Addis_Ababa'], // Ethiopia
['241', 'Africa/Libreville'], // Gabon
['220', 'Africa/Banjul'], // Gambia
['233', 'Africa/Accra'], // Ghana
['224', 'Africa/Conakry'], // Guinea
['245', 'Africa/Bissau'], // Guinea-Bissau
['254', 'Africa/Nairobi'], // Kenya
['266', 'Africa/Maseru'], // Lesotho
['231', 'Africa/Monrovia'], // Liberia
['218', 'Africa/Tripoli'], // Libya
['261', 'Indian/Antananarivo'], // Madagascar
['265', 'Africa/Blantyre'], // Malawi
['223', 'Africa/Bamako'], // Mali
['222', 'Africa/Nouakchott'], // Mauritania
['230', 'Indian/Mauritius'], // Mauritius
['212', 'Africa/Casablanca'], // Morocco
['258', 'Africa/Maputo'], // Mozambique
['264', 'Africa/Windhoek'], // Namibia
['227', 'Africa/Niamey'], // Niger
['234', 'Africa/Lagos'], // Nigeria
['250', 'Africa/Kigali'], // Rwanda
['290', 'Atlantic/St_Helena'], // Saint Helena
['239', 'Africa/Sao_Tome'], // São Tomé and Príncipe
['221', 'Africa/Dakar'], // Senegal
['248', 'Indian/Mahe'], // Seychelles
['232', 'Africa/Freetown'], // Sierra Leone
['27', 'Africa/Johannesburg'], // South Africa
['211', 'Africa/Juba'], // South Sudan
['249', 'Africa/Khartoum'], // Sudan
['268', 'Africa/Mbabane'], // Eswatini (Swaziland)
['255', 'Africa/Dar_es_Salaam'], // Tanzania
['228', 'Africa/Lome'], // Togo
['216', 'Africa/Tunis'], // Tunisia
['256', 'Africa/Kampala'], // Uganda
['260', 'Africa/Lusaka'], // Zambia
['263', 'Africa/Harare'], // Zimbabwe
['61', 'Australia/Sydney'], // Australia
['93', 'Asia/Kabul'], // Afghanistan
['880', 'Asia/Dhaka'], // Bangladesh
['673', 'Asia/Brunei'], // Brunei
['855', 'Asia/Phnom_Penh'], // Cambodia
['86', 'Asia/Shanghai'], // China (Mainland)
['61', 'Indian/Christmas'], // Christmas Island (Australia)
['61', 'Indian/Cocos'], // Cocos (Keeling) Islands (Australia)
['682', 'Pacific/Rarotonga'], // Cook Islands
['689', 'Pacific/Tahiti'], // French Polynesia
['691', 'Pacific/Chuuk'], // Federated States of Micronesia (Chuuk)
['691', 'Pacific/Kosrae'], // Federated States of Micronesia (Kosrae)
['691', 'Pacific/Pohnpei'], // Federated States of Micronesia (Pohnpei)
['298', 'Atlantic/Faroe'], // Faroe Islands
['679', 'Pacific/Fiji'], // Fiji
['502', 'Pacific/Guam'], // Guam
['852', 'Asia/Hong_Kong'], // Hong Kong
['91', 'Asia/Kolkata'], // India
['62', 'Asia/Jakarta'], // Indonesia (Western)
['62', 'Asia/Makassar'], // Indonesia (Central)
['62', 'Asia/Jayapura'], // Indonesia (Eastern)
['964', 'Asia/Baghdad'], // Iraq
['98', 'Asia/Tehran'], // Iran
['81', 'Asia/Tokyo'], // Japan
['962', 'Asia/Amman'], // Jordan
['850', 'Asia/Pyongyang'], // North Korea
['82', 'Asia/Seoul'], // South Korea
['965', 'Asia/Kuwait'], // Kuwait
['856', 'Asia/Vientiane'], // Laos
['960', 'Indian/Maldives'], // Maldives
['60', 'Asia/Kuala_Lumpur'], // Malaysia (Peninsular)
['60', 'Asia/Kuching'], // Malaysia (East)
['692', 'Pacific/Majuro'], // Marshall Islands
['692', 'Pacific/Kwajalein'], // Marshall Islands (Kwajalein)
['230', 'Indian/Mauritius'], // Mauritius
['976', 'Asia/Ulaanbaatar'], // Mongolia
['95', 'Asia/Yangon'], // Myanmar
['977', 'Asia/Kathmandu'], // Nepal
['64', 'Pacific/Auckland'], // New Zealand
['64', 'Pacific/Chatham'], // New Zealand (Chatham Islands)
['683', 'Pacific/Niue'], // Niue
['968', 'Asia/Muscat'], // Oman
['92', 'Asia/Karachi'], // Pakistan
['680', 'Pacific/Palau'], // Palau
['970', 'Asia/Gaza'], // Palestine
['63', 'Asia/Manila'], // Philippines
['670', 'Asia/Dili'], // Timor-Leste
['65', 'Asia/Singapore'], // Singapore
['677', 'Pacific/Guadalcanal'], // Solomon Islands
['94', 'Asia/Colombo'], // Sri Lanka
['963', 'Asia/Damascus'], // Syria
['66', 'Asia/Bangkok'], // Thailand
['670', 'Asia/Dili'], // Timor-Leste
['676', 'Pacific/Tongatapu'], // Tonga
['971', 'Asia/Dubai'], // United Arab Emirates
['678', 'Pacific/Efate'], // Vanuatu
['84', 'Asia/Ho_Chi_Minh'], // Vietnam
['681', 'Pacific/Wallis'], // Wallis and Futuna
['967', 'Asia/Aden'], // Yemen
['51', 'America/Lima'], // Peru
['54', 'America/Bogota'], // Colombia
['55', 'America/Sao_Paulo'], // Brazil
['52', 'America/Mexico_City'], // Mexico
['56', 'America/Asuncion'], // Paraguay
['595', 'America/Montevideo'], // Uruguay
['54', 'America/Argentina/Buenos_Aires'], // Argentina
['57', 'America/Bogota'], // Colombia
['502', 'America/Guatemala'], // Guatemala
['504', 'America/Tegucigalpa'], // Honduras
['51', 'America/Lima'], // Peru
['56', 'America/Asuncion'], // Paraguay
['598', 'America/Montevideo'], // Uruguay
['51', 'America/Lima'], // Peru
['57', 'America/Bogota'], // Colombia
['591', 'America/La_Paz'], // Bolivia
['52', 'America/Cancun'], // Mexico (Cancun)
['58', 'America/Caracas'], // Venezuela
['598', 'America/Montevideo'], // Uruguay
]
const timezone = timezonesByCountrycode.find(tz => phoneNumber.startsWith(tz[0]) )
output = {timezone: timezone ? timezone[1] : defaultCountryCode}
7. Test the code. You can now use the output value timezone
in subsequent actions.
8. You’ve now successfully set up a trigger and condition that automatically recognizes each contact's time zone based on their phone number’s country code.
9. To complete your Zap, make sure to add an Action that transfers the contacts into a Project (calling list) in Brightcall. For more details on how to add contacts into a project, refer to the the following article.