Manage fitness class bookings with Telegram and data tables
Quick overview
Description
Quick overview This workflow runs a Telegram booking bot for a fitness studio, storing class schedules and member bookings in n8n Data Tables, enforcing capacity limits, and sending daily class reminders. How it works Triggers when a new Telegram message is received and parses the command and arguments from the message text. When users send /classes, it reads active classes from an n8n Data Table, calculates remaining spots from capacity and booked_count, and replies in Telegram. When users send /book CODE, it looks up the class by code in an n8n Data Table, checks availability, records the booking in a bookings Data Table, increments the class booked_count, and confirms or rejects the booking in Telegram. When users send /cancel CODE, it finds the user’s active booking in the bookings Data Table, marks it cancelled, decrements the class booked_count, and sends a Telegram confirmation or “no booking found” message. When users send /mybookings, it fetches the user’s active bookings from the bookings Data Table and returns a list in Telegram. When admins send /addclass with class details, it verifies the sender against a configured admin ID list, inserts the class into the classes Data Table, and replies with either a success message or usage/authorization guidance. Runs daily on a schedule, loads all booked bookings, checks whether each class is active and scheduled for today, and sends Telegram reminders to the booked users. Setup Create and connect a Telegram bot credential, and ensure it is selected for the Telegram trigger and all Telegram send actions. Create two n8n Data Tables (for example, studio_classes and studio_bookings) with the columns used in this workflow (classes: code, title, room, day, start_time, capacity, booked_count, active; bookings: code, user_id, user_name, status, created_at) and update each Data Table node to point to your table IDs. In the configuration step, set studio_name and optionally set admin_ids to a comma-separated list of Telegram numeric chat IDs to enable /addclass. Review the daily schedule trigger time (currently 08:00) and adjust it to match your studio’s timezone and preferred reminder time. An n8n automation workflow template by Aswin Nataraj.
Community Metrics
Author
Aswin Nataraj
Platform
web
Pricing model
free
Categories
- Automation
Tags
- n8n
- workflow
- telegram
- code
Capabilities
- 2 nodes