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:
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
- Клонируем репозиторий:
git clone https://github.com/prog-time/tg-support-bot.git
Create a bot through BotFather.
Create a private Telegram group with topics enabled, add a bot there as an administrator.
Get the group ID (for example, using getmyid_bot).
Set up .env:
APP_URL=https://your-domain.com
TELEGRAM_TOKEN=your_bot_token
TELEGRAM_GROUP_ID=your_group_id
TELEGRAM_SECRET_KEY=ваш_уникальный_ключ
- Устанавливаем 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.