Guide

How to set up an AI assistant in Telegram: a 6-step guide

Step-by-step plan: from bot creation to production launch. With prompt examples, typical mistakes, and a pre-launch checklist.

10 min readPublished May 13, 2026Updated May 13, 2026
TL;DR

To launch an AI assistant in Telegram: 1) Create a bot via @BotFather, 2) Set up a webhook to your server, 3) Build a knowledge base (pricing, schedule, FAQ), 4) Write a prompt for the LLM (Claude/GPT) — structured for your business, 5) Connect CRM via API, 6) Test 5-7 days. A from-scratch build takes 5-15 days of engineer work. Done via MTDK ai — 7 days.

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.

T

Author

Taras (MTDK ai)

Founder, AI automation engineer

Frequently asked

Frequently asked about Telegram AI

Questions businesses have when wanting to launch an AI bot.

Technically — yes, via no-code platforms like Make or Zapier. But quality will be lower: integration limits, hard to test, hard to debug. With a developer or a ready solution (MTDK ai) — faster and more reliable.
No, if you follow the rules: no spam, no 'grey' mass-broadcast techniques. The official Telegram Bot API fully allows AI functionality.
Depends on volume and model. Claude Sonnet 4: ~$3 per 1M input + $15 per 1M output tokens. For a business with 100 dialogs/day — about $30-80/month.
Plug in the Whisper API (OpenAI) for voice → text transcription, then AI replies with text. Or voice, if you set up TTS. For most businesses text reply is enough.
5-15 days of engineer work for a basic bot. 30-60 days for a full version with all integrations. With MTDK ai — 7 days, because we have a template that just gets tuned.
Contact

You Don't Have to Decide Anything Right Now

Just 20 minutes of conversation — and you'll know exactly: how many clients you're losing, what can be automated, how much it costs. Maybe it's too early for you — and we'll honestly say so.

Don't want to deal
with the tech?

We'll do it turnkey in 7 days. Telegram + Instagram + CRM, testing and launch. Free 30-minute consultation.