How to create a Telegram chatbot: step by step
A Telegram bot can be live in half an hour and cost nothing — if the job is simple: answer buttons, send a price list, capture a contact. Anything beyond that needs a server and development. Both routes below.
Step 1. Create the bot with @BotFather
- Open @BotFather in Telegram and send
/newbot. - Choose a display name and a username ending in
bot. - You receive a token like
1234567890:AAH.... Whoever holds it controls the bot — never publish it.
The same chat sets the description (/setdescription), avatar (/setuserpic) and command menu (/setcommands).
Step 2. Choose where the logic lives
| Approach | Good for | Cost |
|---|---|---|
| Builder (Manychat, Salebot) | button flows, broadcasts | subscription from €10/month |
| n8n | CRM, spreadsheets, payments | server from €5/month |
| Custom code | non-standard logic, high load | development |
Step 3. Build the flow
- Welcome on
/start: who you are and what the bot can do. - Menu of three to five buttons.
- Contact capture, ideally via the share-contact button.
- Handover: the lead goes to your CRM and pings a manager.
Keep the tree three levels deep at most — deeper and users get lost.
Step 4. Add AI for free-form questions
A button bot only answers what you anticipated. If customers type freely, you need an AI chatbot that answers from your knowledge base and escalates the rest.
FAQ
How long does it take?
A button bot: hours. With CRM and payments: one to two weeks. With AI and a knowledge base: two to three weeks.
Can the bot message users first?
Only those who already started a conversation with it. Cold broadcasts are not possible on Telegram.
What if the token leaks?
Revoke it immediately with /revoke in @BotFather and replace it in your settings.
Prefer it done for you? We build Telegram bots end to end. Tell us the task.
Read next
How to choose an automation contractor
Seven questions to ask before signing, three signs of vendor lock-in, and what a serious proposal actually looks like.
Self-hosted n8n: Docker setup and maintenance
What to prepare before installing, running n8n in Docker with PostgreSQL, HTTPS and webhooks, the encryption key, backups, updates and first-month mistakes.
Accounting system and CRM integration without losing data
What to sync and in which direction, three ways to connect, and the four failures that break exchanges in practice.