OA
OpsAgent

Extract ISO Code

Last updated 3 weeks ago

The Extract ISO Code action converts a country name into standardized ISO codes, language information, and geographic region. Add it to any contact, company, deal, or ticket workflow to normalize country data automatically.

How It Works

Add the Extract ISO Code action to a HubSpot workflow. When a record reaches this step, the app reads the country name from the property you selected, looks it up, and returns standardized codes, language data, and regional classification.

Action Inputs

When you add the Extract ISO Code action to a workflow, you configure the following field:

Field Required Description
Country Name Yes The country name to extract ISO code from

The app is flexible about what you provide. It accepts:

  • Full country names - "United States", "Germany", "Japan"
  • Common abbreviations - "USA", "UK"
  • ISO codes - "US", "DE", "USA", "DEU"
  • Alternative and native names - "Deutschland", "Holland", "Nippon"
  • Any capitalization - "france", "FRANCE", "France" all work

Action Outputs

After the action runs, the following output values are available for use in subsequent workflow steps:

Output Type Description
ISO Alpha-2 Code Text The two-letter country code (e.g., "US", "DE", "JP") - the most widely used format
ISO Alpha-3 Code Text The three-letter country code (e.g., "USA", "DEU", "JPN")
Normalized Country Name Text The official English name of the matched country - useful for cleaning up inconsistent data
Primary Language Text The main language spoken in the country (e.g., "English", "German", "Japanese")
Primary Language Code Text The language code for the primary language (e.g., "en", "de", "ja")
All Languages Text A comma-separated list of all official languages spoken in the country
Region Text The geographic region the country belongs to (e.g., "Americas", "Europe", "Asia")
Country Found Yes/No Whether the app found a matching country. Use this for branching.
Success Yes/No Whether the action completed without errors
Error Message Text If something went wrong during processing, this contains a description of the problem

Tip: To learn how to use these output values in later workflow actions (e.g., copy to a property, use in branching logic), see Using workflow action outputs in the HubSpot Knowledge Base.

Usage Examples

Standardize Contact Country Data

Add the Extract ISO Code action to a contact workflow that triggers when a new contact is created. Map the "Country" property as input. Use the Copy Property Value action afterward to write the ISO Alpha-2 Code result back to a custom "Country Code" property on the contact. This ensures every contact has a consistent, standardized country code regardless of how the country was originally entered.

Route Deals by Region

In a deal workflow, extract the ISO code from the associated company's country. Branch the workflow based on the Region result - route "Europe" deals to your EMEA team, "Americas" deals to your Americas team, and so on.

Localize Communication

Use the Primary Language Code result to branch your workflow and send contacts down language-specific paths. For example, contacts in Germany receive German-language emails, contacts in France receive French-language emails, and everyone else receives English.

Enrich Records for Reporting

Run the action on existing records using a bulk workflow to fill in ISO codes, language, and region data across your CRM. This enriched data makes it possible to build region-based reports and dashboards without manual data entry.

Tips

  • Test with edge cases first. Try common abbreviations ("USA", "UK") and alternative names ("Holland", "Deutschland") in a test workflow to see how the app handles your data.
  • Use Country Found for branching. Always add a branch after the action that checks whether a country was found. This lets you handle unrecognized inputs gracefully - for example, by sending them to a manual review queue.
  • Combine with Copy Property Value. The action returns results that you can use in subsequent steps, but it does not write them back to the record automatically. Use HubSpot's built-in Copy Property Value action to store any of the results on a CRM property.
  • Works with any text property. The Country Name input is not limited to HubSpot's built-in country property. You can point it at any single-line text property that contains a country name.
Previous
Use Cases