Create Telegram Bot with n8n
Complete guide to create a Telegram bot and connect it with n8n for powerful automation - from zero to hero
Get StartedEasy Setup
Create bot in minutes via BotFather
Powerful Automation
Connect bot with any service via n8n
100% Free
No cost to get started
What is Telegram Bot + n8n?
A Telegram bot is an automated account you can program to respond to messages and perform tasks. n8n is a powerful automation tool that connects your bot with other services like Google Sheets, Notion, databases, and more.
Key Features
Webhooks
Receive messages instantly via webhooks instead of polling
Visual Workflow
Build complex scenarios with easy visual interface
Database Integration
Save data to databases (MySQL, PostgreSQL, MongoDB)
API Connections
Connect with any external API (OpenAI, Notion, Airtable)
Conditional Logic
Advanced conditional logic for smart responses
Notifications
Send automatic notifications when events occur
How to Create the Bot?
1. Create Bot in Telegram
Open @BotFather in Telegram and type /newbot, then follow instructions. You'll get an API Token.
2. Install n8n
Install Docker and run: docker run -it --rm --name n8n -p 5678:5678 n8nio/n8n
3. Create Workflow
Open localhost:5678 and create new workflow. Add Telegram Trigger node.
4. Connect Bot
Put API Token in Telegram node. Set webhook URL.
5. Build Scenario
Add nodes for processing (HTTP Request, Code, Database, etc.)
6. Activate
Click Activate in n8n. Bot is ready to receive!
Important Tips
🔐 Keep API Token secure - never share it
🌐 Use ngrok for local development: ngrok http 5678
📝 Use Telegram inline keyboards for better interaction
🔄 Test each step before moving to next
📊 Save data to Google Sheets or Notion for analysis
Practical Examples
Support System
Receive support requests and save to Notion + send notifications to team
Booking System
Book appointments via bot + save to Google Calendar
Automatic Alerts
Monitor an API and send alert when data changes
Surveys
Collect user feedback and save to database