# n8n Telegram Bot Builder

> Design conversational Telegram bots in n8n with AI replies, session state, confirm/reject buttons that cannot double-fire, and automatic cleanup.

n8n Telegram Bot Builder is a free AI agent skill on Agensi by AMIN REDA, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [AMIN REDA](https://www.agensi.io/creators/amin-reda)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-19
- Security: scan passed (2026-11-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/n8n-telegram-bot-builder
- Tags: automation, n8n, telegram

## About this skill

Design Telegram bots in n8n that hold real conversations and survive real users.

1. **Bot setup.** Create the bot with BotFather, store the token in n8n credentials, and use the Telegram Trigger node for `message` and `callback_query` updates.
2. **Route update types.** Add a Switch node: text message, button callback, command (`/start`, `/help`, `/cancel`), photo or other media. Unsupported types get a friendly reply.
3. **Session state.** Keep one record per `chat_id` in a Sheet, data table or Redis with fields such as `step`, `collected_data` (JSON), `last_activity`.
   - Load the session at the start of each update; create it on `/start`.
   - Save after every step.
   - `/cancel` clears it.
4. **Conversational AI step.** Pass the new message plus the saved `collected_data` to an AI Agent that returns JSON: extracted fields, `missing_fields`, and a `reply_text`. If fields are missing, send one clear clarifying question, not a list of ten.
5. **Confirm before acting.** Show a summary with Confirm / Edit / Cancel inline buttons. Only perform the real action after Confirm.
6. **Buttons without duplicates.** Put an action and record id in `callback_data`. On click:
   - Answer the callback query right away to stop the spinner.
   - Check the record's current status; if already decided, reply "already handled" and stop.
   - Otherwise update status first, then perform the action, then edit the original message to remove the buttons.
7. **Timeout cleanup.** Add a Schedule Trigger (for example hourly) that finds sessions whose `last_activity` is older than the limit, resets them, and optionally sends a short "session closed" message.
8. **Error handling.** Wrap external calls with retries; on failure tell the user plainly and alert the owner via an Error Trigger workflow.

## Requires

- n8n
- A Telegram bot token (BotFather)
- An LLM API key

## Known limitations

Designs the bot flow and prompts; it does not create the bot or deploy the workflow for you.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the n8n Telegram Bot Builder skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does n8n Telegram Bot Builder do?

Design conversational Telegram bots in n8n with AI replies, session state, confirm/reject buttons that cannot double-fire, and automatic cleanup.

### Which AI agents support n8n Telegram Bot Builder?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use n8n Telegram Bot Builder?

Connect your AI agent to Agensi through MCP, then ask it to use n8n Telegram Bot Builder on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
