Sumchenko Works
RUРусская версияToggle theme
P—03 · DevelopmentCompleted

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 / 06
One message — three tasks“Order cupcakes by 15:00 tomorrow, tell Katya to finish the announcement by Friday and remind me to call the day after tomorrow”: the first task is already in Notion, the second awaits confirmation.

Problem

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

  1. 01Set a task in one message — text or voice
  2. 02Keep deadlines and owners from getting lost in chats
  3. 03Publish nothing to the tracker without a human check
  4. 04Lose no tasks even when Notion is down

Features

Text and voice messages (Whisper)Several tasks from one messageDeadlines from phrases like 'by Friday', 'the day after tomorrow in the morning'A draft with any field editableA kanban board in NotionAssignee notificationSQLite fallback and later sync to NotionWhitelist-only access

Key requirements

IDRequirementPriority
FR-01One message yields as many tasks as it has independent items; corrections within a message do not split a task.Must
FR-02The deadline is calculated from the message time; if a phrase cannot be parsed, it is kept as text.Must
FR-03A card is created only after the author confirms; any field can be changed.Must
FR-04If Notion is unavailable, the task is saved locally and sent later.Must
FR-05The assignee is notified if they have written to the bot before.Should
NFR-01The bot answers only whitelisted users.Must
NFR-02The model's answer is validated against a schema; on invalid JSON — one retry.Must
NFR-03An external service error does not crash the bot: the user sees a clear message.Should

Scenarios

EmployeeA voice message with three tasks
  1. 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"
  2. 02Whisper transcribes the speech, the LLM finds three tasks with different deadlines
  3. 03The bot shows three drafts in turn: 1/3, 2/3, 3/3
  4. 04After confirmation Katya is notified of her task
EmployeeNotion is down
  1. 01Confirms a draft
  2. 02The Notion request fails — the task is saved to SQLite
  3. 03The bot replies: "Notion unavailable — saved locally (id #12)"
  4. 04On the next task or restart the outbox is sent to Notion

Challenges

The model is bad at date mathsLLMs confuse "this Friday" with "next Friday". The model only extracts the deadline phrase; the date is calculated by dateparser with normalisation of word forms, "in the morning"/"after lunch" and "this week".
One task or several"…and also tell Katya" is a new task, while "on Thursday… no, let's do Friday" is the same one. The splitting rules and examples of both cases live in the prompt.
The bot cannot write firstTelegram does not let a bot start a conversation. The bot remembers everyone who has written to it, finds the assignee by name or @username, and says so honestly if it could not notify them.
Notion is unavailableA task must not vanish because of an external service: SQLite as an outbox, resent on start and before each new task, stopping at the first network error.

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.

Technologies

Next · P—04Website Health Monitor