Step 1. Telegram bot creation
Open Telegram, find @BotFather. Command /newbot — it'll ask for a name (for display) and a username (English, ending with 'bot' or 'Bot'). After creation, BotFather gives an API token — that's the key to your bot, keep it like a password.
Setup via /setdescription, /setabouttext, /setuserpic. Description is what clients see when opening. Avatar — your brand logo. Commands (/setcommands) — a list of quick commands shown in the menu. Minimum: /start, /help, /book, /price.
Important detail: for a business bot, definitely enable groups (if you'll add it to a Telegram channel) and inline mode (if you'll show it in search or menu). Otherwise you'll redo this later.
Step 2. Infrastructure setup
The bot has to live somewhere. Simplest — on a VPS (DigitalOcean, Hetzner Cloud, from $5/mo) with n8n. n8n is an open-source automation platform with a ready Telegram node that works out of the box.
Alternative — serverless: AWS Lambda, Cloudflare Workers. Cheaper at low load (under $1/mo) but trickier to build and not great for long dialogs.
Webhook vs Polling. Webhook — Telegram POSTs to you on every message (fast, efficient, needs a public HTTPS URL). Polling — you keep asking Telegram '/getUpdates' (simpler but slower and less efficient). For production — webhook only.
How to set up webhook: POST to https://api.telegram.org/bot<TOKEN>/setWebhook with url=https://your-server.com/telegram. Done — Telegram now sends you every message.
Step 3. Knowledge base for AI
The most important and hardest step. AI only answers what it knows. If the knowledge base is shallow — replies will be shallow.
Include: 1) Full pricing with ranges and conditions (discounts for new, for regulars). 2) Working hours with exceptions (holidays, vacations). 3) Address with Google Maps link and 'how to get there.' 4) Team with roles. 5) FAQ — minimum 30 typical questions with ideal answers.
Format: better JSON or structured Markdown, not plain text. AI works better with structured data. Example:
{ "prices": { "manicure": { "min": 350, "max": 750, "duration": "60 min" } } }
Include 'tone rules' — how AI should speak. Formal vs casual, use of emojis, how it introduces itself. Without this AI will be purely formal — and clients feel the difference.
Step 4. Prompt — the heart of the AI assistant
The prompt is instructions for the LLM (Claude or GPT) that turn the neural net into an assistant for your specific business.
Good prompt structure: 1) Who you are and who you work for ('You are an AI assistant for X salon in Kyiv'). 2) What you can do ('book appointments, answer questions about services and prices'). 3) What you do NOT ('don't give medical advice, don't discuss politics, don't take payments directly'). 4) How you talk (tone, form of address). 5) Knowledge base (inline or via retrieval). 6) Escalation instructions ('if the request is complex — say: I'll pass to a manager').
Minimal working prompt example (shortened to 4-5 lines, real one is 50-100 lines):
You are Maria, an AI assistant for 'Pure Beauty' salon in Kyiv. Be warm, no emojis. You can: book manicure/pedicure/brows, give prices, send appointment reminders. You can NOT: give medical advice, discuss therapeutic procedures. If a client wants to 'discuss with the master' — say 'I'll pass to her now.' Knowledge base: ...
Test the prompt iteratively. Run 30-50 dialogs yourself with different scenarios (naive client, skeptic, complainer, VIP). Collect mistakes, add rules.
Step 5. Connecting CRM and actions
AI shouldn't just answer — it should do things: create a CRM record, update status, send reminders. That's 'tool calling' — when the LLM generates a structured request to execute an action, not just text.
In n8n it's done via an 'AI Agent' node with connected 'Tools.' Each tool is a function: create_booking, get_available_slots, send_reminder. AI decides which tool to use when.
Example: client writes 'I want to book for tomorrow.' AI calls get_available_slots(date='tomorrow'), sees '14:00, 16:00, 18:00,' offers them. Client picks 16:00 — AI calls create_booking(slot='tomorrow 16:00', client='Ivanna, +380...').
Set up hand-off. In 90% of cases AI will handle it. But 10% are complex requests requiring a human. Configure escalation conditions: keywords ('complaint,' 'refund'), low AI confidence, explicit 'I want a manager.' In these cases the bot says: 'passing to a manager, they'll reply shortly' and forwards the transcript to the team's Telegram chat.
Step 6. Testing and launch
Testing in 3 stages. Internal: 50-100 dialogs with the team. Test ALL scenarios — even silly ones ('Are you alive?', 'Are you a robot?', 'Tell a joke'). AI should behave correctly even in silly cases.
Beta: 10-20 friendly clients get access. Ask for feedback — what was awkward, where the AI reacted strangely. This stage often catches 30% of mistakes not seen internally.
Launch: announce on social, add bot link to Instagram profile, Telegram channel bio, website. First 2 weeks monitor every dialog — log cases that need refinement.
Pre-launch checklist: AI answers 'Hi', '/start', 'How much?'. AI correctly escalates complex requests. AI can offer slots and book. Reminders configured. Webhook stable (uptime monitor). Knowledge base complete. Team knows the bot is now 'official.'
5 typical launch mistakes
Mistake 1. Launching without tests. First live client = first negative review. Test minimum 100 dialogs before launching.
Mistake 2. Prompt with no constraints. AI must know what it CANNOT do. Without that, it can 'fantasize' — give medical advice, promise discounts that don't exist.
Mistake 3. No escalation. If AI doesn't know what to do with a complaint — the client goes to a competitor. Always set up a human hand-off.
Mistake 4. Not updating the knowledge base. Price changed — AI quotes the old price. Client comes in, gets upset. Make a routine: weekly review and update.
Mistake 5. Thinking 'AI = magic.' AI is a tool. It works only when configured for your business with process understanding. If your process is chaotic — AI won't save you, it'll highlight the chaos.