Message one Telegram bot “what’s my day?” and it answers in one message: the weather, your calendar, your todo list and the news. I replaced five apps with one chat, and it costs nothing to run.

What it does
The Telegram Assistant is one bot that does the morning check for you. Instead of opening a weather app, a calendar app, a todo app and a news app, you send one message and get one answer. It checks the weather, reads your calendar, looks at your todos and scans the news, then tells you what your day looks like in a few short lines.
What it sent me
I tested it on a real morning. Here is exactly what it sent back:
You: what’s my day?
Bot: Morning. Dhaka, 28°C, rain at 15:00 — take the umbrella. 09:00 Client call with Arif. Contract deadline is today. 14:30 Dentist. Leave at 14:00. Todo: reply to Sara about the invoice, pay the hosting bill. News: 3 stories on AI agents. Nothing on fire. That’s the day. 5 lines.

How it works
- Telegram hears you. The bot polls the Telegram Bot API for new messages.
- It scores your message against five intents: weather, calendar, todo, news and whole day.
- It fetches the facts. Weather comes from Open-Meteo, which is free and needs no key. Calendar and todos come from local JSON files, and news comes from RSS. Gemini only writes the reply — it never has to guess the facts.
- It answers in one message. That is one Gemini request per question.

The intent maths
score = 0
+2 for each keyword match
+1 if the message is short (6 words or fewer)It worked on every test:
- “what’s my day?”: day intent 2+1=3, the winner
- “will it rain today?”: weather 2+1=3
- “what do I need to do?”: todo 2+1=3
- “tell me the news”: news 2+1=3
Ties go to the whole day.
What you need
- Python 3.12
- A Telegram account and @BotFather to create your bot
- A Gemini API key — free, no card, from Google AI Studio
- Open-Meteo for weather — no key needed
- News from free RSS feeds
Build it
- Create the Telegram bot. Message @BotFather and use /newbot. Put the token in
.envas TELEGRAM_BOT_TOKEN. Message your bot once, then open https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates to find your chat.id and put it in.envas TELEGRAM_CHAT_ID. - Get a Gemini key from aistudio.google.com and put it in
.envas GEMINI_API_KEY. - Put your day in calendar.json and todo.json. A calendar entry looks like this:
{"time": "09:00", "title": "Client call with Arif", "note": "Contract deadline is today"}- Run it:
cp .env.example .env
pip install -r requirements.txt
python main.pyThen message your bot “what’s my day?”
The code
telegram-assistant/
├── main.py
├── bot.py
├── weather.py
├── calendar_client.py
├── todo.py
├── news.py
├── config.py
├── calendar.json
├── todo.json
├── requirements.txt
├── .env.example
└── .github/workflows/telegram-assistant.yml
main.py loads the settings and starts the polling loop:
from bot import handle_message, run_polling
from config import load_settings
def main():
settings = load_settings()
run_polling(settings, handle_message)
if __name__ == "__main__":
main()bot.py scores each message against the five intents — 0 to start, +2 per keyword matched as a whole word, +1 if the message is 6 words or fewer. Ties go to the whole day:
def score_intent(message):
words = message.lower().split()
intents = {
"weather": ["weather", "rain", "temperature"],
"calendar": ["calendar", "meeting", "call"],
"todo": ["todo", "tasks", "do"],
"news": ["news", "headlines"],
"day": ["day", "today", "morning"],
}
scores = {}
for intent, keywords in intents.items():
score = 0
for keyword in keywords:
if keyword in words:
score += 2
if len(words) <= 6:
score += 1
scores[intent] = score
best = max(scores.values())
winners = [name for name, score in scores.items() if score == best]
if len(winners) > 1:
return "day"
return winners[0]The Gemini prompt keeps the reply short:
“Answer in under 120 words. One line per item. No greetings, no filler words, no motivational quotes. If it will rain, say so and say what to do about it.”
If Gemini fails, the bot falls back to a plain list of the facts.
Make it run every morning
The recommended way is GitHub Actions, using .github/workflows/telegram-assistant.yml. Add GEMINI_API_KEY, TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID as repository secrets, and schedule it for 01:00 UTC — that is 07:00 in Dhaka.
A note on Cloudflare Cron: Workers run JavaScript, not Python, and Workers AI gives 10,000 Neurons per day free. You can use a Cron Trigger to call workflow_dispatch on the GitHub workflow, or swap the Gemini call for Workers AI.
What broke
- The bot answered everything twice. Fix: store last_update_id and skip updates you have already handled.
- The weather was for the wrong city. Open-Meteo needs latitude and longitude. Dhaka defaults to 23.81, 90.41.
- Gemini wrote a weather report. The prompt “under 120 words, one line per item, no greetings” fixed it.
Download the project
Unzip it, copy .env.example to .env, fill in the three keys, put your real day in calendar.json and todo.json, run python main.py, and message your bot.
