The Scenario
Your SEO lead left the team six weeks ago. They were midway through a localized rank-tracking project — twenty target countries, each needing geo-specific SERP queries. The handoff notes say "use the Google country codes in the Markets worksheet." The Markets worksheet has country names. No codes. No documentation about where the codes came from or how to look them up.
You've inherited the project and the quarterly review is in two weeks.
The bad version:
- Google "Google Search country codes," find a blog post with a partial list, manually match each of the twenty country names to a code, wonder if the list is still current
- Cross-reference with the Autom API docs, notice three countries on your list aren't in the blog post, spend 20 minutes tracking down the edge cases
- Paste the codes into the workbook one by one, misspell "Netherlands" as "Netherland" in the function call, get a silent API error on three rows
The quarterly review has a slide for "localized SERP coverage." Right now that slide has nothing on it.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Excel workbook. It reads the country names in your workbook, calls Autom's country code lookup endpoint for each one, and writes the resolved codes directly into the adjacent column. You don't touch the API docs.
Read the Excel table 'Markets' — column A has country names. For each one, call Autom to retrieve the Google country code and write it into the 'GoogleCountryCode' column.
What You Get
- The 'GoogleCountryCode' column populated with the correct Google country code for each row
- "Not found" written for any country name Autom does not recognize, rather than leaving the cell blank
- No silent failures — every row gets a result or an explicit flag
What If the Data Is Not Quite Ready
Country names are written inconsistently — "US," "U.S.," "United States," and "USA" all appear
Before calling Autom, normalize each value in the country name column of the 'Markets' table to its full English country name (e.g., "US" → "United States"). Then use Autom to look up the Google country code for each normalized name and write it into the 'GoogleCountryCode' column.
The workbook has a mix of country names and region names that shouldn't be included
For each row in the 'Markets' table, skip any value that appears to be a region or continent (e.g., "APAC," "EMEA," "Latin America"). For country names, use Autom to look up the Google country code and write it into the 'GoogleCountryCode' column. Write "skipped — not a country" for the excluded rows.
Country codes need to be joined with a second worksheet that has the campaign budget per market
Use Autom to look up the Google country code for each country name in the 'Markets' table and write it into the 'GoogleCountryCode' column. Then join with the 'Budgets' worksheet on the country name column and write the corresponding budget value into a new 'Budget' column.
Full audit-plus-fill in one shot
The 'Markets' table has country names in column A, some inconsistently formatted ("UK," "United Kingdom," and "Britain" all appear). Normalize them to standard full English country names. Use Autom to look up the Google country code for each. Write the normalized country name back into column A, the country code into the 'GoogleCountryCode' column, and flag any row where normalization was ambiguous with "review" in a new 'Flag' column.
One prompt handles the normalization, the lookup, and the audit flag — no intermediate cleanup pass needed.
Try It
Open any workbook with a market list and get the 7-day free trial of SheetXAI — then ask it to resolve your country names to Google country codes via Autom. Also see: resolving city and region names to location codes and the Autom hub overview.
