AI task dispatcher
A Telegram bot for an events team — turns text and voice messages into Notion task cards with a deadline, priority and assignee.
- Role
- Requirements, prompt engineering, development with Claude Code
- Period
- 2026.09
- Status
- Completed
- Stack
- Python · FastAPI · aiogram / Telegram · LLM API · Whisper · Notion API · SQLite
Interface
01 / 06Problem
In a team running large events, tasks are set on the fly in chats — as text and voice messages, with "by Friday" and "tell Katya". Nobody has time to copy them into a tracker by hand, so some get lost, and deadlines and owners stay buried in the chat.
Solution
An employee writes to the bot as to a colleague. The LLM splits the message into separate tasks and extracts the title, description, deadline, priority, assignee and category; the exact date is calculated by a separate module. The bot shows a draft that can be edited right in Telegram, and only after confirmation does the card go to the Notion kanban board while the assignee gets a notification.
An MVP built in one day with Claude Code. My part was the requirements, the parsing rules in the prompt, the decision to calculate dates in code rather than in the model, and the failure scenarios. A separate document lists the issues I found while reviewing the code for this portfolio.
Goals
- 01Set a task in one message — text or voice
- 02Keep deadlines and owners from getting lost in chats
- 03Publish nothing to the tracker without a human check
- 04Lose no tasks even when Notion is down
Features
Key requirements
| ID | Requirement | Priority |
|---|---|---|
| FR-01 | One message yields as many tasks as it has independent items; corrections within a message do not split a task. | Must |
| FR-02 | The deadline is calculated from the message time; if a phrase cannot be parsed, it is kept as text. | Must |
| FR-03 | A card is created only after the author confirms; any field can be changed. | Must |
| FR-04 | If Notion is unavailable, the task is saved locally and sent later. | Must |
| FR-05 | The assignee is notified if they have written to the bot before. | Should |
| NFR-01 | The bot answers only whitelisted users. | Must |
| NFR-02 | The model's answer is validated against a schema; on invalid JSON — one retry. | Must |
| NFR-03 | An external service error does not crash the bot: the user sees a clear message. | Should |
Scenarios
- 01"Order cupcakes by tomorrow, tell Katya to finish the announcement by Friday, and remind me to call the venue the day after tomorrow in the morning"
- 02Whisper transcribes the speech, the LLM finds three tasks with different deadlines
- 03The bot shows three drafts in turn: 1/3, 2/3, 3/3
- 04After confirmation Katya is notified of her task
- 01Confirms a draft
- 02The Notion request fails — the task is saved to SQLite
- 03The bot replies: "Notion unavailable — saved locally (id #12)"
- 04On the next task or restart the outbox is sent to Notion
Challenges
Outcome
A working MVP of about 1,400 lines of Python — the bot, LLM parsing, deadline calculation, Notion with an SQLite fallback; tested in Telegram against a real Notion database. Plus a code review with 6 findings and improvement proposals.
The MVP is complete and runs locally. Further development would fix the findings, keep drafts outside process memory and switch to a Notion date property instead of text.