• Reading time ~ 2 min
  • 29.05.2025

The development of support via Telegram often ends with the fact that each manager corresponds with the client in a private message, and the history of communication is lost somewhere between GIFs and links. It doesn't scale and looks like a workaround.

I faced this problem myself and decided to make my own Telegram bot on Laravel, which solves several problems at once:

  • structures communication,
  • hides managers' personal accounts,
  • makes it possible to work with appeals in one Telegram group,
  • uses topics (topics) for dialogues with each client.

Where to view and ask questions

All code is open, asterisk support is 😉 welcome:

🔗 https://github.com/prog-time/tg-support-bot

If you have any questions during installation, write to Telegram:

📬 https://t.me/prog_time_bot

How it works

The user writes to the bot. If this is a new request, a separate topic is created in the Telegram group, where the bot sends the client's first message and basic information about him replies to the user on their own behalf.

Thanks to this:

  • the team has a common history of correspondence;
  • managers do not disclose their personal accounts;
  • You can connect multiple operators without losing context.
  • The client feels that they are working with him "like in support", and not in person.

Implementation

features The bot is written in Laravel 12 and uses a standard stack.

Files, photos and messages are not saved - everything is sent to Telegram directly. This simplifies privacy and eliminates the hassle of storing personal data.

Who is this solution

for? The project is suitable for small teams, freelancers, technical support for online services, Telegram-first products, online schools, consulting projects, and anyone who receives requests via Telegram and wants to organize support quickly and easily.

Installation

  1. Клонируем репозиторий:
git clone https://github.com/prog-time/tg-support-bot.git
  1. Create a bot through BotFather.

  2. Create a private Telegram group with topics enabled, add a bot there as an administrator.

  3. Get the group ID (for example, using getmyid_bot).

  4. Set up .env:

APP_URL=https://your-domain.com
TELEGRAM_TOKEN=your_bot_token
TELEGRAM_GROUP_ID=your_group_id
TELEGRAM_SECRET_KEY=ваш_уникальный_ключ
  1. Устанавливаем webhook: Переходим в браузере по адресу: https://your-domain.com/api/telegram/set_webhook

Done. Now you can write to the bot, and it will route requests to the appropriate topics in the group.

If the project was useful to you, I will be glad to receive feedback and ideas for improvement.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297

We shoot down "Shahed" drones every day. Each one downed means lives saved. But we need mobility: a van or a trailer. Every donation = another night under protection.

🚐 Van fundraiser for my unit, 1020 regiment 🎯 Goal: 500,000 ₴
🔗 Donation link 💳 4441 1111 2546 4663