Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
The node provides a utility to convert between nation names and their corresponding ISO Alpha-3166 codes, and vice versa. This is useful in scenarios where you need to standardize country data formats, such as preparing data for international shipping, localization, or analytics that require consistent country identifiers.
For example:
- Converting the full English name of a country like "Germany" into its ISO code "DE".
- Converting an ISO code like "US" back into the full country name "United States".
This operation helps automate data normalization tasks involving country information.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose the conversion direction: "Nation to ISO" or "ISO to Nation". |
| Nation Value | The full English name of the nation (required if converting from Nation to ISO). |
| ISO Value | The ISO Alpha-3166 code of the nation (required if converting from ISO to Nation). |
| Code Variables | (Advanced) Allows setting custom code variables by specifying variable names/IDs and their values. Useful when integrating with code editor functions. |
Output
The output JSON contains the result of the conversion:
- If converting from Nation to ISO, the output will include the corresponding ISO Alpha-3166 code.
- If converting from ISO to Nation, the output will include the full English name of the nation.
The exact structure depends on the external service response but generally includes a key indicating the converted value.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential for authentication with the external "0CodeKit" service.
- The node sends requests to the "convert/nationiso" endpoint of the service.
- Proper configuration of the API key credential in n8n is necessary for successful execution.
Troubleshooting
- Invalid Input Errors: Providing an incorrect or misspelled nation name or ISO code may cause errors or empty results. Ensure inputs are accurate and conform to expected formats.
- Authentication Failures: Missing or invalid API credentials will prevent the node from working. Verify that the API key credential is correctly set up.
- Network Issues: Connectivity problems can cause request failures. Check network access to the external service.
- Unexpected Response Format: If the external service changes its response format, the node might not parse results correctly. Confirm the service status and update the node if needed.
Links and References
- ISO 3166 Country Codes - Wikipedia
- n8n Expressions Documentation (for using expressions in variable fields)