Tutorial15 min readOctober 20, 2025
Building a Complete Telegram Bot with N8n
telegrambotn8nautomation
Watch on YouTubeTelegram bots are one of the most popular automation targets with N8n. Let's build a complete bot from scratch.
First, create a bot with @BotFather and get your token. Then set up an N8n webhook to receive updates.
Use a Switch node to route different commands (/start, /help, /status) to their respective handlers.
Add interactive buttons and handle callback queries for a rich user experience.
Receive files from users, process them, and send files back.
Store user data, conversation state, and analytics in PostgreSQL.
Deploy your bot on a VPS with Docker for 24/7 uptime.