Skip to content
NEWError doctor and Watchtower: failed n8n runs explained in plain words, and emailed to you. See what is new

Library / AI Agents & Assistants

AI Agents & Assistants

Manage Transport Orders from Gmail with GPT-4o and Route Planning

When a transportation request email arrives, OpenAI extracts the addresses, OpenRouteService finds pickup coordinates and distances, and the order is recorded in Google Sheets.

What it does

### 3. Record Shipment Request Information and fetch distance and driving time using Open Route API This starts by recording all the information parsed by the AI node. Then, we use the Open Route API to complete with geocoding data *(GPS Coordinates)* that will be used to fetch driving distance and time. #### How to setup? - Setup API Credentials 1. Get your free API key: Open Route API Documentation 2. Fill the API key in the HTTP request node 3. Select the driving mode (driving-car: individual truck) or (driving-hgv: commercial truck) - Load records in the Google Sheet Node: 1. Add your Google Sheet API credentials to access the Google Sheet file 2. Select the file using the list, an URL or an ID 3. Select the sheet in which you want to record your working sessions 4. Map the fields: shipment_number, pickup_location, pickup_address, pickup_longitude, pickup_latitude, expected_pickup_time, temperature_control, destination_store_name, destination_address, destination_longitude, destination_latitude, expected_delivery_time, driving_distance, driving_time Learn more about the Google Sheet Node Longitudes, latitudes, distance and time will be fetched from the Open Route API.

The steps

  1. Gmail Trigger
  2. Structured Output Parser
  3. AI Agent Parser
  4. Record Email Content
  5. Collect Addresses
  6. 5 sec
  7. Query Open Route API Pickup
  8. Save Pickup GPS
  9. GPS Pickup
  10. Query Open Route API Delivery
  11. GPS Delivery
  12. Save Delivery GPS
  13. Collect Coordinates
  14. Request Open Route API

21 steps in total.

Similar automations