n8n Telegram AI Chatbot: Route to Claude, GPT, Gemini & OpenRouter
n8n Telegram AI Chatbot: Route to Claude, GPT, Gemini & OpenRouter
Regular price
£23.99
Regular price
£23.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Telegram AI Chatbot: Route to Claude, GPT, Gemini & OpenRouter
Regular price
£23.99
Regular price
£23.99
Sale price
Unit price
/
per
Send Telegram messages to Claude, GPT, Gemini, or OpenRouter—automatically routed through n8n
This n8n workflow turns your Telegram bot into a multi-provider AI chat assistant. Users message your bot in Telegram, and the workflow routes each request to Anthropic Claude, OpenAI GPT, Google Gemini, or OpenRouter, then replies back in the same chat—while saving per-user conversation history and settings.
What this workflow does
- Listens for Telegram updates via messages and inline-keyboard callback queries.
- Extracts chat/user context (chat ID, user info, message text) and detects whether the input is a command or regular chat text.
- Handles commands to provide help, settings, or status; updates user preferences like provider/model, temperature, and system prompt.
- Manages chat history with options such as starting a new chat, viewing history, exporting it, or clearing it.
- Builds prompts with context by combining the user’s system prompt with recent conversation history (history is capped at 20 entries).
- Routes the request to the selected AI provider endpoint; returns an error message if the provider is unknown.
- Posts the normalized AI reply back to Telegram and appends the user/assistant messages into per-user static data.
Use cases
- Operate a single Telegram “AI concierge” that can switch between Claude, GPT, Gemini, and OpenRouter per user.
- Provide SaaS support-style Q&A in Telegram while keeping separate chat history for each user.
- Let users tune settings (provider, model, temperature, system prompt) without touching n8n.
Technical details
- Triggers/Nodes: Telegram Trigger, set, code, switch, http request, plus sticky note.
- Integrations: Telegram for chat + callback handling; AI calls via HTTP Requests to Anthropic, OpenAI, Google Gemini, and OpenRouter provider endpoints.
- State: per-user conversation history and settings stored in n8n static data.
Setup note: Create a Telegram bot with BotFather, connect Telegram credentials in n8n, and add provider API credentials for the models you plan to use.
