Back to Geoapify in Google Sheets
SheetXAI logo
Geoapify logo
Geoapify · Google Sheets Guide

Optimize a Multi-Stop Delivery Route From a Google Sheet

2026-05-14
5 min read

The Scenario

It is Sunday night. A field service dispatcher has 40 technician job addresses for Monday in a Google Sheet, each with a time window — earliest start and latest finish. The service manager wants the optimal drive order emailed to the technician before 6 AM. Last quarter a dispatcher spent three hours rearranging job addresses manually by eyeballing a map and still got it wrong. That complaint is still open in the customer satisfaction tracker.

The bad version:

  • Open Geoapify's Route Planner documentation, figure out the VRP request format — vehicles, jobs, time windows, depot — and write a JSON payload for 40 stops.
  • Send the request, parse the returned route object, extract the stop sequence and estimated arrival times, and paste them back into the sheet in the correct row order.
  • Discover that two jobs have time windows that conflict with the optimal route and manually adjust the sequence, then recalculate estimated arrivals by hand.

The technician needs to know their first stop before they leave home at 6:15 AM. It is 10:30 PM.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the job addresses and time windows, calls Geoapify's Route Planner API, and writes the optimal sequence and estimated arrivals back into the sheet.

Use Geoapify Route Planner to optimize the order of all 40 jobs in this sheet — use the address, time window start, and time window end columns, and write the optimal sequence and estimated arrival time back to each row

What You Get

  • A new column receives the optimal stop sequence number for each job row.
  • An adjacent column receives the estimated arrival time for each stop based on the optimized route.
  • Jobs where the time window cannot be met given the route constraints are flagged so the dispatcher can call the customer before the technician departs.

What If the Data Is Not Quite Ready

Addresses need to be geocoded before routing

Geocode all job addresses in column B with Geoapify, then run VRP optimization using the coordinates and the time windows in columns E and F — write the optimized stop sequence and estimated arrival into columns G and H

The route should account for multiple technicians, each handling a subset of jobs

Use Geoapify Route Planner to split the 40 jobs in this sheet across 3 technicians — optimize the route for each vehicle separately using the time windows in columns E and F, and write each technician's assigned stop sequence and estimated arrivals into the Technician Routes tab

Some jobs have priority flags that must be served first regardless of route efficiency

Optimize the 40 jobs in this sheet with Geoapify Route Planner — treat all rows where the Priority column is High as must-serve-first constraints, then optimize the remaining stops around them, and write the final sequence and estimated arrivals into columns G and H

Geocode addresses, run the full VRP optimization, flag time-window conflicts, and compute total route distance

Geocode all addresses in column B with Geoapify, run VRP optimization using time windows in columns E and F across 3 vehicles, write each vehicle's stop sequence and estimated arrivals into the Routes tab, flag any unserviceable jobs in column I, and add total route distance per vehicle in a summary row at the bottom

One instruction handles the geocoding, the optimization, the constraint logic, and the summary output.

Try It

Get the 7-day free trial of SheetXAI and open any job sheet with addresses and time windows — field service, parcel delivery, sales visits — and ask it to find the optimal route. See the related spoke on building travel time matrices, or return to the Geoapify hub.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more