Setting Up a Telegram Bot on Google Apps Script

This is the technical companion to Automating Business Reports with Google Apps Script and Telegram, which covers the project this code came from. Here I’ll walk through running a Telegram bot on Apps Script: handling updates, routing messages, and managing the webhook. Receiving updates Telegram delivers updates to your webhook as HTTP POST requests. In Apps Script, a POST to a deployed web app invokes the doPost(e) function, so that’s where the bot starts: ...

July 22, 2025 · 3 min

Automating Business Reports with Google Apps Script and Telegram

Google Apps Script is easy to dismiss as a toy. Over two freelance projects it turned out to be a genuinely capable serverless platform for automation work built around Google Sheets and Telegram. This post covers the second of those projects — a reporting system for a US-market logistics business — and how I got there. First encounter I came across Apps Script on an earlier freelance job. A consulting firm needed a Telegram bot that generated templated Word contracts. They had started the work themselves in Apps Script but hadn’t finished it, so I picked it up and rebuilt the bot in Python with aiogram, rendering .docx files from templates using docxtpl and passing files around as base64. Apps Script was only incidental to that project, but it was my first look at the platform. ...

July 22, 2025 · 3 min