globall.dev - Telegram bot studio globall.dev
Content and delivery

Subscription course delivery: automatic lessons and protected content access

A Telegram bot that sells a sports course sends scheduled workouts every day and closes access when the subscription ends - without the participation of the author. Made for the public show “Undress and Rock” with Olympic gymnast Ekaterina Galkina.

Niche: online course by subscription Type: bot + payment webhook Stack: Python · Aiogram · FastAPI · SQLAlchemy async
30
Days of access with daily auto-delivery of workouts
protect
Protecting content from forwarding and copying
7
Tables in the database: courses, days, media, codes, subscriptions
HMAC
Payment via Tilda with a signed webhook
Problem

The subscription course must be issued every day - and protected

The sports course of lymphatic drainage training is sold as 30 day program: one lesson per day, in order, without the ability to skip ahead. This is two headaches for the author at once. First - deliver content strictly according to schedule: send the right day to the right people every morning, without confusing who is on what day. It is impossible to do this manually in any live audience - this means a daily change of operator, seven days a week.

The second, more painful for a paid information product - protection. Having purchased one access, a person can send the training video to anyone, and the whole point of the subscription collapses. For the project of a public person - Olympic gymnast Ekaterina Galkina and her show “Undress and Rock” - this is a matter of not only money, but also reputation: the content should not leak.

And the third detail that is often forgotten: access should close on its own. A subscription for 30 days means that on the 31st day a person should not have any training or the ability to scroll through old messages. Otherwise, the “subscription” turns into a one-time purchase forever.

Approach

Scoping: sales on the website, delivery and protection in the bot

The author already had a sales showcase on Tilda - there was no point in changing it. Therefore, we did not push the payment inside the bot, but docked two systems: the landing page sells, and the content is delivered and protected by a bot. We divided the task into three circuits and designed them according to priority.

  1. Payment interface. Tilda sends a webhook about payment - the bot must accept it, check authenticity (so that access cannot be given to oneself with a fake request) and issue an activation key to the buyer. This is the first thing that was designed: if the joint is unreliable, there is no need to build further.
  2. Delivery on schedule. A scheduler that every day at a given time sends to all active subscribers exactly their day of the course - with progress tracking so that no one gets lost.
  3. Protection and lifespan. Content protection mode on each message, plus automatic blocking of access and deletion of all materials at the end of the subscription.

Separately laid flexibility for the author: A course is content that changes. Therefore, days, media and texts should be edited in the admin panel without rewriting the code, and the course itself should be loaded from a structured file. This way the project remains “alive” and does not require a developer for every edit.

Solution

What ultimately works

The result is a bot that guides the buyer from paying on the website until the last day of the course - and closes the door behind itself.

From payment to access

A person pays for a course on a landing page the client’s landing page. Tilda sends a webhook to the bot about payment, bot verifies HMAC-SHA256 signature request, generates one-time activation code and sends it to the buyer by email via SMTP. The user enters the code in the bot and the 30-day subscription is activated. The code is tied to an email and a specific course and is triggered just once, so there's no point in sharing it.

Daily delivery on schedule

This is the heart of the product. Scheduler (APScheduler with a cron trigger) at a given time and taking into account the time zone, sends out exactly their day of the course to all active subscribers. Bot leads progress tracking — the current day out of the total, draws a visual progress bar and reminds you 3 days before the end that the subscription is ending. Every day is not one message, but a structured output: welcome materials, videos and photos of training, animations and links to music playlists (YouTube / analytics and AI tools / Apple Music).

Content protection

All course materials are sent with Telegram protection mode (protect_content) — Videos and photos cannot be forwarded, saved or copied. And when the subscription expires, the bot automatically deletes all sent messages with training - access to the content is completely closed, as promised in the subscription.

The author manages the course himself

The admin panel inside the bot gives the author full control without a programmer: managing courses, generating activation codes, viewing subscriptions and statistics, loading course from JSON and editor of days and media. User menu changes dynamically depending on the subscription status - middleware checks access and shows only what the person is currently entitled to.

Technically

Under the hood

Payment and activation

Tilda webhook + HMAC-SHA256
The payment comes from Tilda via webhook, the HMAC-SHA256 signature confirms the authenticity of the request - access cannot be given by a fake call.
One-time activation codes
The 8-character code is tied to the email and course, is generated automatically and works exactly once.
Sending a code by email (SMTP)
After payment, the code is sent to the buyer by email via SMTP - a combination of website → bot without manual actions.
Cloudflare Tunnel for webhook
Webhook is received through the Cloudflare Tunnel - without opening ports to the outside.

Delivery and subscription

APScheduler according to schedule
A Cron trigger with configurable time and time zone sends each subscriber their course day.
Progress tracking 30 days
Current day of total, visual progress bar and reminder 3 days before subscription expiration.
Media groups up to 9 files
Videos, photos and animations in one message, file_id caching for fast resends.
Middleware subscription verification
The menu switches dynamically - the bot shows the user only what is available according to his status.

Access protection and lifetime

protect_content on materials
Workouts cannot be forwarded, saved or copied - the content remains inside the subscription.
Auto delete when finished
When 30 days have expired, the bot deletes all sent messages - access is completely blocked.

Management and infrastructure

Admin panel in the bot
Course management, code generation, viewing subscriptions and statistics, loading a course from JSON, day and media editor.
SQLAlchemy 2.0 async, 7 tables
Users, rates, days, media, codes, subscriptions and messages sent - SQLite or PostgreSQL.
Python · Aiogram · FastAPI
Bot on Aiogram, webhook reception on FastAPI - a single service for delivery and payment acceptance.
Structured Content
Welcome messages, daily workouts and links to YouTube / analytics and AI tools / Apple Music playlists.
Python FastAPI SQLAlchemy async Aiogram SQLite / PostgreSQL Tilda webhook Cloudflare Tunnel
Result

The course delivers itself

The output is a bot that delivers workouts on schedule, closes access at the end of the subscription and protects the content. The buyer pays on the site, receives a code, activates access - and then gets his workout every day without a single touch from the author. On the 31st day, the subscription closes, the materials are deleted, and the content does not leak beyond the paid access.

This is a working tool for a public project - the show “Undress and Swing” with Olympic gymnast Ekaterina Galkina. The course showcase lives here: the client’s landing page. The author manages the course himself - through the admin panel in the bot, without a programmer for each edit.

Sales and subscriber retention figures are data from the project owner and are provided upon request for a specific task, without fictitious metrics.

If you have an information product, course, or closed subscription content - be it fitness, training, or any material that needs to be issued on a schedule and protected from forwarding - this is exactly the “payment → scheduled delivery → protection → auto-close” mechanics that we put together on a turnkey basis.

Do you need a bot that sells and delivers your course?

Tell us about the product - we will send you a fixed estimate and deadlines the day before. Payment, delivery on a schedule, content protection and admin for you - we collect it on a turnkey basis, the source code is yours from day one.

For free. I will answer within an hour during business hours. No spam.

We take on a limited number of projects at the same time - this keeps deadlines realistic.

IP Geolocation by DB-IP