Optimize delivery routes for carriers from Google Sheets using Google Maps
Ready for 3.0What this workflow does
This workflow has 16 nodes and runs on a schedule (every day) (plus 1 other trigger). Along the way it connects Google Sheets. It also calls maps.googleapis.com over HTTP.
How it runs
Trigger: On a schedule (every day) (plus 1 other trigger).
- Get date delivery (Google Sheets): uses Google Sheets
- Start address (Edit Fields (Set)): sets 1 field: START ADDRESS
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Get addresses (Google Sheets): uses Google Sheets
- Get Lat and Lng of Start address (HTTP Request): calls maps.googleapis.com
- Get Lat and Lng (HTTP Request): calls maps.googleapis.com
- Group delivery (Code): runs custom JavaScript code
- Set vars (Edit Fields (Set)): sets 3 fields: START ADDRESS, START LAT, START LNG
- Update Lat and Lng (Google Sheets): update
- Merge: merges the data from its input branches
…plus 4 more steps. See the full node list below.
Services it uses
HTTP calls to: maps.googleapis.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Manual Trigger
n8n-nodes-base.manualTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Wait
n8n-nodes-base.wait - Merge
n8n-nodes-base.merge - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
This workflow automates the process of converting delivery addresses into geographic coordinates and optimizes delivery routes for each carrier using Google Maps. Finally, the workflow outputs an optimized circular route that starts and ends at the base…