Check and remember returning users across your Telegram bot

Instantly recognizes returning Telegram users and keeps their session active, so no one has to re-register every time.

How the work actually flows

It branches. Exactly one path is taken.

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

flowchart TD trig>"user messages telegram bot"]:::trig s0[("check live session cache")]:::store s1[("add new user if missing")]:::store s2[("cache session for next time")]:::store trig --> s0 s1 --> s2 gx{"× is user already cached"}:::gate s0 --> gx p00["skip lookup, use cache"]:::task gx -->|"returning user"| p00 p10["check sheet and register if missing"]:::task gx -->|"new user"| p10 jn{"○ resume session handling"}:::gate p00 --> jn p10 --> jn jn --> s1 out[/"instant user recognition"/]:::out pay{{"no re-registration for returning users"}}:::pay s2 --> 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 record or sheetOne path onlyPaths rejoinResultPayoff
Build size
Advanced

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

Business functions
Messaging & NotificationsSpreadsheet & Database Ops
Connects
TelegramRedisGoogle Sheets

The problem it solves

Every message that comes into your bot gets treated like it's from a stranger, so you or the bot end up re-asking who someone is or looking them up manually. That slows things down and makes the experience feel clunky for people who've already registered.

Who it fits

Any business running a Telegram bot for customers or team members that needs to know who's messaging without asking every time.

How it works

  1. Someone messages your Telegram bot
  2. The system checks a live cache for their session, so returning users are recognized instantly
  3. If it's a new user, it checks a Google Sheet of registered users and adds them if they're missing
  4. Their session is cached for fast recognition next time
  5. Other automations can pull this same user data whenever they need it
What you get

Returning users recognized without asking twice

Every person who messages your Telegram bot is instantly recognized as a returning user, no re-registration needed.

What you get

Instant recognition of who's messaging you, with an up-to-date roster of registered users in Google Sheets.

What you need

A Telegram bot, a Redis cache instance, 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