0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions108

Overview

The node provides a "Calculate" resource with an operation called "Geodistance Version 2" that calculates the geographical distance between two locations. This is useful in scenarios where you need to determine the distance between two places, such as logistics planning, travel estimations, or location-based services.

For example, you can input a starting city and an ending city, and the node will return the distance between them. This can help automate workflows that depend on geographic distances without needing to write custom code.

Properties

Name Meaning
Starting Location The name or identifier of the starting point/location from which the distance calculation begins.
Ending Location The name or identifier of the ending point/location to which the distance is calculated.
Code Variables Optional user-defined variables that can be used within the code editor for advanced customization.

Output

The output is a JSON array containing the results of the geodistance calculation. Each item in the array corresponds to one input item processed by the node.

The json output field includes the calculated distance data between the specified starting and ending locations. The exact structure depends on the external service response but typically includes fields like distance value and units.

The node does not explicitly handle binary data for this operation.

Dependencies

  • Requires an API key credential for authentication with the external "0CodeKit" service.
  • The node sends a POST request to the endpoint corresponding to the resource "calculate" and operation "geodistance-v2".
  • No additional environment variables are required beyond the API key credential configuration.

Troubleshooting

  • Common issues:

    • Invalid or misspelled location names may cause errors or incorrect distance calculations.
    • Missing or invalid API key credential will prevent the node from authenticating and returning results.
    • Network connectivity issues can cause request failures.
  • Error messages:

    • Authentication errors indicate problems with the provided API key; verify and update credentials.
    • Validation errors may occur if required parameters (starting or ending location) are missing or empty.
    • Unexpected response or parsing errors suggest issues with the external service or malformed inputs.

To resolve these, ensure all required properties are correctly set, the API key is valid, and the locations exist and are spelled correctly.

Links and References

  • n8n Expressions Documentation
  • External service documentation is not included in the source but would typically be found on the provider's website for the "0CodeKit" API.

Discussion