
How I Built a Telegram Bot for My Short-Term Rental with AI
I am an economist, not a programmer. My main business is Specraz (спецраз.рф), which arranges special permits for oversize cargo. But I also have a short-term rental apartment. I use it to learn how to build products with Claude Code and Codex AI agents. This is the first one: the “33 Kvadrata” Telegram bot. It picks up bookings, sets a smart-lock code, and guides the guest through check-in. No gloss.
Before the bot
Bookings come from several platforms. Each one needs to be noticed, recorded, sent a lock code, and followed by an explanation of how to get there and the building rules.
At first, check-in ran through automated WhatsApp messages. WhatsApp was blocked—the messenger itself, not my account. I switched to automated Telegram messages, and Telegram was blocked too. I needed my own bot, not a broadcast through someone else’s platform.

What I built
The bot works for my own apartment. It has three parts: an admin bot for me, guest bots in Telegram and MAX (a Russian messenger), and a mini app with a calendar.
- Picks up bookings from emails and through the RealtyCalendar API. It understands emails from five Russian booking platforms: Avito, Ostrovok, Sutochno, Yandex, and Otello.
- Booking card in the admin bot: dates, the guest’s progress through the instructions, and a calendar.
- Guest bot in Telegram and MAX. The guest taps a link in an SMS and follows instructions on how to get there, enter the apartment, and follow the rules.
- Smart-lock code. A button sets a code through TTLock (a smart-lock platform). It works from 2:00 PM on check-in day until 12:10 PM on checkout day. If a booking is canceled, the code is deleted.
- Lock log. I receive messages such as “door opened,” “wrong code,” and “battery low.”
- Security deposit through my own service, SafeZalog: the amount is held on the card rather than charged. On check-in day, the bot reminds the guest about the deposit.
- Checkout question. At 8:00 PM, the bot asks the guest when they are leaving.

The decisions stay with me. The lock code and the SMS to the guest are sent with buttons: the host only needs to tap a couple of them. I deliberately did not make the bot fully autonomous.
How I built it
The bot is not a standalone project. Its ideas grew into GuestCom, a multi-tenant service for hosts with several properties. But this simple bot came first.
- March 2026. The first version took one week from idea to launch. I built it quickly and deployed it directly to the server, without Git, so it started working right away.
- July 22. The code made it into Git. By then, I had learned how to use it.
- July 23. Security deposits through SafeZalog: a client for the partner API, a “Make a deposit” button in the Telegram and MAX bots, a check-in-day reminder, and a “Return to the bot” refund page.
- July 30–31. The /payback command and a security-deposit refund notification.
- August 12. Booking cancellations from RealtyCalendar and TTLock smart-lock codes.
- September 19–20. The poller learned to restore a booking that RealtyCalendar moved back from “Canceled.”
- October 21–24. Lock log: openings, wrong codes, and battery status.
There was no big release day. The bot grew from real pain: whatever got in the way for me and my guests that day was what we built.
How I work with AI agents
I do not write code. My job is to explain what hurts and check whether it got better. The details are in my article about SUZ (our order management system). This is the same process on a smaller scale: a note → a GitHub task → Claude Code investigates, Codex writes, a second AI agent reviews → deployment.
Before writing code for SafeZalog, I prepared documents: an integration design, technical specifications for a related service, and an implementation plan. They are all in the repository.
What went wrong
Four months without Git. I deployed the first version directly to the server. The bot worked, but changes had no history and no rollback: if something broke, there was nowhere to go back to. The code made it into Git only in July. Lesson: Git first, then the server. Now, nothing reaches my server unless it is in Git.
Messenger blocks. Automated WhatsApp messages, then Telegram messages—I hit a platform block both times. Lesson: do not base check-in on broadcasts through third-party channels. You need a bot that you control yourself.
A link that gets blocked. The bot has a short link on its own domain. It turned out that it would not open on mobile connections with a whitelist. A guest taps the bot link, and nothing happens. We added the /max command: it gives a direct link to the bot in MAX without going through the short domain. Lesson: a guest link has to open for the guest, not for me. More often, what lets a guest down is not the bot but the lack of mobile internet—even though the bot works in both Telegram and MAX.
A booking disappeared from the calendar. RealtyCalendar itself moved one booking to “Canceled,” then returned it to “Booking” a day later. The bot handled the cancellation but did not know about the return: the booking stayed hidden and did not appear in the calendar. We reviewed the error separately, added a “canceled → active again” transition, and wrote a test. Lesson: an external system has more states than its documentation makes it seem. Look at real emails and records.
An SBP payment is not a penalty. When I was adding the security deposit, the bot mistook a payment through SBP (Russia’s Faster Payments System) for a penalty against the deposit. We fixed it: that operation is a direct charge, not a hold. Lesson: check payment-system event names against real payments instead of guessing.
Notification noise. At first, the lock log sent notifications to every admin. They got in everyone else’s way. Now they go only to the owner. Lesson: a notification that does not concern anyone is noise.
Numbers
- 44 commits and 4 accepted pull requests.
- ≈ 7,900 lines of code in Python and HTML.
- 47 pytest test functions.
- 5 platforms whose emails the bot understands.
- 3 services on the server, running as systemd units.
- 1 week from idea to launch in March 2026.
- 180 check-ins through the bot from March to October 2026, with no canceled bookings.
I describe subscription and server costs in my article about SUZ.
Could this work for you?

If you rent out apartments short term, tried to build a bot yourself, and got stuck—on the lock, a calendar integration, blocks, or AI breaking what already works—message me. I will explain how we could build something like this for you.