Telegram Bot Inline Keyboard with Dynamic Menus & Rating System
π€ 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
Receives messages via Telegram webhook trigger node Extracts user data (name, ID, message type) Builds dynamic menus based on user actions Sends/updates messages with inline keyboards Handles button clicks without page refresh
π Setup Instructions
Get Your Bot Credentials Configure Workflow Open "Set Bot Token" node Replace token with yours Save and activate workflow (Active)
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 'your_feature': responseText = 'Your feature description'; keyboard = [ [{ text: 'π― Button 1', callback_data: 'action1' }], [{ text: 'π Back', callback_data: '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: bold, italic
π‘ ++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
Related Templates
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Automate Daily Keyword Research with Google Sheets, Suggest API & Custom Search
Who's it for This workflow is perfect for SEO specialists, marketers, bloggers, and content creators who want to automa...
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments