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 "Calculate" resource with an operation called "Geodistance". This operation calculates the geographical distance between two locations specified by the user. It is useful in scenarios where you need to determine the distance between two cities, addresses, or any geographic points for logistics, travel planning, delivery services, or location-based analytics.
For example, you could use this node to calculate the distance from Berlin to Flensburg to estimate travel time or shipping costs.
Properties
| Name | Meaning |
|---|---|
| Starting Location | The starting point of the distance calculation. A string representing a location (e.g., city name). |
| Ending Location | The ending point of the distance calculation. A string representing a location (e.g., city name). |
| Code Variables | Optional code variables that can be defined and passed into the calculation function as key-value pairs. Useful for dynamic or custom variable injection. |
Output
The output is a JSON array containing the result(s) of the geodistance calculation. Each item in the array represents the calculated distance data for one input item.
- The exact structure of the JSON output is not explicitly detailed in the source, but it typically includes the computed distance value between the two specified locations.
- The node does not output binary data for this operation.
Dependencies
- Requires an API key credential for authentication with the external service powering the calculations.
- The node calls an external API endpoint under the path
calculate/geodistanceorcalculate/geodistance-v2. - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
Common issues:
- Invalid or unrecognized location names may cause errors or incorrect distance results.
- Missing or invalid API key credential will prevent the node from successfully calling the external service.
- Network connectivity issues can cause request failures.
Error messages:
- Errors related to invalid parameters usually indicate that the "Starting Location" or "Ending Location" inputs are missing or malformed.
- Authentication errors suggest problems with the provided API key credential.
- To resolve these, verify that all required properties are correctly set and that the API key credential is valid and active.
Links and References
- n8n Expressions Documentation — for using expressions in property values such as code variables.
- External API documentation for the geodistance calculation service (not provided in source; consult your API provider).