Use this powerful n8n workflow to calculate driving distance and duration for multiple logistics routes using the Open Route API, ensuring results are automatically saved back to Google Sheets.
Download this n8n workflow template and start using it instantly.
Managing large datasets of shipment origins and destinations requires efficient tools to estimate time and distance accurately, especially for commercial trucks (HGV). This robust n8n workflow solves the problem of manual route calculation by automating the entire process.
Starting with a list of coordinates in a Google Sheet, this n8n template iteratively queries the high-performance Open Route API, optimized for heavy goods vehicles, to retrieve precise travel metrics. The workflow then cleanly extracts distance, duration, and the number of driving steps, writing the results back to the original spreadsheet. This reliable n8n automation ensures you have up-to-date logistics metrics without manual data entry or complex scripting.
This n8n workflow operates on a strict batch processing loop, starting with the execution of the n8n trigger:
driving-hgv profile to get truck-optimized routes.distance, duration, and n_steps.To install this specific n8n workflow template, follow these steps:
id, longitudedeparture, latitudedeparture, etc.). When clicking ‘Test workflow’ (Manual Trigger): This simple n8n trigger starts the process manually, perfect for testing or one-off batch runs.
Collect Routes (Google Sheets n8n node): Reads the initial input data (coordinate pairs) from the specified Google Sheet. This is the source for all route calculations.
Loop Over Items (Split In Batches n8n node): This core n8n node ensures sequential processing of hundreds of items, managing the iteration required for batch processing.
Request Open Route API (HTTP Request n8n node): Sends the critical request to calculate the route. Key configuration uses the driving-hgv profile and dynamically maps departure/destination coordinates using expressions based on the current item in the loop.
Extract Results (Set n8n node): Uses expressions to efficiently parse the resulting JSON object from the API, extracting distance, duration, and n_steps for subsequent use.
Save Results (Google Sheets n8n node): Performs an Update operation, matching the row based on a unique ID and writing back the calculated distance and duration metrics.
Use this powerful n8n workflow to automatically extract shipment data from Gmail, calculate CO2 emissions using the Carbon Interface API, and log results in Google Sheets. Accelerate your sustainability reporting with these n8n templates.

Automate proof-of-delivery tracking using this sophisticated n8n workflow. Capture GPS, photos, and shipment numbers via Telegram, upload to Google Drive, and notify the team via Gmail and Google Sheets. Ideal n8n templates for logistics.

Automate YouTube comment analysis using a powerful n8n workflow. Integrate OpenAI for sentiment classification (Positive/Negative/Neutral) and store results automatically in Google Sheets. Utilize this specialized n8n template for data logging.

Use this powerful n8n workflow to automatically geocode addresses stored in Google Sheets using the Open Route API. Ideal for logistics, data enrichment, and scalable batch processing.

Automation, AI and Analytics for Supply Chain & Business Optimization Helping businesses streamline operations using n8n, AI agents, and data science to enhance efficiency and sustainability. Linkedin: www.linkedin.com/in/samir-saci







































