# Looking for an n8n Telegram Bot Workflow for Class Scheduling & Booking

**URL:** <https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331>\
**Category:** Help me Build my Workflow\
**Tags:** workflow-building, telegram, postgres\
**Created:** [November 12, 2026, 12:01pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331 "2026-11-12T12:01:37Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![FullHaos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fullhaos/32/197071_2.png) [@FullHaos](https://community.n8n.io/u/FullHaos)\
**Post date:** [November 12, 2026, 12:01pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/1 "2026-11-12T12:01:37Z")

</div>

Hi everyone!

I’m building a Telegram bot for a fitness studio using n8n.

The bot should allow trainers and administrators to:

- View class schedules and available time slots.
- Book, reschedule, and cancel classes.
- Manage multiple training rooms.
- Prevent double bookings.
- Receive notifications and reminders.
- Manage role-based access.

I’m considering PostgreSQL or Google Calendar as the backend.

**Does anyone have a similar n8n workflow, template, or GitHub project they could share?**

I’d appreciate any examples or architecture suggestions. Thanks!

---

<div class="post-metadata">

**Author:** ![Ankit\_Dongre](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ankit_dongre/32/198377_2.png) [@Ankit\_Dongre](https://community.n8n.io/u/Ankit_Dongre)\
**Post date:** [November 12, 2026, 12:56pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/2 "2026-11-12T12:56:23Z")

</div>

I’d use PostgreSQL as the source of truth and start with a Telegram Trigger → role lookup → Postgres query → Telegram response flow. Map Telegram user IDs to roles in your database and check permissions on every booking, reschedule, or cancellation. To prevent double bookings even when two requests arrive together, enforce a PostgreSQL exclusion constraint on room ID and overlapping time ranges (using btree\_gist), rather than relying only on a prior availability check; handle a constraint conflict by asking the user to choose another slot. Apply a similar constraint for trainers if they can’t teach overlapping classes, and perform reschedules atomically. A scheduled workflow can query upcoming bookings and send reminders, with a sent marker to avoid duplicates. Google Calendar can be a useful synced view, but I’d keep the booking decision in the database.

---

<div class="post-metadata">

**Author:** ![kartike](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@kartike](https://community.n8n.io/u/kartike)\
**Post date:** [November 12, 2026, 12:58pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/3 "2026-11-12T12:58:57Z")

</div>

The Postgres part above is solid, so I’ll add the Telegram side, which is where most of the real work hides.

n8n workflows are stateless per message. A booking conversation (pick a date, then a slot, then confirm) spans several Telegram messages, so keep a small state row per chat\_id: current step, chosen class, chosen slot. Read it at the top of the flow and update it at each step. Without that every message starts from zero.

Use inline keyboard buttons instead of free text wherever you can. Put the slot or class id directly in callback\_data, call answerCallbackQuery quickly so the button doesn’t spin, and re-check the slot on the confirm tap since it can get taken between the list and the click.

One setup note: Telegram allows only one webhook per bot, so the Telegram Trigger should be the single entry point and you route by message type and step from there. Role checks fit nicely as a lookup on the Telegram user id joined to a trainers/admins table, and reminders are just a scheduled workflow querying bookings where the reminder marker isn’t set yet.

---

<div class="post-metadata">

**Author:** ![FullHaos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fullhaos/32/197071_2.png) [@FullHaos](https://community.n8n.io/u/FullHaos)\
**Post date:** [November 12, 2026, 1:27pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/4 "2026-11-12T13:27:10Z")

</div>

Thanks for your suggestion! I really appreciate your help. I’ll take a closer look and see how I can use it in my project.

---

<div class="post-metadata">

**Author:** ![FullHaos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fullhaos/32/197071_2.png) [@FullHaos](https://community.n8n.io/u/FullHaos)\
**Post date:** [November 12, 2026, 1:27pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/5 "2026-11-12T13:27:37Z")

</div>

Thank you for sharing! This looks useful for my project. I’ll explore your recommendation and see how I can adapt it.

---

<div class="post-metadata">

**Author:** ![elmirbesirovic](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/elmirbesirovic/32/190631_2.png) [@elmirbesirovic](https://community.n8n.io/u/elmirbesirovic)\
**Post date:** [November 12, 2026, 4:30pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/6 "2026-11-12T16:30:59Z")

</div>

Not aware of a ready template for this one. For the double booking part, an exclusion constraint on room\_id plus the time range in Postgres does it, so a second insert for the same slot just errors. Add a WHERE status \<\> ‘cancelled’ to it or cancelled classes keep blocking their slot. That error is also easy to catch in n8n and turn into a “slot taken” message.

---

<div class="post-metadata">

**Author:** ![Zeke\_2007](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/zeke_2007/32/197743_2.png) [@Zeke\_2007](https://community.n8n.io/u/Zeke_2007)\
**Post date:** [November 12, 2026, 5:07pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/7 "2026-11-12T17:07:09Z")

</div>

Hi FullHaos,

Choosing between PostgreSQL and Google Calendar is the critical decision here. You should actually use both but strictly separate their jobs. Postgres must be your absolute source of truth to prevent double bookings while Google Calendar serves purely as a synced visual layer.

To build this securely in n8n you need three distinct phases:

First in your receive phase you start with a single Telegram trigger. You immediately deduplicate incoming webhooks using the unique update ID so your bot never processes the same command twice. Then you map the Telegram user ID to enforce role based access for trainers and admins.

Second in your booking phase you must track the chat state per user so the bot remembers where they are in the booking flow. When showing time slots use interactive buttons which are rechecked on confirm. The secret to preventing double bookings safely is letting Postgres make the final decision. By setting an exclusion constraint on the room and time columns Postgres will automatically reject overlapping inserts. If two people tap the same button at the exact same time the database blocks the second attempt and your bot simply replies that the slot is taken.

Third for notifications you run a separate scheduled job that queries upcoming classes. Once a reminder is sent you update a sent marker in your database so a user never receives a duplicate alert. Finally you sync the confirmed records over to Google Calendar for an easy daily view.

 ![IMG_5706](https://europe1.discourse-cdn.com/n8n/original/3X/2/c/2c6825e390404d1e9a60b1abdcae8d659f758109.png)

For full transparency I am affiliated with Pond AI. Pond AI builds runs and maintains these exact custom AI agents and booking systems for studios.

If you decide to go with Pond AI you will get a free architecture mapped out specifically for your fitness studio showing exactly how to configure those database constraints. That custom design is entirely yours to keep. You can explore the types of systems we build by visiting [Pond: AI agents that work for you](https://go.joinpond.ai/ezekiel) . Whenever you are ready to dive into the technical details you can [book a call](https://go.joinpond.ai/ezekiel-call) with the team directly . If we end up building the actual infrastructure for you every custom project comes with a 7 day refund.

Are you planning to host your Postgres database locally or use a managed cloud provider?

---

<div class="post-metadata">

**Author:** ![BenRon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/benron/32/197091_2.png) [@BenRon](https://community.n8n.io/u/BenRon)\
**Post date:** [November 13, 2026, 2:46am UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/8 "2026-11-13T02:46:52Z")

</div>

I’d put Postgres underneath rather than Google Calendar. A unique constraint on room plus start time is what stops double bookings, not the workflow. Keep roles in a users table keyed by Telegram ID and check it first in every flow. The calendar can mirror bookings later if people want to see it there.

---

<div class="post-metadata">

**Author:** ![elmirbesirovic](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/elmirbesirovic/32/190631_2.png) [@elmirbesirovic](https://community.n8n.io/u/elmirbesirovic)\
**Post date:** [November 13, 2026, 8:09am UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/9 "2026-11-13T08:09:05Z")

</div>

Exclusion constraint on room plus time range is the right call. Needs the btree\_gist extension for it to work with a plain room id. Are you running this on your own Postgres or a hosted one?

---

<div class="post-metadata">

**Author:** ![Chineydu](https://avatars.discourse-cdn.com/v4/letter/c/e36b37/32.png) [@Chineydu](https://community.n8n.io/u/Chineydu)\
**Post date:** [November 13, 2026, 9:25am UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/10 "2026-11-13T09:25:42Z")

</div>

Hi @FullHaos , using a Postgres exclusion constraint combined with a status check is a solid way to handle hard database-level locking for time slots without letting cancelled bookings block availability.

One detail that still leaves an open loop in chat-based bookings is managing state continuity when a conflict error hits—specifically, how to guide the user back to available options without them having to re-enter all their booking details from scratch in Telegram.

A simple step you can add to handle that cleanly in n8n is to store the user’s active step or temporary slot selection in a lightweight state table right before the insert attempt, so if the constraint catches a double booking error, the workflow can instantly read their intent and push a fresh inline keyboard with alternative slots.

If you ever want to explore stateful error recovery or multi-step conversation flows for automated booking, full disclosure: I am a Pond AI partner. Pond AI builds, runs, and maintains custom AI agents. I can sketch out what an error-resilient reservation sequence with state memory would look like for your workflow first, free. If you want it built, you can [book a call with Pond AI team](https://go.joinpond.ai/chinedu-call), [check out it services here](https://go.joinpond.ai/chinedu)

How are you currently handling message state when a user hits a time slot conflict?

---

<div class="post-metadata">

**Author:** ![Kemal\_Automation](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/kemal_automation/32/175107_2.png) [@Kemal\_Automation](https://community.n8n.io/u/Kemal_Automation)\
**Post date:** [November 13, 2026, 2:16pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/11 "2026-11-13T14:16:37Z")

</div>

Hello FullHaos,

For these requirements, I would prefer PostgreSQL as the central booking database and use n8n for Telegram communication, notifications, and automations. What’s crucial is preventing double bookings directly at the database level through transactions and appropriate constraints, rather than relying solely on workflow checks.

I develop such automation systems myself using Python and n8n, so I know how important a reliable architecture is, especially for booking processes.

Do you already have a working workflow, or are you still at the beginning of the implementation?

---

<div class="post-metadata">

**Author:** ![ikechukwu\_Ebuka](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ikechukwu_ebuka/32/198245_2.png) [@ikechukwu\_Ebuka](https://community.n8n.io/u/ikechukwu_Ebuka)\
**Post date:** [November 13, 2026, 3:04pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/12 "2026-11-13T15:04:18Z")

</div>

Hi @FullHaos

Building a Telegram bot for a fitness studio with n8n is a fantastic project, especially with features like role-based access, multi-room management, and double-booking prevention! Choosing PostgreSQL for this backend is definitely the right move over Google Calendar—relational databases handle complex constraints (like unique time slots and room concurrency) much more cleanly using database locks or transactional checks.

To help you get started with the architecture, here is a breakdown of how you can structure your n8n workflow:

\* Telegram Trigger Node: Capture incoming commands or callback queries from trainers and admins.

\* Router / Switch Node: Branch your workflow based on the user’s role (admin vs. trainer) to handle role-based access control.

\* PostgreSQL Node: Query or update your database. For instance, to prevent double bookings, you can use a unique constraint or a transaction check ensuring the trainer and room are free during that time slot.

\* Telegram Response Node: Send confirmation messages, schedules, or reminders back to the user.

A Quick Tip on Notifications & Reminders

For reminders, instead of keeping n8n running active delays, you can store scheduled notification timestamps in PostgreSQL and use an n8n Cron node running every few minutes to poll for upcoming classes that need reminders sent out.

If you ever want to scale this or want a fully custom setup, Pond AI builds custom AI agents around tools like n8n and Telegram bots. We always provide a free architecture first so you can see how everything fits together, and we offer a 7-day refund policy, meaning there’s zero risk to try us out.

Good luck with your fitness studio bot—it sounds like it’s going to save a ton of administrative headaches.

---

<div class="post-metadata">

**Author:** ![ikechukwu\_Ebuka](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ikechukwu_ebuka/32/198245_2.png) [@ikechukwu\_Ebuka](https://community.n8n.io/u/ikechukwu_Ebuka)\
**Post date:** [November 13, 2026, 3:10pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/13 "2026-11-13T15:10:13Z")

</div>

Hi @FullHaos

Building a Telegram bot for a fitness studio with n8n is a fantastic project, especially with features like role-based access, multi-room management, and double-booking prevention! Choosing PostgreSQL for this backend is definitely the right move over Google Calendar—relational databases handle complex constraints (like unique time slots and room concurrency) much more cleanly using database locks or transactional checks.

To help you get started with the architecture, here is a breakdown of how you can structure your n8n workflow:

\* **Telegram Trigger Node:** Capture incoming commands or callback queries from trainers and admins.

\* **Router / Switch Node:** Branch your workflow based on the user’s role (admin vs. trainer) to handle role-based access control.

\* **PostgreSQL Node:** Query or update your database. For instance, to prevent double bookings, you can use a unique constraint or a transaction check ensuring the trainer and room are free during that time slot.

\* **Telegram Response Node:** Send confirmation messages, schedules, or reminders back to the user.

A Quick Tip on Notifications & Reminders

For reminders, instead of keeping n8n running active delays, you can store scheduled notification timestamps in PostgreSQL and use an n8n Cron node running every few minutes to poll for upcoming classes that need reminders sent out.

If you ever want to scale this or want a fully custom setup, **Pond AI** builds custom AI agents around tools like n8n and Telegram bots. We always provide a free architecture first so you can see how everything fits together, and we offer a 7-day refund policy, meaning there’s zero risk to try us out.

Good luck with your fitness studio bot—it sounds like it’s going to save a ton of administrative headaches.

---

<div class="post-metadata">

**Author:** ![n8n.prod.site](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n.prod.site/32/199563_2.png) [@n8n.prod.site](https://community.n8n.io/u/n8n.prod.site)\
**Post date:** [November 13, 2026, 3:10pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/14 "2026-11-13T15:10:13Z")

</div>

```markdown
@FullHaos I don't think there is template that does exactly this. So I helped built one for you : **https://github.com/feversoul/n8n-telegram-class-booking**

This uses four workflows and one SQL file, built-in nodes only. It covers your list: schedule with free slots, book/move/cancel, multiple rooms, admin and trainer roles, reminders, and a read-only calendar feed for Google Calendar. Double bookings are blocked in Postgres by exclusion constraints on room and trainer.

To set it up:

1. Create a bot with @BotFather and copy the token.
2. Follow the [step-by-step guide](https://github.com/feversoul/n8n-telegram-class-booking/blob/main/docs/SETUP.md) in the repo to install it.
3. Send `/start` to the bot. The first person becomes admin and adds rooms and class types from the chat.

I've tested it end to end on n8n 2.47.5 against a stand-in for the Telegram API. If anything breaks on your side, open an issue on the repo or reply here.

```

---

<div class="post-metadata">

**Author:** ![FullHaos](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/fullhaos/32/197071_2.png) [@FullHaos](https://community.n8n.io/u/FullHaos)\
**Post date:** [November 13, 2026, 6:51pm UTC](https://community.n8n.io/t/looking-for-an-n8n-telegram-bot-workflow-for-class-scheduling-booking/328331/15 "2026-11-13T18:51:30Z")

</div>

Thank you, everyone. Your advice is very helpful. I am currently training to become an AI automation engineer, and I’m using n8n as the primary platform for my projects. Right now, I’m drafting the technical specifications. I’ve taken all your suggestions into account. This is my first project, and I’m committed to seeing it through to a finished product. I’ll be sharing the development process, including the challenges I encounter and the successes I achieve.
