n8n
The @terranode-co/n8n-nodes-terranode community node adds spatial operations to any n8n workflow — enrich spreadsheets with polygon attributes, check which zones contain a point, find nearest features, and calculate distances.
Install
Section titled “Install”In your n8n instance: Settings → Community Nodes → Install → search for n8n-nodes-terranode → click Install.
Get an API key at app.terranode.co.
Credential setup
Section titled “Credential setup”- Go to Credentials → New Credential → Terranode API
- Enter your API key (starts with
tn_) - Save — n8n tests connectivity automatically
Operations
Section titled “Operations”Check Location
Section titled “Check Location”Point-in-polygon query. Given a coordinate, returns the polygon(s) that contain it.
- Dataset — pick from the dropdown (system + your custom datasets)
- Latitude / Longitude — decimal degrees (supports n8n expressions)
Find Nearest
Section titled “Find Nearest”Find the N closest features to a coordinate, sorted by boundary distance.
- 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
Section titled “Calculate Distance”Geodesic distance between two points. No dataset needed.
- Latitude 1 / Longitude 1 — first point
- Latitude 2 / Longitude 2 — second point
- Returns
distance_m(meters) anddistance_mi(miles)
Spatial Join
Section titled “Spatial Join”Batch operation — enriches all input items with polygon attributes in one API call.
- 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)
Workflow example
Section titled “Workflow example”Enrich a spreadsheet of coordinates with county data:
[Read CSV] → [Terranode: Spatial Join (us-counties)] → [Write CSV]For more workflow examples, see the full README on npm.