Run a Telegram chatbot that remembers separate conversations

Lets people start, resume, and summarize separate chat sessions with an AI assistant on Telegram.

How the work actually flows

It branches. Exactly one path is taken.

Pattern: Exclusive Choice (4) · Simple Merge (5)

flowchart TD trig>"message sent in telegram"]:::trig s0["identify session command"]:::task s1["ai responds using session context"]:::task trig --> s0 gx{"× what does the user want"}:::gate s0 --> gx p00["create session record"]:::task gx -->|"start new session"| p00 p10["load session history"]:::task gx -->|"resume session"| p10 p20["generate summary"]:::task gx -->|"summarize session"| p20 jn{"○ continue conversation"}:::gate p00 --> jn p10 --> jn p20 --> jn jn --> s1 out[/"resumed conversation with instant summary"/]:::out pay{{"no lost context across topics"}}:::pay s1 --> out out --> pay classDef task fill:#e7f6fe,stroke:#34b8f0,color:#2c2a29 classDef svc fill:#f6f8fa,stroke:#7c8795,color:#2c2a29 classDef mi fill:#e7f6fe,stroke:#0079a8,color:#2c2a29,stroke-width:2px classDef human fill:#fff,stroke:#0079a8,color:#0079a8 classDef store fill:#f6f8fa,stroke:#0079a8,color:#2c2a29 classDef trig fill:#00a4eb,stroke:#0079a8,color:#fff,font-weight:bold classDef trigtime fill:#00a4eb,stroke:#0079a8,color:#fff,font-weight:bold classDef trigdata fill:#8ad4f5,stroke:#0079a8,color:#06314c,font-weight:bold classDef gate fill:#fff,stroke:#e8a23d,color:#6b4708,font-weight:bold classDef out fill:#1f9d6b,stroke:#167a53,color:#fff,font-weight:bold classDef pay fill:#06314c,stroke:#021f33,color:#fff
Starts itA stepOne path onlyPaths rejoinResultPayoff
Build size
Advanced

A larger build with multiple systems, AI reasoning, and custom rules.

Business functions
AI Agents & Autonomous SystemsAI Chatbots & AssistantsMessaging & NotificationsSpreadsheet & Database Ops
Connects
TelegramOpenAIGoogle Sheets

The problem it solves

You want to pick up an old conversation with an AI assistant without losing context or starting over. Juggling multiple ongoing topics in one chat thread gets confusing fast.

Who it fits

A team or individual who uses an AI assistant on Telegram for multiple, separate ongoing conversations.

How it works

  1. A user sends a command in Telegram, like starting a new session or resuming an old one
  2. Google Sheets keeps track of which sessions are active and their history
  3. The AI assistant answers using the context of the current session
  4. Users can request a summary or ask a specific question about a past session
What you get

Conversations you can pick back up anytime

You get an AI assistant on Telegram that remembers each conversation separately, so you can pause and resume anytime.

What you get

A running record of separate, resumable conversations with instant summaries on request.

What you need

A Telegram bot, an OpenAI API key, and a Google Sheets account.

We can build this. But should you?

The hard question is not how to build it. It is whether this is the right thing to build first.

That is what a Fractional Chief AI Officer figures out with you, before anyone writes a line of code.

Let's Talk Strategy

Related automations

Back to the AI Playbook