Standardize country names into ISO codes

Resolve every messy country name into a clean ISO 3166-1 alpha-2 code. Enrich your shipment CSV with a standardized country field that downstream systems can actually read.

The prompt

I want to enrich our shipment records by standardizing the raw country name fields into ISO country codes. Can you build me a flow that reads the CSV, runs each country name field through OpenAI to resolve and standardize it, maps the output to the correct ISO 3166-1 alpha-2 code, and exports an enriched CSV with the new country code column appended?

Just copy and paste the prompt into a new Parabola flow to get started.

What Parabola builds

A workflow with five steps you can edit:

1. Read the shipment CSV. From a file drop, an inbox, an SFTP, or a portal export. The flow handles whatever lands.

2. Detect the country field. Some files put it in "Destination Country," some in "DEST_CTRY," some in a free-text address block. The AI step finds the right column on each file.

3. Resolve every variant through AI. "USA," "United States," "U.S.A.," "U S," and "America" all collapse to the same answer. Same for "England" and "Great Britain" rolling up under the UK, or "Czechia" matching "Czech Republic."

4. Map to ISO 3166-1 alpha-2. Two-letter code on every row. The reference table is built into the flow and updates when the ISO list changes.

5. Export the enriched file. Original columns preserved, new country code column appended, optional flag for any row the AI couldn't resolve so a human can review.

Why teams stop doing this manually

Shipment data is dirty by default. Three carriers spell the same country three ways. A free-text address field has the country buried at the end. A new market opens and the entry summaries come in with abbreviations nobody at the desk has seen before. Every downstream system, from the customs broker to the duties calculator to the analytics dashboard, expects a clean two-letter code.

The manual version is a VLOOKUP against a reference table that nobody updates. It works fine for the top twenty markets. It breaks the day a shipment lands from a country the reference table doesn't include, or the day someone types the country name in a way the lookup doesn't match. The exceptions stack up in a quarantine queue and someone burns an afternoon clearing it every week.

The cost of skipping the cleanup is downstream. The duties calculator misses a row. The shipment analytics dashboard underweights a region. The customs filing carries a country name the broker's system doesn't accept. Each of these traces back to the same upstream problem.

How it works

Step 1. Paste the prompt.

Open Parabola, paste the prompt in section 2, and let it ask follow-up questions about your file format, where it lives, and whether you want to enrich destination, origin, or both.

Step 2. Connect your data.

File source for the shipment CSV. Optional reference file if you keep an internal country code crosswalk that overrides ISO defaults.

Step 3. Run it on every file.

The flow triggers when a new shipment file lands, runs the enrichment, and drops the enriched version where the downstream tools pick it up.

FAQ

Does this work on files where the country is buried inside an address field?

Yes. The AI extraction can pull the country out of a free-text address block, then run it through the same resolution and code-mapping logic.

What about countries that have changed names or codes recently?

The ISO reference table is kept current in the flow. Czechia, Eswatini, North Macedonia, and other recent updates resolve to the right alpha-2 code.

Can the flow handle non-Latin character sets?

Yes. The AI step resolves country names written in Cyrillic, Chinese, Japanese, Arabic, and other scripts and maps them to the ISO code.

What happens when the AI can't resolve a value?

The row gets flagged with a confidence score and the original value. A human reviews it, makes the call, and the flow learns the resolution for next time.

How is this different from a static lookup table?

A lookup table only matches exact strings. This flow handles typos, abbreviations, alternate spellings, address-embedded names, and non-Latin scripts. It's why teams stop maintaining the lookup table.
Clean country data on every file, automatically.
Paste the prompt, point it at your shipment file, and let the enrichment run every time a new one lands.
Start for free