A Telegram bot powered by Google Apps Script that monitors a Google Sheets document and sends real-time notifications when new blocked pallets appear β built for warehouse quality control workflows.
In a warehouse quality control environment, blocked pallets require immediate inspection before pickers can fulfill customer orders. Previously, QC controllers had to manually check a shared Google Sheet on their laptops to spot new priorities β a process that created delays, especially during peak hours when up to 6 blocked pallets could appear simultaneously.
With ~6 people working on the same document, there was no clear way to coordinate who was handling which pallet, leading to duplicated efforts or missed priorities altogether. Every minute of delay meant slower order fulfillment and late deliveries.
This bot monitors the shared spreadsheet in real-time and instantly pushes notifications to a Telegram group shared by the entire QC team. When a new blocked pallet appears, everyone is notified at the same time β no more manual checking. Team members can dynamically claim priorities directly in the group chat, making the workflow faster and more transparent.
The result: blocked pallets get resolved faster, pickers can do their job without waiting, and orders leave the warehouse on time.
- π¨ Instant notification when a new blocked pallet appears
- β Notification when a pallet is unblocked
- π₯ Supports multiple recipients (individuals or group chat)
- β‘ Runs automatically every minute via Google Apps Script triggers
- Google Apps Script checks the spreadsheet every minute
- Compares current rows with previously known state
- Detects new or resolved pallets
- Sends formatted Telegram messages to all configured recipients
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a display name (e.g.
Warehouse QC Alerts) - Choose a username ending in
bot(e.g.warehouse_qc_alerts_bot) - BotFather will reply with a token β save it for later
- Search for your new bot on Telegram and send
/start - Open this URL in your browser (replace
YOUR_TOKEN):
https://api.telegram.org/botYOUR_TOKEN/getUpdates
- Find the
"id"field inside the"chat"object β that's your chat ID
π‘ Alternatively, send
/startto @userinfobot β it will reply with your chat ID instantly.
- Go to drive.google.com and create a new Google Sheet
- Click Extensions β Apps Script
- Delete the default code
- Paste the contents of
Code.gsfrom this repo - Fill in your values at the top of the file:
TELEGRAM_TOKENβ token from BotFatherRECIPIENTSβ your chat ID, e.g.["123456789"]SOURCE_SHEET_IDβ the ID from your spreadsheet URL (/spreadsheets/d/THIS_PART/edit)SHEET_NAMEβ name of the tab in your spreadsheet
- Click Save (πΎ)
- Click Run β checkForNewPicks
- A popup will appear β click Review permissions
- Select your Google account
- Click Advanced β Go to (unsafe) β this is your own script, it's safe
- Click Allow
- In Apps Script click the clock icon (Triggers) in the left sidebar
- Click + Add Trigger in the bottom right
- Configure:
- Function:
checkForNewPicks - Event source:
Time-driven - Type:
Minutes timer - Interval:
Every minute
- Function:
- Click Save and authorize again if prompted
Instead of individual notifications you can send alerts to a Telegram group:
- Create a group and add your bot as a member
- Make the bot an admin with Send Messages permission
- Send any message in the group, then visit the
getUpdatesURL - Find the group
"id"(starts with-) and add it toRECIPIENTS
- Google Apps Script (JavaScript)
- Telegram Bot API
- Google Sheets API (read-only access)
MIT
