0-CodeKit icon

0-CodeKit

A toolbox of no-code utilities

Overview

The Convert: IP to Geo operation in the 0-CodeKit node takes an IPv4 or IPv6 address as input and returns geographical information about that IP address. This is useful for workflows where you need to determine the location of a user, device, or server based on their IP address. Common scenarios include:

  • Enriching customer data with geolocation for analytics.
  • Detecting potential fraud by checking if an IP's location matches expected regions.
  • Customizing content or services based on user location.

Example:
A marketing workflow could use this node to identify the country or city of website visitors by their IP addresses.

Properties

Name Meaning
IPV4 or IPV6 The IP address (IPv4 or IPv6) to analyze for geolocation.

Output

The output will be a JSON object containing geolocation details corresponding to the provided IP address. While the exact structure depends on the underlying API/service, typical fields may include:

{
  "ip": "8.8.8.8",
  "country": "United States",
  "region": "California",
  "city": "Mountain View",
  "latitude": 37.386,
  "longitude": -122.0838,
  ...
}
  • ip: The queried IP address.
  • country: Country name.
  • region: State or region.
  • city: City name.
  • latitude/longitude: Geographic coordinates.
  • Additional fields may be present depending on the service response.

Dependencies

  • External Service/API Key: Requires credentials named codeKitApi to access the CodeKit API.
  • n8n Configuration: Ensure the codeKitApi credential is set up in your n8n instance.

Troubleshooting

  • Missing or Invalid API Key: If the codeKitApi credential is not configured or invalid, the node will throw an authentication error.
    Resolution: Set up the correct API key in n8n credentials.
  • Invalid IP Address: Providing an incorrectly formatted IP address may result in an error or empty response.
    Resolution: Validate the IP address format before submitting.
  • API Rate Limits or Downtime: If the external service is unavailable or rate-limited, errors may occur.
    Resolution: Check service status and consider retry logic or error handling in your workflow.
  • Error Handling: If "Continue On Fail" is enabled, errors are returned in the output as { "error": "error message" }.

Links and References

Discussion