Actions40
- AI Actions
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Generate Actions
- Operator Actions
- PDF Actions
- Storage Actions
Convert → Nation ISO Switch
AI-generatedOverview
The Convert: Nation ISO Switch operation in the 0CodeKit node allows you to convert between a country's full English name and its ISO-Alpha-3166 code (e.g., "Germany" ↔ "DE"). This is useful for workflows that require standardized country codes or need to display user-friendly country names based on ISO codes.
Common scenarios:
- Standardizing user input of country names to ISO codes for API requests.
- Displaying readable country names from datasets containing only ISO codes.
- Data transformation tasks in internationalization, shipping, or analytics pipelines.
Practical examples:
- Converting "France" to "FR" before sending data to a payment gateway.
- Translating "US" to "United States" for reporting purposes.
Properties
| Name | Meaning |
|---|---|
| Operation | Selects the conversion direction: - Nation to ISO - ISO to Nation |
| Nation Value | The full name of the nation in English. Used when converting from nation name to ISO code. |
| ISO Value | The ISO-Alpha-3166 code of the nation (e.g., DE). Used when converting from ISO to nation. |
Output
The output will be a JSON object containing the result of the conversion. Depending on the selected operation:
- Nation to ISO:
{ "iso": "DE" } - ISO to Nation:
{ "nation": "Germany" }
If an error occurs (and "Continue On Fail" is enabled), the output may include:
{
"error": "Error message"
}
Dependencies
- External Service: Requires access to the CodeKit API (via the
codeKitApicredential in n8n). - n8n Configuration: You must set up the
codeKitApicredential with the appropriate API key or authentication details.
Troubleshooting
Common issues:
- Invalid country name or ISO code: If the provided value does not match a recognized country, the node may return an error or an empty result.
- Missing required property: If you select "Nation to ISO" but do not provide a nation name (or vice versa), the node will throw an error.
- API credential errors: If the
codeKitApicredential is missing or invalid, the node will fail to execute.
Common error messages:
"Missing required parameter": Ensure all required fields are filled based on your selected operation."Invalid nation/ISO code": Double-check the spelling of the nation or the format of the ISO code."Authentication failed": Verify yourcodeKitApicredentials in n8n.