Automate Delivery Tracking with Telegram, Google Sheets & Gmail

This workflow automates delivery tracking by guiding drivers via Telegram to share shipment numbers, GPS locations, and photos. It stores data in Google Sheets, uploads images to Google Drive, and sends email confirmations via Gmail, saving time and reducing manual errors.
telegramTrigger
switch
code
+6
Workflow Identifier: 1916
NODES in Use: Telegram Trigger, Switch, Code, Set, Telegram, Google Drive, Google Sheets, Gmail, Sticky Note
Automate delivery tracking with n8n and Telegram

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow uses n8n and a Telegram bot called LogiGreenTrack to help delivery drivers report shipment info step-by-step.

It asks drivers for the shipment number, GPS location, and a photo, then saves all data to Google Sheets and Drive.

After gathering info, it sends a confirmation email to the logistics team.

This cuts down errors and saves time spent chasing delivery details.


Who Should Use This Workflow

The workflow fits logistics coordinators and delivery companies needing fast, simple proof-of-delivery recording.

It works for teams with drivers using Telegram who want to remove manual paperwork and phone tag.


Tools and Services Used

  • Telegram Bot API: Receives messages and GPS from drivers.
  • Google Drive API: Stores shipment photos with public links.
  • Google Sheets API: Records shipment data in a spreadsheet.
  • Gmail API: Sends delivery confirmation emails.

Inputs, Process, and Outputs

Inputs

  • Driver’s Telegram messages and photos.
  • Shipment number typed by driver.
  • Location shared using Telegram’s GPS feature.
  • Shipment photo sent via Telegram.

Processing Steps

  • The workflow tracks each driver’s conversation state using workflow static data.
  • It sends messages asking for shipment number, location, and photo in order.
  • Photo is downloaded from Telegram and uploaded to Google Drive.
  • All details are saved to Google Sheets.
  • A confirmation email with all info and the photo link is sent to the logistics team.
  • Driver’s state is reset to wait for next shipment.

Outputs

  • Google Sheet row with shipment number, GPS coordinates, photo URL, and timestamps.
  • Google Drive folder with public shipment photos.
  • Email to logistics team confirming delivery details and proof.
  • Confirmation message back to driver in Telegram.

Beginner Step-by-Step: How to Use This Workflow in n8n Production

1. Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open your n8n editor.
  3. Click “Import” and choose “Import from File.”
  4. Select the downloaded workflow file to load it.

2. Configure Credentials and Settings

  1. Add API Keys or Credentials for Telegram, Google Drive, Google Sheets, and Gmail nodes.
  2. Check Google Drive folder ID is set correctly for photo uploads.
  3. Update Google Sheets document ID and the specific Sheet name.
  4. Update notification email addresses in the Gmail node.

3. Initialize Static Data

  1. Run the Initiate Workflow Data code node once to prepare for tracking driver states.

4. Test the Workflow

  1. Send a message or command from your Telegram bot to simulate a driver starting a delivery.
  2. Confirm the bot replies asking for shipment number, location, and photo step-by-step.
  3. Ensure data is saved properly to Google Sheets and Drive.
  4. Check the confirmation email arrives at the specified address.

5. Activate the Workflow

  1. Toggle the workflow switch ON in n8n to run it continuously.
  2. Monitor executions through the n8n UI for errors.
  3. Set up alerts if needed to catch failures quickly.

Conversation State Management Explained

The workflow uses static data to keep track of what input each driver must give next.

It saves driver chat IDs with flags like waitingShipmentNumber or waitingPhoto.

This way the bot knows if to ask for shipment number, or location, or photo.

This helps prevent confusion if a driver sends messages out of order.


Photo Upload Process Details

When the driver sends a photo, the workflow downloads it from Telegram.

Then it uploads the photo to Google Drive inside a folder with the right ID.

Permissions are set so the photo URL becomes public and can be shared.

The photo’s public URL is saved with other shipment info for easy access.


Common Errors and How to Fix

  • Telegram messages not triggering workflow: Check Telegram bot webhook URL and ensure it matches the Telegram Trigger node.
  • Photos not uploading: Verify Google Drive credentials and folder permissions to allow uploads.
  • Emails not sending: Make sure Gmail API credentials are valid and email addresses are correct.
  • Driver responses not recognized: Confirm drivers use exact commands with the slash ‘/’ prefix.

Customization Ideas

  • Change or add new Telegram commands by editing the Switch Command node.
  • Replace Gmail node with other email services if needed.
  • Add multiple language support by branching Telegram messages.
  • After photo upload, add image recognition for automatic tagging.
  • Use a database instead of Google Sheets for big data needs.

Production Readiness Checklist

  • Run Initiate Workflow Data node once.
  • Verify Telegram webhook is set correctly.
  • Check Google Drive folder ID and upload permissions.
  • Confirm Google Sheets ID and sheet name.
  • Test sending mails manually in the Gmail node.
  • Simulate a full delivery process on Telegram.

Deployment Notes

After activating workflow in n8n, monitor regularly for errors.

Set alerts for critical failures to fix issues fast.

Keep API credentials updated, especially for Telegram and Gmail.

For long-term use, consider self-host n8n for more control and stability.


Summary

✓ This workflow collects delivery info by guiding drivers over Telegram.

✓ It saves shipment number, GPS location, and photos safely into Google services.

✓ Sends confirmation emails to the logistics team automatically.

→ Saves time by removing manual calls and paperwork.

→ Reduces errors and missed delivery proofs.

→ Scales to many drivers with state tracking.


Automate delivery tracking with n8n and Telegram

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

The workflow uses n8n workflow static data to save each driver’s chat ID with properties like waitingShipmentNumber, tracking which input the driver should give next.
Commands missing the ‘/’ prefix are not recognized by the workflow and will not trigger the correct processing steps.
Yes, the Google Sheets node can be swapped with a database write node in n8n for larger scale or more secure storage.
Yes, photos are uploaded to a Google Drive folder with public sharing enabled, and URLs are included in confirmation emails and data records.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.