Templates / Turn a GitHub knowledge base into a Telegram RAG bot with Qwen via OpenRouter

Turn a GitHub knowledge base into a Telegram RAG bot with Qwen via OpenRouter

Ready for 3.0

by Do Thanh Vinh ✓ · 122 views · created 2026-05-09 · Internal Wiki, AI RAG

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-10-19.

What this workflow does

This AI workflow has 14 nodes and runs on Telegram events. Along the way it connects Telegram, GitHub and OpenAI Chat Model.

How it runs

Trigger: On Telegram events.

  1. Validate Input (If): checks a condition and branches into true / false
  2. Fetch GitHub File (GitHub): get (file)
  3. Send Telegram Error (Telegram): uses Telegram
  4. Initialize Variables (Code): runs custom JavaScript code
  5. Handle GitHub Error (Code): runs custom JavaScript code
  6. Perform Rough Match (Code): runs custom JavaScript code
  7. Send GitHub Error (Telegram): uses Telegram
  8. Request AI Assistance (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Qwen Model
  9. Format AI Output (Code): runs custom JavaScript code
  10. Check AI Output (If): checks a condition and branches into true / false

…plus 2 more steps. See the full node list below.

Services it uses

TelegramGitHubOpenAI Chat Model

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.

Nodes used (7)

From the author

WHAT IT DOES This workflow turns a plain JSON file sitting in a GitHub repository into a fully functional Telegram chatbot with retrieval-augmented generation (RAG) — no Pinecone, no Qdrant, no vector database, no extra subscription. A user sends /ask…

Excerpt from Do Thanh Vinh'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.