Build a Telegram Bot That Reports to You
Send yourself automation results and alerts through a simple Telegram bot.
By Dr. Dev2026-01-248 min read
π
Create the bot
Talk to BotFather on Telegram, create a bot and copy the token into an environment variable.
Send a message
import os, requests
def notify(text):
url = f"https://api.telegram.org/bot{os.environ['BOT_TOKEN']}/sendMessage"
requests.post(url, json={'chat_id': os.environ['CHAT_ID'], 'text': text}, timeout=10)Wrap up
Call notify() at the end of your scheduled script and you get a report on your phone every time it runs.