Keyboards & Buttons
Make your bot interactive with reply keyboards and inline buttons.
Types of Keyboards
Telegram supports two types of interactive keyboards:
Reply Keyboard
Buttons that replace the user's actual keyboard:
┌─────────────────────────────┐
│ 📊 Status │ ⚙️ Settings │
├─────────────┴───────────────┤
│ ❓ Help │
└─────────────────────────────┘
- User taps a button → sends that button's text as a message
- Great for menus and quick responses
Inline Keyboard
Buttons attached to a message:
Choose your plan:
[🌟 Basic - $9/mo] [💎 Pro - $19/mo]
[🚀 Enterprise - Contact Us]
- User taps → triggers a callback (doesn't send a message)
- Great for selections and actions
Creating Keyboards
Using the Keyboard Builder
- Add a Reply Markup node (or configure buttons in an action node)
- Click the keyboard builder icon
- Design your keyboard visually:
- Add rows and buttons
- Set button text
- Configure actions (for inline buttons)
Button Layout
Buttons are arranged in rows:
Row 1: [Button A] [Button B] [Button C]
Row 2: [Button D] [Button E]
Row 3: [Wide Button Spanning Full Width]
Reply Keyboard Options
| Option | What It Does |
|---|---|
| Resize | Make the keyboard smaller on screen |
| One Time | Hide after one button is pressed |
| Placeholder | Show hint text in input field |
Example: Main Menu
┌──────────────────────────────┐
│ 📊 My Stats │ 👤 Profile │
├──────────────┬───────────────┤
│ ⚙️ Settings │ ❓ Help │
└──────────────┴───────────────┘
When user taps "📊 My Stats", they send 📊 My Stats as a message.
Inline Button Types
Callback Button
Most common type — triggers your flow:
| Setting | Example |
|---|---|
| Text | ✅ Yes |
| Callback Data | confirm_yes |
When pressed:
- User sees the button clicked
- Your bot receives the callback data
- You can trigger a flow based on that data
URL Button
Opens a link:
| Setting | Example |
|---|---|
| Text | 🌐 Visit Website |
| URL | https://example.com |
Handling Button Clicks
For Reply Keyboards
User sends the button text as a message → use a Message Trigger or Switch node:
For Inline Buttons
Use a Callback Trigger or Message Trigger with callback filter:
Dynamic Keyboards
Create keyboards based on data:
Example: Product List
Each product becomes a button!
Removing Keyboards
To remove a reply keyboard:
Use the Reply Markup node with type: remove_keyboard
This clears the keyboard from the user's screen.
Common Patterns
Confirmation Dialog
Menu Navigation
Pagination
Page 1 of 5
[⬅️ Prev] [1] [2] [3] [➡️ Next]
Best Practices
Don't overwhelm users — 4-6 buttons max per keyboard.
Button text should be obvious:
- ✅ "📧 Contact Support"
- ❌ "CS"
Emojis make buttons easier to scan and more engaging.
Always have a way to go back or cancel.
Advanced: Quick Syntax
For simple keyboards, you can use text shortcuts:
Reply Keyboard:
Option A, Option B; Cancel
(Semicolons create new rows)
Inline Keyboard:
✅ Yes|yes, ❌ No|no; 📞 Call|url:tel:+1234567890
(Pipe separates text|data)
Next Steps
- Expressions → — Dynamic button content
- Tutorials → — See keyboards in action