agentic-workflows-portfolio

GTD Daily Review (Telegram)

A Telegram bot that turns inbox processing into a tap-driven conversation. Every thought you send gets captured to your second brain, and /daily walks you through your GTD inbox one item at a time with inline buttons.

hero

The Problem

I had 50+ captured thoughts piling up in my GTD inbox: voice notes, messages, emails, random ideas from the day. Processing them meant sitting at a computer, context-switching away from whatever I was actually doing, and working through each one in a text conversation. A 30-item inbox turned into a 90-minute ordeal. I kept avoiding it, the inbox kept growing, and important next actions got lost in the noise.

The GTD method says the clarify-to-zero step should be fast and reflexive. It wasn’t.

The Solution

A Telegram bot that does two things:

  1. Captures everything passively. Text messages become thoughts. Voice notes get transcribed and captured. Action items get auto-extracted into GTD tasks. This already existed.

  2. Processes the inbox with one command. Send /daily from your phone. The bot walks you through every inbox item one at a time, with a keyboard of buttons below each one:

📥 Inbox  ▓▓▓▓░░░░░░░░  4/12

send in invoice for payment

 🎯 Next    ⏳ Wait    💭 Someday
 ✅ Done    🗑 Drop    📂 Project
 ℹ️ Context ⏭ Skip    🛑 End

Each tap is one decision:

When the last item is done, the bot sends a summary: today’s calendar, do-now tasks, due today, overdue, and stale waiting-for items.

Screenshots

Each inbox item appears as a single message with decision buttons. Tap one and the card updates in place.

“Next” opens a sub-flow: context → priority → due date. Four taps total.

After the last item, the bot renders today’s calendar, do-now tasks, overdue, and stale waiting-for.

Result

Key Decisions

Under the Hood

Stack: Supabase Edge Functions (Deno/TypeScript), Postgres with gtd_* schema, Telegram Bot API (inline keyboards + callback queries), Google Calendar service account, Groq Whisper (voice transcription), OpenRouter (embedding + metadata extraction for captures).

The daily review flow is implemented as a single Edge Function that branches on Telegram update type:

Two helper Edge Functions support it: gtd_task_context (pulls the source thought for the ℹ️ Context button) and gtd_calendar_today (wraps the Google Calendar API for the /status command and the end-of-review summary).

How to Demo It

  1. “Open your phone. Here’s my Telegram bot.”
  2. “Watch what happens when I send a voice note.” (dictate a thought with a few action items), bot replies in a few seconds: “Captured as task, 3 task(s) added to GTD inbox.”
  3. “Now watch this.” (send /daily), bot shows: “📥 Inbox 1/N” + title + buttons.
  4. Tap through 3-4 items: one Done, one Next → @computer → high → tomorrow, one Wait → reply “Sarah”.
  5. When the review finishes, the summary message appears with today’s calendar and overdue list.
  6. “90 minutes → 4 minutes. Works from the lock screen. Never misses a capture.”

Limitations & Setup

Needs:

Single-user today: tasks are stored under a fixed UUID. Multi-user would take ~1 hour: add a telegram_user_id → supabase_user_id mapping table and parameterize the USER_ID constant.

Doesn’t render Telegram’s MarkdownV2 everywhere: uses the classic Markdown parse mode and escapes only the characters that matter. One or two special chars in task titles could render weirdly; a future pass could switch to MarkdownV2 with a stricter escape.

Demo Pitch

“I used to avoid my GTD inbox because processing it took an hour and required sitting at my computer. Now I tap through the whole thing from the bus in four minutes. Same method, different interface, and because the bot captures voice notes and auto-creates tasks, the inbox fills itself without me thinking about it.”