Coordinates to Address
Converts geographic coordinates (latitude and longitude) to a human-readable address using Google Maps API.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Latitude - The latitude coordinate as a decimal number.
- Longitude - The longitude coordinate as a decimal number.
Options
- Credentials - Google Maps API key credential used to authenticate with the service.
Output
- Result - The reverse geocoding result containing the address information corresponding to the coordinates.
How It Works
The Coordinates to Address node converts geographic coordinates into a human-readable address using Google Maps Reverse Geocoding API. When executed, the node:
- Validates the provided latitude and longitude inputs
- Retrieves the Google Maps API key from credentials
- Creates a Reverse Geocoding request with the provided coordinates
- Sends the request to Google Maps Reverse Geocoding API
- Returns the reverse geocoding result which includes:
- Formatted address
- Address components (street, city, state, etc.)
- Place ID
- Address types and categories
Requirements
- A valid Google Maps API key with Geocoding API enabled
- Valid latitude and longitude coordinates
Error Handling
The node will return specific errors in the following cases:
- Invalid or missing latitude input
- Invalid or missing longitude input
- Invalid or missing Google Maps API credentials
- Google Maps API service errors
- Network connectivity issues
Practical Examples
Example 1: Reverse Geocode GPS Coordinates
Convert GPS coordinates to a street address:
Input:
- Latitude:
37.4224764 - Longitude:
-122.0842499 - Credentials: Your Google Maps API key
Output (Result object contains):
{
"formatted_address": "1600 Amphitheatre Parkway, Mountain View, CA 94043, USA",
"address_components": [
{ "long_name": "1600", "short_name": "1600", "types": ["street_number"] },
{ "long_name": "Amphitheatre Parkway", "short_name": "Amphitheatre Pkwy", "types": ["route"] },
{ "long_name": "Mountain View", "short_name": "Mountain View", "types": ["locality"] },
{ "long_name": "California", "short_name": "CA", "types": ["administrative_area_level_1"] }
],
"place_id": "ChIJ2eUgeAK6j4ARbn5u_wAGqWA"
}
Access address:
- Full Address:
{{result.formatted_address}}
Example 2: Extract Location Information from Mobile App
Process GPS data from a mobile device or IoT sensor:
Workflow:
- HTTP Request - Receive GPS data from mobile app
- Payload contains:
{{gpsData.lat}},{{gpsData.lng}}
- Payload contains:
- Coordinates to Address - Convert to readable address
- Latitude:
{{gpsData.lat}} - Longitude:
{{gpsData.lng}}
- Latitude:
- Set Variable - Store location details
{{userLocation}}={{result.formatted_address}}
- Send Email - Notify with location
- Subject: "User Location Update"
- Body: "User is at:
{{userLocation}}"
Example 3: Find Nearest City or Landmark
Determine what's at or near specific coordinates:
Input:
- Latitude:
40.689247 - Longitude:
-74.044502
Output formatted_address:
"Statue of Liberty, Liberty Island, New York, NY 10004, USA"
Use Case: Identify landmarks, cities, or points of interest from coordinate data
Example 4: Batch Reverse Geocode Delivery Locations
Convert GPS tracking data to addresses for delivery reports:
- Read Excel - Load GPS coordinates from tracking log
- Loop - Process each coordinate pair
- Coordinates to Address - Get address for each location
- Latitude:
{{item.lat}} - Longitude:
{{item.lng}}
- Latitude:
- Set Variable - Extract city and postal code
- Find city:
{{result.address_components}}where type is "locality" - Find zip:
{{result.address_components}}where type is "postal_code"
- Find city:
- Write Excel - Save delivery report with addresses
Example 5: Get Address Components Separately
Extract specific parts of the address:
Input:
- Latitude:
51.5074 - Longitude:
-0.1278
Extract from Result:
// Find street number
{{result.address_components.find(c => c.types.includes('street_number')).long_name}}
// Find street name
{{result.address_components.find(c => c.types.includes('route')).long_name}}
// Find city
{{result.address_components.find(c => c.types.includes('locality')).long_name}}
// Find postal code
{{result.address_components.find(c => c.types.includes('postal_code')).long_name}}
// Find country
{{result.address_components.find(c => c.types.includes('country')).long_name}}
Tips for Effective Use
Coordinate Format
-
Use Decimal Degrees: Both latitude and longitude must be decimal numbers
- Correct: Latitude:
37.4224764, Longitude:-122.0842499 - Incorrect:
"37° 25' 20.9" N"(DMS format not supported directly)
- Correct: Latitude:
-
Valid Ranges:
- Latitude: -90 to 90 (negative = South, positive = North)
- Longitude: -180 to 180 (negative = West, positive = East)
Understanding Multiple Results
Reverse geocoding may return multiple addresses for the same coordinates:
- First Result: Usually the most specific (street address)
- Additional Results: Broader locations (neighborhood, city, postal code, country)
- Access All:
{{result}}is an array, use{{result[0]}}for most specific
Example Results for Same Coordinates:
"1600 Amphitheatre Parkway, Mountain View, CA 94043, USA""Mountain View, CA 94043, USA""Santa Clara County, CA, USA""California, USA""United States"
Result Types
Each result has a types array indicating what it represents:
street_address- Precise street addressroute- Named route (street/highway)locality- City or townpostal_code- ZIP/postal code areacountry- Countrypoint_of_interest- Landmark or POI
Filter by type:
// Get only street addresses
{{result.filter(r => r.types.includes('street_address'))}}
Precision and Accuracy
- Coordinates with more decimal places are more precise
- 6 decimal places = ~0.1 meter accuracy
- Ocean/remote coordinates may return nearest known location
- Coordinates in unpopulated areas may return general region names
Working with Different Coordinate Sources
Common sources and how to use them:
GPS Devices: Usually provide decimal degrees directly
- Use values as-is:
37.4224764, -122.0842499
Google Maps URLs: Extract coordinates from URL
- URL:
https://www.google.com/maps/@37.4224764,-122.0842499,17z - Parse to get:
37.4224764and-122.0842499
Degrees/Minutes/Seconds (DMS): Convert to decimal first
- DMS:
37°25'20.9"N 122°05'3.3"W - Decimal:
37.422472, -122.084250 - Use a converter or formula:
Decimal = Degrees + (Minutes/60) + (Seconds/3600)
Common Errors and Solutions
Error: "ErrInvalidArg: Latitude/Longitude cannot be empty"
Cause: Missing coordinate input.
Solution:
- Verify both latitude and longitude variables have values
- Check for null/undefined values in your data source
- Use conditional logic to skip rows with missing coordinates
Error: "ErrCredentials: No Credential Content"
Cause: Google Maps API key is not configured.
Solution:
- Create a credential in Robomotion vault with your API key
- Select the credential in the node's Credentials option
- Verify the credential has the API key in the "value" field
Error: "ErrGoogleMaps: INVALID_REQUEST"
Cause: Coordinates are out of valid range or malformed.
Solution:
- Check latitude is between -90 and 90
- Check longitude is between -180 and 180
- Ensure coordinates are numbers, not strings
- Verify no special characters or formatting issues
Error: "ErrGoogleMaps: ZERO_RESULTS"
Cause: Google Maps has no address data for the coordinates (e.g., middle of ocean).
Solution:
- Verify coordinates are correct
- Check if location is in a remote or unmapped area
- Consider using broader location data from additional results
- Handle this gracefully in your workflow (it's expected for some locations)
Error: "ErrGoogleMaps: OVER_QUERY_LIMIT"
Cause: Exceeded API quota or rate limits.
Solution:
- Monitor usage in Google Cloud Console
- Add delays between requests using "Delay After" property
- Implement caching for frequently queried coordinates
- Upgrade your Google Cloud billing plan if needed
Coordinates Appear Swapped
Issue: Getting addresses from wrong continent or unexpected location.
Cause: Latitude and longitude are reversed.
Solution:
- Remember: Latitude first (North/South), Longitude second (East/West)
- Latitude range: -90 to 90
- Longitude range: -180 to 180
- If result seems wrong, try swapping the values
Usage Notes
- Latitude and longitude should be provided as decimal numbers
- The API key must have Geocoding API permissions enabled
- The result contains multiple address components that can be parsed as needed
- Multiple results may be returned for a single coordinate pair (from most to least specific)
- The node returns structured data that can be used with other map-related nodes
- Coordinates should be in decimal degrees format (e.g., 41.0082, 28.9784)
- Results are provided in WGS84 datum (standard for GPS)
- Reverse geocoding accuracy depends on Google's map data coverage for the region
- Some coordinates (oceans, remote areas) may only return general location names