Telegram task agent
Turns team chat into a task list
Summary
A bot in Albujón Energy's team group. It reads every message and voice note, picks out new tasks, updates and finished work, and posts a summary at 8:30 and 17:00 on weekdays, with buttons to confirm what got done. The team uses it every day.
Python, Claude for classification, Gemini for voice notes and Postgres, running on Railway.
The problem
In a small team, work gets handed out in the group chat and in voice notes, and then it disappears up the scroll. I wanted the task list to build itself from the conversation, without asking anyone to change how they talk.
What it does
The bot reads every message in Albujón Energy's team group and classifies it as a new task, an update, a context problem or finished work. It reacts with a thumbs-up when it records something and stays quiet when a message is just chat. Voice notes are transcribed with Gemini and go through the same pipeline; photos and videos only get an acknowledgement.
- At 8:30 on weekdays it posts the open tasks; at 17:00 it posts the day's review.
- Tasks waiting for confirmation come with inline buttons, done or still open, and that mode expires at midnight.
- Commands let anyone list, create, close or change the state of a task by hand. The team uses it every day.
How it's built
Plain Python split into handlers and scheduled jobs, the LLM calls (Claude to classify, Gemini to transcribe) and a Postgres layer with a connection pool. It runs on Railway as a worker with no public port, next to a managed Postgres, and every push to main deploys it.
What I learned
In python-telegram-bot, the days of a daily job count from Sunday as 0, while Python's own weekday() starts with Monday as 0. Writing Monday to Friday the Python way silently drops Friday. I fixed the days and added a second check with Python's convention as a safety net.