Sitemap

Track your Shipments with a Telegram Bot

Learn how a Telegram Bot designed with Python or n8n, used by truck drivers, can help companies track their shipments.

5 min readMar 2, 2026

--

Press enter or click to view image in full size
Track your Shipments with a Telegram Bot — (Image by Samir Saci)

Most of the small and medium-sized companies do not have reliable systems to monitor their logistics operations.

They may rely on manual tracking systems, such as Excel or even paper-based systems.

How can we design light solutions to automate transportation monitoring using Python?

Given how simple it is to deploy a Telegram bot, we can easily use this solution to incorporate a lightweight tracking tool into their processes at a low cost.

In this article, we will design and deploy a transportation tracking tool using a Python Telegram bot.

I. Limitation of TMS & Tracking Tools
1. Scenario
2. What kind of obstacles can you face?
II. What do we need here?
III. What is a Telegram Bot?
1. Definition
2. How do you interact with a Telegram Bot?
IV. Create your Tracking Assistant Bot
1. Standard Operating Procedure (SOP)
V. Demo: Shipment Delivery confirmation
1. Step 1: DRIVER opens telegram and starts a discussion with BOT
2. Step 2: DRIVER shares its GPS Location (= Store Location)
3. Step 3, 4 and 5: Confirmation of the delivery with pictures
VI. Design your bot
VII. Conclusion
1. Add a Container Loading Optimization Module

What are the limitations of commercial tracking tools?

Imagine that you support a medium-sized retailer operating in a market where the transportation industry is immature.

They want to implement a Transport Management System (TMS) from an external provider to achieve full visibility and real-time tracking of their shipments.

What kind of obstacles can they face?

  • System Interface: if they have multiple carriers (with different systems), it can become expensive
  • Maturity of Carriers: What if they manage their fleet with manual processes (Excel)?
  • Limited Capacity to Negotiate: if you are a small customer for them, carriers may refuse to adapt their processes and use your system to record status

That is why this article proposes a light solution that probably answers your needs.

What do we need here?

A simple, cheap and easy-to-implement solution to track your shipments that

  • Does not require additional IT development for your carriers
  • Easily integrates into the current transportation processes
  • Reduces admin workload for your logistics team
  • Does not impact drivers’ productivity
  • Does not require additional equipment
  • Provides visibility, real-time tracking and transparency
An icon of a robot interacting with a laptop, sitting in front of a large Telegram logo. The robot symbolizes automation, while the Telegram logo signifies the platform used for building a shipment tracking bot. This image emphasizes the role of automation in using Telegram bots to monitor and track shipments in real-time.
Telegram Bot: your best ally to improve your logistics performance

What is a Telegram Bot?

Telegram

Telegram is a cross-platform, secure, convenient messaging app that works on all devices.

With over 500 million users worldwide, Telegram has an open API and free protocol.

With this API, we can build our tools, including a bot.

What’s a Bot?

A bot is a 3rd-party application that can interact with users by sending them messages, commands, and inline requests.

With Telegram, you can design and control your Telegram bot by sending HTTPS requests to its bot API.

Your bot can send/receive messages, photos, videos, and GPS locations — enough to build our shipment-tracking tool.

How do you interact with a Telegram Bot?

Add him and start a conversation :)

Create your Tracking Assistant Bot

Standard Operating Procedure(SOP)

For the first version of our bot, let’s use a light version of SOP to record delivery time.

Confirm Unloading at Destination

  1. STORE TEAM finished unloading your shipment from the truck
  2. DRIVER shares the shipment number, GPS location and a picture of the shipment with your Telegram BOT to confirm delivery
  3. Telegram BOT sends a delivery notification by email to your logistics team with the information listed above

Demo: Shipment Delivery confirmation

Your shipment has been unloaded in your store.

DRIVER wants to send delivery confirmation before leaving for his next destination.

Step 1: DRIVER opens Telegram and starts a discussion with the BOT

A screenshot of a Telegram chat between a truck driver and a shipment tracking bot. The bot welcomes the driver and provides commands, such as “/start_tracking” to initiate the tracking process. The driver begins by typing “/start_tracking,” and the bot responds by asking for the driver’s GPS location. This image demonstrates the first step in confirming a shipment delivery through the Telegram bot.
DRIVER starts the process | BOT asks for GPS location — (Image by Author)

Step 2: DRIVER shares its GPS Location (= Store Location)

A continuation of the Telegram chat, where the driver shares their GPS location, represented by a map with a red pin. The bot confirms that the GPS location has been recorded and asks the driver to enter the delivery number. This image illustrates how the driver uses the Telegram bot to provide location information during the delivery confirmation process.
DRIVER share its GPS Location | BOT asks for the delivery number — (Image by Author)

Step 3: DRIVER shares a delivery number

In this part of the Telegram chat, the driver enters the delivery number, “1254270–147.” The bot confirms that the delivery number has been recorded and requests a picture of the shipment. This image shows how the driver continues the shipment confirmation by sharing a unique delivery number with the Telegram bot.
DRIVER share its Delivery Number | BOT asks for shipment picture — (Image by Author)

Step 4: DRIVER shares a picture of the shipment

The driver uploads a picture of the shipment in the Telegram chat, and the bot confirms that the photo has been successfully uploaded. The bot thanks the driver for their cooperation, completing the delivery confirmation process. This image showcases the final step in the delivery tracking workflow, where the driver provides visual proof of the shipment.
DRIVER share shipment photo | BOT stop the process and send an email (Image by Author)

Step 5: Your logistics teams receive a shipment confirmation

A screenshot of an email sent to the logistics team, providing delivery confirmation for shipment number “1254270–147.” The email includes the GPS location and a photo of the shipment. This image demonstrates how the Telegram bot sends a notification email with the necessary shipment details to the logistics team after the delivery is confirmed.
BOT send delivery confirmation by mail to the transportation team (Image by Author)

🏫 Discover 70+ case studies using Python and VBA to automate manual tasks 🤖 and optimize your supply chain 🚚 in this Cheat Sheet

Implementation

The initial version was using Python, but actually it can be done with many tools.

Create your bot with n8n

For a customer who wanted a no-code solution, I have replicated the solution with n8n.

Press enter or click to view image in full size
A new bot with n8n — (Image by Samir Saci)

With n8n, he can change the parameters and understand the logic behind.

Never heard about the no-code automation tool n8n? I have a tutorial for that.

In this tutorial, you will learn how to use my template collection that includes this Telegram bot.

What if you want to use Python?

Create your bot using Python

The initial implementation was using Python.

It is very easy as Telegram has a specific library to create bots (interracting with its API).

Find the source code in this repository 👇

Conclusion

This is a very light version to show the potential of what can be done with a Telegram Bot.

This can be improved with

  • Real-Time GPS Location Tracking
  • Add scanning function (Bar Code/QR Code) to avoid manual entry of delivery number by DRIVER.
  • A function to get store and driver comments in case of late delivery?
  • Seals management in case of shipping sensitive goods

About Me

Let’s connect on Linkedin and Twitter, I am a Supply Chain Engineer who uses data analytics to improve logistics operations and reduce costs.

For consulting or advice on analytics and sustainable supply chain transformation, feel free to contact me via Logigreen Consulting.

If you are interested in Data Analytics and Supply Chain, look at my website.

💌 New articles straight in your inbox for free: Newsletter
📘 Your complete guide for Supply Chain Analytics: Analytics Cheat Sheet

--

Samir Saci
Samir Saci

Written by Samir Saci

Top Supply Chain Analytics Writer — Case studies using Data Science for Supply Chain Sustainability 🌳 and Productivity: https://bit.ly/supply-chain-cheat