Places and distances
Coming soon: how far a customer is, which technician or warehouse is closest, whether an address is inside your area: distances between Location columns, written into real columns.
Coming soon: with the next version of General Caster. This page shows how it will work.
monday shows Location columns on a map, but can’t tell how far two places are. General Caster calculates it and writes it into a real column, so automations, filters and dashboards can use it: the distance to the customer, the closest technician, whether a delivery is inside your area. coming soon
Places
A place is a Location column. In a formula it reads as latitude, longitude and address (45.4064:11.8768:Padova PD, Italia); you can also write the two coordinates yourself: "45.4064, 11.8768". In the automation editor monday lists a Location column as … address (for example Place address): pick it, and inside the GEO. functions General Caster reads the whole column, with its coordinates.
An address in a Text column is not a place yet: the Text to Location block turns it into a position in a Location column, then the formulas below use that column. Inside a formula, GEO.LOCATION({Address}) does the same, e.g. GEO.DISTANCE(GEO.LOCATION({Address}), {Office}); it costs 2 credits per address (see Addresses into a Location column). A formula that gets an address alone gives a Wrong value error.
How far
GEO.DISTANCE(from, to) gives the straight-line distance in km. Add "mi" for miles or "m" for metres:
| Formula | Result |
|---|---|
GEO.DISTANCE({Customer}, {Warehouse}) |
209.732 |
ROUND(GEO.DISTANCE({Customer}, {Warehouse}, "mi"), 0) |
130 |
IF(GEO.DISTANCE({Customer}, {Office}) > 100, "Overnight", "Day trip") |
Overnight |
The distance by road is longer, often by 20–40%: use the straight line for zones, comparisons and rough estimates, and the routes below when the real way counts. Given a list of places (for example the Base of the technicians connected to the item), it gives one distance for each.
By car and on foot
The route Google Maps finds between two places, by car (without traffic) or on foot:
| Formula | Result |
|---|---|
GEO.DRIVE_KM({Customer}, {Office}) |
241.356 |
GEO.DRIVE_MINUTES({Customer}, {Office}) |
144 |
GEO.WALK_KM({Hotel}, {Venue}) |
1.84 |
GEO.WALK_MINUTES({Hotel}, {Venue}) |
24 |
IF(GEO.DRIVE_MINUTES({Customer}, {Technician's base}) > 60, "Overnight", "Day trip") |
Day trip |
A fixed address works too: GEO.DRIVE_KM({Customer}, GEO.LOCATION("Via Roma 1, Milano")), or its coordinates, GEO.DRIVE_KM({Customer}, "45.4654, 9.1859"), which cost nothing more. Km to the metre, minutes as whole numbers. When there is no route (an island, another continent) the result is an error: IFERROR(GEO.DRIVE_KM({Customer}, {Office}), "No road") writes something else, otherwise you get a notification and the automation stays on.
Links to Google Maps
GEO.MAP_LINK(place) gives the link that opens the place in Google Maps; GEO.DRIVE_LINK(from, to) and GEO.WALK_LINK(from, to) the directions by car or on foot. Into a Link column, add the text to show after a colon:
| Formula | Writes |
|---|---|
GEO.MAP_LINK({Customer}) & ":Open map" |
Open map, which opens the customer’s position |
GEO.DRIVE_LINK({Technician's base}, {Customer}) & ":Directions" |
Directions, the route by car in Google Maps |
GEO.WALK_LINK({Hotel}, "Fiera di Padova") & ":On foot" |
On foot, the route on foot to an address |
They take a Location column, coordinates or an address as text. They cost nothing more: Google Maps calculates the route when the link is opened, with the traffic of that moment.
The closest one
GEO.NEAREST(place, places, [give]) finds the closest of a list of places. Without give it gives the address; with give, the item in the same position of another list:
GEO.NEAREST({Customer}, MONDAY.ITEM.COLUMN({Technicians}, "Base"), MONDAY.ITEM.NAME({Technicians}))
Written into a Text column, this gives the name of the closest technician among the ones connected to the item.
Inside an area
GEO.WITHIN(place, center, km) gives TRUE when the place is within that many km of the center:
IF(GEO.WITHIN({Delivery address}, {Warehouse}, 50), "Local", "Courier")
Written into a Status column, it starts monday’s own automations: notify the right team, move the item to a group.
Credits
GEO.DISTANCE, GEO.NEAREST, GEO.WITHIN and the Google Maps links are calculated by General Caster, without external services: they are included in the run’s credit. The routes by car and on foot ask Google Maps: 2 more credits for each route (the same route for km and minutes counts once), up to 10 different routes per run, not in the Free plan, and only on the item of the automation (not with a scheduled trigger or on a whole group or board). A route found is kept for 30 days for your account, so asking it again is faster. Reading connected items (MONDAY.ITEM.COLUMN) costs as usual, 1 extra credit per 25 items read.