Available for automation projects

Never Miss a Lead

A 24/7 AI sales agent on Telegram that only hands a lead to sales after a second, stricter AI has independently verified the contact details are real.

n8n OpenRouter Telegram Google Sheets
Person messaging on a smartphone

The problem

Leads message at 11pm, on weekends, mid-holiday, whenever they're ready to buy, not when a sales rep is at their desk. A human can't be on Telegram around the clock, and a naive chatbot either interrogates leads with a rigid form, killing the conversation, or risks confidently qualifying a lead the underlying data doesn't actually support, wasting the sales team's time on bad handoffs.

The approach

Built as two AI agents with different jobs, not one giant prompt, so a chatty model can never talk itself into a handoff the data doesn't support.

  1. A conversational agent replies naturally to the lead, asking for whatever's still missing one thing at a time.
  2. When it believes it has a name, email, and phone number, it signals ready, without trusting its own read on that.
  3. A separate extraction agent independently re-reads the whole conversation and strictly pulls out those three fields, refusing to guess or invent.
  4. Only when this stricter second pass also confirms all three fields does the lead actually get handed to sales by email.

Architecture

flowchart LR
    TG[Telegram Message] --> N[Normalize + Load Memory]
    N --> H[(Read Conversation History)]
    H --> A1[Conversational Agent]
    A1 --> LOG[(Log This Turn)]
    A1 --> READY{Agent signals ready AND not already qualified?}
    READY -- no --> REPLY[Reply to Lead]
    READY -- yes --> A2[Extraction Agent - Strict Re-check]
    A2 --> VALID{All 3 fields genuinely confirmed?}
    VALID -- yes --> LEAD[(Upsert Lead: Qualified)]
    LEAD --> MAIL[Email Sales Team]
    MAIL --> CONFIRM[Confirm to Lead]
    VALID -- no --> REPLY
                    

Engineering decisions

Two agents checking each other

The conversational agent's job is to sound human. The extraction agent's job is to be strict about data quality. A chatty model can't accidentally hand off a lead the data doesn't support.

Adversarially tested

A test lead falsely claimed it already had a name, email, and phone on file to try to trick a false handoff. The bot recognized it had no real history for that chat and asked again.

Memory verified, not assumed

Multi-turn memory was confirmed by checking that a reply on turn two genuinely pulled turn one's content back from the Sheets-backed store, not just in-session state.

No duplicate handoffs

An already-qualified lead messaging again never re-triggers a second sales email. The guard checks status, not just the model's stated confidence.

Orchestration

n8n

AI / LLM

OpenRouter

Claude Sonnet for conversation, GPT-5 mini for extraction

Messaging

Telegram Bot API

Data

Google Sheets Gmail API

Want something like this built for your business?