Telegram Sales-Funnel Bot for Online Courses
A Telegram bot that runs the whole funnel — lead magnet → guide → intensive → course — with payment, auto-delivery and an admin panel.
Problem
A course seller was running the whole funnel by hand in Telegram — sending the free material, taking payment, granting access and nudging the next product — which doesn't scale and drops customers.
Result
A working bot that walks each buyer from free material to paid course automatically: catalog, checkout, instant access delivery, an upsell auto-funnel, and a full owner admin panel with stats, users, payments, products, broadcasts and editable texts.
Tech Stack
Overview
A Telegram bot that runs the full sales funnel for an online-education seller: a free lead magnet draws people in, a catalog offers the paid products (guide → intensive → course), and after each purchase the bot delivers access instantly and immediately proposes the next step up. Everything the owner needs to run it — stats, users, payments, product management, text editing and broadcasts — lives in an in-bot admin panel. Built on Python + aiogram 3 with a modular architecture that extends without a rewrite.
Problem
Selling courses through Telegram by hand is a leaky bucket. The owner was personally sending the free material, remembering who paid, granting access, and manually nudging buyers toward the next product. That work doesn’t scale, it’s easy to drop a customer between steps, and there’s no real view of who’s where in the funnel or how much came in.
Solution
The bot models the funnel as data, not as hard-coded steps. The buyer side handles /start, the free lead magnet, the product catalog, a demo checkout and automatic access delivery, then an auto-funnel that offers the next product right after a purchase. The owner side (/admin, restricted to the owner ID) exposes statistics (users, payments, revenue), the user list with each person’s funnel stage, the payments list, product management (add, enable/disable), editable texts (welcome, lead magnet) and a broadcast to all users. State lives in SQLite via aiosqlite across users / products / payments / texts, so a new product or funnel step is added through the admin panel or a single DB row — no redeploy.
Features
- Buyer funnel:
/start, free lead magnet, catalog, checkout, automatic access delivery - Upsell auto-funnel: the next product is offered immediately after each purchase
- Owner admin panel (
/admin): stats, user list with funnel stage, payments, product management - Editable texts (welcome, lead magnet) and a broadcast to all users — no code changes
- Modular architecture (config / database / keyboards / user & admin handlers) that extends without a rewrite
- SQLite via aiosqlite; a clear payment-webhook integration point for going live
Development Process
The design goal was a demo that becomes production without being rebuilt. The demo “payment” button is a single, clearly-marked integration point in the user handler — swapping it for YooKassa, Prodamus or Telegram Payments means wiring the paid status to the provider’s webhook, nothing more. The same query architecture moves from SQLite to PostgreSQL for load without changing the handlers. Deployment is a plain VPS running the bot as a systemd service with a daily DB backup by cron.
Results
- The full funnel runs hands-free: free material, sale, access and upsell happen without the owner
- The owner sees who’s at which funnel stage, who paid and total revenue at a glance
- New products and funnel steps are added from the admin panel — no redeploy
- A clean demo → production path: one payment integration point and a SQLite → PostgreSQL swap
What Was Learned
Modeling a funnel as editable data instead of fixed code is what turns a one-off bot into a sellable product. Because the steps, texts and products live in the database and the admin panel, the owner can reshape the funnel without touching the bot — and the single, honest “this is where real payments plug in” marker made the demo trustworthy to hand over.