@terranode-co/n8n-nodes-terranode
v0.1.3
Published
n8n community node for spatial queries via the Terranode Geospatial API
Maintainers
Readme
n8n-nodes-terranode
n8n community node for spatial queries via the Terranode Geospatial API.
Enrich your workflow data with polygon attributes, nearest features, distances, and spatial joins — no geospatial/GIS expertise required.
Install
In your n8n instance: Settings → Community Nodes → Install → search for n8n-nodes-terranode → click Install. That's it — no code required.
Get an API key at app.terranode.co.
Credential Setup
- Go to Credentials → New Credential → Terranode API
- Enter your API key (starts with
tn_) - Save — n8n will test connectivity automatically
Operations
Check Location
Point-in-polygon query. Given a lat/lng coordinate, returns the polygon(s) that contain it.
Use case: "Which county is this coordinate in?" "Is this point inside a service zone?"
- Dataset — pick from the dropdown (system + your custom datasets)
- Latitude / Longitude — decimal degrees (supports n8n expressions)
Find Nearest
Find the N closest features to a coordinate, sorted by boundary distance.
Use case: "What are the 5 nearest counties?" "Find the closest school district within 10km."
- Dataset — pick from the dropdown
- Latitude / Longitude — decimal degrees
- Number of Results — 1–20 (default 1)
- Radius — max search distance in meters (0 = unlimited)
Calculate Distance
Geodesic distance between two points on Earth's surface. No dataset needed.
Use case: "How far is the warehouse from the delivery point?"
- Latitude 1 / Longitude 1 — first point
- Latitude 2 / Longitude 2 — second point
- Returns
distance_m(meters) anddistance_mi(miles)
Spatial Join
Batch operation — enriches ALL input items with polygon attributes in one API call. Each input item needs a lat/lng field.
Use case: "Take this spreadsheet of lat/lng coordinates and add their state, county, and census tract."
- Dataset — pick from the dropdown
- Latitude Field — name of the field containing latitude (default:
lat) - Longitude Field — name of the field containing longitude (default:
lng) - Output items get
_joined(boolean) and matched polygon properties merged in
Workflow Examples
Spreadsheet → Spatial Join → Enriched Output
Take a CSV or spreadsheet of coordinates and enrich every row with polygon attributes in one shot.
[Read CSV] → [Terranode: Spatial Join (us-counties)] → [Write CSV]- Read Binary File or Google Sheets node reads your data
- Spreadsheet File node (if CSV) converts rows to items
- Terranode node with Spatial Join enriches each row with county attributes
- Write node outputs the enriched file
Fleet Zone Tracking
Identify which zones your fleet vehicles are in right now.
[HTTP Request: Fleet API] → [Terranode: Spatial Join (service-zones)] → [Switch] → [Slack Alert]- HTTP Request pulls current vehicle positions (lat/lng) from your fleet API
- Terranode Spatial Join matches each vehicle to its service zone
- Switch node filters for vehicles outside their assigned zone
- Slack sends an alert for out-of-zone vehicles
Distance Calculator
[Form Trigger] → [Terranode: Calculate Distance] → [Respond to Webhook]- Form collects two coordinate pairs
- Terranode calculates geodesic distance
- Response includes distance in meters and miles
Error Handling
The node respects n8n's Continue On Fail setting:
- Off (default): Errors stop the workflow with a clear message
- On: Failed items pass through with an
errorfield — useful for batch processing where some items may have bad coordinates
Error messages are mapped to actionable hints:
- 401 → "Check your Terranode credential"
- 403 → "Your plan may not include this feature"
- 404 → "Dataset not found"
- 429 → "Rate limit exceeded"
Feedback
Report issues or feature requests: [email protected]
