AutomationFlowsData & Sheets › Geocoding for Logistics with Open Route API and Google Sheets

Geocoding for Logistics with Open Route API and Google Sheets

Original n8n title: 🚛🗺️ Geocoding for Logistics with Open Route API and Google Sheets

BySamir Saci @samirsaci on n8n.io

*Tags: Supply Chain, Logistics, Geocoding, Transportation, GPS API*

Event trigger★★★★☆ complexity10 nodesGoogle SheetsHTTP Request
Data & Sheets Trigger: Event Nodes: 10 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4593 — we link there as the canonical source.

This workflow follows the Google Sheets → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "b1d00cd4-b9e8-4d84-b580-08368fbb9396",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 640,
        "content": "### 1. Trigger the workflow\nThis starts by collecting all the addresses (with the country code) that need geocoding information.\n\n#### How to setup?\n\n- **Load records in the Google Sheet Node**:\n   1. Add your Google Sheet API credentials to access the Google Sheet file\n   2. Select the file using the list, an URL or an ID\n   3. Select the sheet in which you want to record your working sessions\n   4. Map the fields: **country**, **address** , **longitude**, **latitude**, **borough**, **neighbourhood**, **localadmin**\n  [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n\nThe last five fields must be left empty as they will be filled with the API outputs.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "32f84996-0480-4c0b-aab7-3f5ebca9dd4e",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        60,
        260
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fe628240-0550-42dd-a375-7ecba134fd6c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        600,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 1120,
        "height": 640,
        "content": "### 2. Loop to collect GPS coordinates\n\n#### How to setup?\n- **Setup API Credentials**\n  1. Get your free API key: [Open Route API Documentation](https://openrouteservice.org/dev/#/api-docs)\n  2. Fill the API key in the HTTP request node\n- **Load records in the Google Sheet Node**:\n   1. Add your Google Sheet API credentials to access the Google Sheet file\n   2. Select the file using the list, an URL or an ID\n   3. Select the sheet in which you want to record your working sessions\n   4. List the fields to update: **longitude**, **latitude**, **borough**, **neighbourhood**, **localadmin**\n  [Learn more about the Google Sheet Node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "eac06796-f40d-4c94-96b2-4ad672053295",
      "name": "Collect Addresses",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        340,
        260
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1232640606,
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.6
    },
    {
      "id": "13198c2c-cdca-4a5e-893a-1fac24090f33",
      "name": "Query Open Route API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        960,
        280
      ],
      "parameters": {
        "url": "https://api.openrouteservice.org/geocode/search",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "api_key"
            },
            {
              "name": "text",
              "value": "={{ $json.address }}"
            },
            {
              "name": "boundary.country",
              "value": "={{ $json.country }}"
            },
            {
              "name": "sources",
              "value": "openstreetmap"
            },
            {
              "name": "size",
              "value": "1"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "Accept",
              "value": "application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8"
            }
          ]
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.2
    },
    {
      "id": "d0ad6f7e-8049-45c4-8022-8c16a8f71392",
      "name": "Loop Over Addresses",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        760,
        260
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "c84f27c6-3905-455a-b8a7-bb1d6bffafe0",
      "name": "Save Results",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1380,
        280
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $('Loop Over Addresses').item.json.id }}",
            "borough": "={{ $json.borough }}",
            "latitude": "={{ $json.latitude }}",
            "longitude": "={{ $json.longitude }}",
            "localadmin": "={{ $json.localadmin }}",
            "neighbourhood": "={{ $json.neighbourhood }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "country",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "address",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "address",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "longitude",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "longitude",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "latitude",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "latitude",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "borough",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "borough",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "neighbourhood",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "neighbourhood",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "localadmin",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "localadmin",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "row_number",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1232640606,
          "cachedResultUrl": "",
          "cachedResultName": ""
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "",
          "cachedResultName": ""
        }
      },
      "notesInFlow": true,
      "typeVersion": 4.6
    },
    {
      "id": "6fa85604-4db7-431d-b0fd-b6cbb1773c12",
      "name": "Extract Results",
      "type": "n8n-nodes-base.set",
      "position": [
        1180,
        280
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e4c92077-f294-4e49-8276-20d1441c0c2c",
              "name": "longitude",
              "type": "string",
              "value": "={{ $json.features[0].geometry.coordinates[0] }}"
            },
            {
              "id": "899e5304-e7a1-4ce1-bf9a-f403d74934fb",
              "name": "latitude",
              "type": "string",
              "value": "={{ $json.features[0].geometry.coordinates[1] }}"
            },
            {
              "id": "5b35642b-dda4-42b8-b7bb-1275616bfb59",
              "name": "borough",
              "type": "string",
              "value": "={{ $json.features[0].properties.borough }}"
            },
            {
              "id": "aa74bd9a-f543-48e1-a69b-0e6472bda053",
              "name": "neighbourhood",
              "type": "string",
              "value": "={{ $json.features[0].properties.neighbourhood }}"
            },
            {
              "id": "7f303dc8-4e28-4d46-8e3e-9db00dbcac3a",
              "name": "localadmin",
              "type": "string",
              "value": "={{ $json.features[0].properties.localadmin }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "71c85728-f291-4a67-8d0d-8c7fcd38905d",
      "name": "5 sec",
      "type": "n8n-nodes-base.wait",
      "position": [
        1560,
        280
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "7ca2b5ea-9af8-425d-958e-2f6ffe01656e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        500
      ],
      "parameters": {
        "width": 580,
        "height": 380,
        "content": "### [Check the Tutorial](https://www.youtube.com/watch?v=IlblIlKcL0k)\n![Thumbnail](https://www.samirsaci.com/content/images/2025/06/image-10.png)"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "5 sec": {
      "main": [
        [
          {
            "node": "Loop Over Addresses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Results": {
      "main": [
        [
          {
            "node": "5 sec",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Results": {
      "main": [
        [
          {
            "node": "Save Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Collect Addresses": {
      "main": [
        [
          {
            "node": "Loop Over Addresses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Addresses": {
      "main": [
        [],
        [
          {
            "node": "Query Open Route API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query Open Route API": {
      "main": [
        [
          {
            "node": "Extract Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Collect Addresses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

*Tags: Supply Chain, Logistics, Geocoding, Transportation, GPS API*

Source: https://n8n.io/workflows/4593/ — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

This template is ideal for solo store owners, eCommerce marketers, automation beginners, or anyone using Shopify and Gmail who wants to recover lost revenue without coding.

HTTP Request, Gmail, Twilio +3
Data & Sheets

PCN. Uses googleSheets, httpRequest, @n-octo-n/n8n-nodes-json-database, itemLists. Event-driven trigger; 60 nodes.

Google Sheets, HTTP Request, @N Octo N/N8N Nodes Json Database +3
Data & Sheets

The workflow automates the process of gathering extensive keyword data for a "Main Keyword." It starts by reading initial parameters from a Google Sheets template, creates a new dedicated Google Sheet

Google Sheets, Google Drive, HTTP Request
Data & Sheets

🔥 March Sale – n8n Community Members Get ideoGener8r for Just $27! (Reg. $47) Use Coupon Code: (Valid until 3/31/2025 for n8n community members)

HTTP Request, Google Drive, Google Sheets
Data & Sheets

📄 Documentation: Notion Guide

Google Sheets, Google Drive, HTTP Request +2