Templates / Telegram bot inline keyboard with dynamic menus & rating system

Telegram bot inline keyboard with dynamic menus & rating system

Needs changes

by Ruslan Elishev βœ“ Β· 4,669 views Β· created 2025-08-20 Β· Support Chatbot, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
Function (legacy)
Prepare Magic Response
Code node, mode 'Run Once for All Items'

Nodes used (5)

Telegram

What it does

πŸ€– Telegram Bot with Dynamic Menus & Rating System What It Does This n8n workflow creates an interactive Telegram bot with: - Dynamic inline keyboards that respond to user clicks - 5-star rating system for collecting feedback - Personalized responses using the user's actual name - Multi-level menu navigation (Main β†’ Settings β†’ Profile, etc.) - Real-time message updates when buttons are clicked How It Works 1. Receives messages via Telegram webhook trigger node 2. Extracts user data (name, ID, message type) 3. Builds dynamic menus based on user actions 4. Sends/updates messages with inline keyboards 5. Handles button clicks without page refresh πŸš€ Setup Instructions 1. Get Your Bot Credentials 2. Configure Workflow - Open "Set Bot Token" node - Replace token with yours - Save and activate workflow (Active) 3. Test Your Bot - Message your bot on Telegram - Click the buttons to navigate menus - Try the rating system on Feature 1 🎨 Customization Guide Add New Menu Items In the "Prepare Response" Function node, add new cases: case 'yourfeature': responseText = 'Your feature description'; keyboard = { text: '🎯 Button 1', callbackdata: 'action1' }, { text: 'πŸ”™ Back', callbackdata: 'main' } ; break; Modify Rating Options Change star buttons to numbers or emojis: // Current: ⭐⭐⭐ // Alternative: 1️⃣ 2️⃣ 3️⃣ or πŸ‘Ž πŸ‘ Change Bot Responses - Edit responseText for message content - Modify keyboard arrays for button layout - Add HTML formatting: <bbold</b, <iitalic</i πŸ’‘ ++Key Features Demonstrated++ - HTTP Request workaround for dynamic keyboards (n8n Telegram node limitation) - Callback query handling to prevent loading animations - Message editing vs sending new messages - User data extraction from Telegram API - Switch-case menu routing for scalable navigation ⚠️ ++Important Notes++ - Limitation: n8n's native Telegram node doesn't support dynamic inline keyboards, this is why need to use HTTP nodes. - Solution demonstrated: Use HTTP Request node with Telegram Bot API directly

View the original on n8n.io β†’ Check your own copy

Get the weekly β€œwhat broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.