Turn a GitHub knowledge base into a Telegram RAG bot with Qwen via OpenRouter
Ready for 3.0What 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.
- Validate Input (If): checks a condition and branches into true / false
- Fetch GitHub File (GitHub): get (file)
- Send Telegram Error (Telegram): uses Telegram
- Initialize Variables (Code): runs custom JavaScript code
- Handle GitHub Error (Code): runs custom JavaScript code
- Perform Rough Match (Code): runs custom JavaScript code
- Send GitHub Error (Telegram): uses Telegram
- Request AI Assistance (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Qwen Model
- Format AI Output (Code): runs custom JavaScript code
- 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
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)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Code
n8n-nodes-base.code - GitHub
n8n-nodes-base.github - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
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…