n8n-nodes-google-maps
v0.1.1
Published
n8n node to calculate travel time and distance using Google Maps API
Maintainers
Keywords
Readme
n8n-nodes-google-maps
This is an n8n community node. It lets you use Google Maps in your n8n workflows.
The node allows you to calculate the travel time and distance between two locations using the Google Maps Distance Matrix API.
n8n is a fair-code licensed workflow automation platform.
Installation Operations Credentials Compatibility Usage Resources Version history
Installation
Follow the installation guide in the n8n community nodes documentation.
Operations
- Get Travel Time and Distance: Calculates the travel time and distance between a specified origin and destination. You can specify the travel mode (Driving, Walking, Bicycling, or Transit).
Credentials
To use this node, you need to authenticate with the Google Maps API. You'll need a Google Maps API key.
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the "Distance Matrix API" for your project.
- Create an API key in the "Credentials" section.
- It is recommended to restrict the API key to be used only for the Distance Matrix API.
- In your n8n workflow, create new credentials for the Google Maps node.
- Enter your API key in the "API Key" field.
Compatibility
This node is compatible with n8n version 1.0.0 and later. It is tested against n8n * (as per peerDependencies).
Usage
This node takes an origin and a destination as input, along with a travel mode, and returns the travel distance and duration.
Example:
If you provide:
- Origin: "New York, NY"
- Destination: "Boston, MA"
- Travel Mode: "Driving"
The node will output an object containing:
origin: The full address of the origin.destination: The full address of the destination.distance: The distance in a human-readable format (e.g., "215 mi").distanceValue: The distance in meters.duration: The duration in a human-readable format (e.g., "3 hours 53 mins").durationValue: The duration in seconds.mode: The travel mode used for the calculation.
Resources
Version history
v0.1.0 - Initial release.
