Actions30
- Company Actions
- Company (Related) Actions
- Data (Advanced) Actions
- Enrich Actions
- Live Web RAG Actions
- LLM Template Actions
- Other Data Actions
- Validation & Cleansing Actions
Overview
The node provides validation and cleansing functionality for geographic data, specifically validating city names globally. The "Validate City" operation allows users to input a city name along with a country code (ISO 3166-1 Alpha-2 format) to verify if the city is valid within that country context.
This node is beneficial in scenarios where workflows require accurate geographic data validation, such as address verification, customer data cleansing, or location-based filtering. For example, before shipping products or sending marketing materials, you can validate that the city entered by a user exists in the specified country, reducing errors and improving data quality.
Properties
| Name | Meaning |
|---|---|
| City | (Required) Enter the name of the city to validate. |
| Country (ISO 3166-1 Alpha-2) | (Required) Enter the two-letter country code to specify the country context (e.g., nl, us). |
Output
The node outputs JSON data containing the validation results from the API. The exact structure depends on the external API response but generally includes:
- Confirmation whether the city is valid.
- Possibly additional metadata about the city (such as standardized name, region, or other related info).
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for the Bedrijfsdata API service.
- The node makes HTTP GET requests to the
/cityendpoint of the Bedrijfsdata API. - The base URL used is
https://api.bedrijfsdata.nl/v1.2. - Proper configuration of the API key credential in n8n is necessary for authentication.
Troubleshooting
Common Issues:
- Invalid or missing API key credential will cause authentication failures.
- Providing an invalid or misspelled country code or city name may result in no matches or errors.
- Network connectivity issues can prevent successful API calls.
Error Messages:
"Failed to fetch cities: <message>"indicates the API returned an unexpected response or error message."Error fetching cities: <message>"indicates a network or request failure.
Resolutions:
- Verify the API key credential is correctly set up and active.
- Ensure the city and country code inputs are correct and conform to expected formats.
- Check network connectivity and retry the operation.
- Review API usage limits or restrictions that might block requests.
Links and References
- Bedrijfsdata API Documentation (general reference for API endpoints)
- ISO 3166-1 Alpha-2 Country Codes for valid country codes