Templates / Answer Telegram customer messages with Ollama, OpenAI, or Anthropic

Answer Telegram customer messages with Ollama, OpenAI, or Anthropic

Ready for 3.0

by Tucker · 29 views · created 2026-09-29 · Support Chatbot, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 9 nodes and runs on Telegram events (message). Along the way it connects Telegram.

How it runs

Trigger: On Telegram events (message).

  1. Set AI Configuration (Edit Fields (Set)): sets 9 fields: ai_provider, ai_model, ollama_url…
  2. Prepare Conversation Data (Code): runs custom JavaScript code
  3. Construct AI Request (Code): runs custom JavaScript code
  4. Post to AI API (HTTP Request): calls an HTTP API (POST)
  5. Parse AI Response (Code): runs custom JavaScript code
  6. Notify of Delayed Response (Telegram): uses Telegram
  7. Reply with AI Answer (Telegram): uses Telegram
  8. Record Conversation Turn (Code): runs custom JavaScript code

Services it uses

Telegram

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (5)

From the author

Quick overview This workflow replies to incoming Telegram bot messages using an Ollama, OpenAI, or Anthropic chat model constrained by your business notes, and falls back to a predefined message when it can’t answer or the AI call fails. How it works 1.…

Excerpt from Tucker's description on n8n.io.

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.