Build a retrieval-based chatbot with Telegram, OpenAI and Google Drive PDF backup
Ready for 3.0What this workflow does
This AI workflow has 13 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects Embeddings OpenAI, OpenAI Chat Model, Telegram and Google Drive.
How it runs
Trigger: On Telegram events (message) (plus 1 other trigger).
- Is text message? (If): checks a condition and branches into true / false
- Insert Data to Store (Simple Vector Store): stores documents in the Simple vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
- Code: runs custom JavaScript code
- Telegram document query agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Query Data Tool)
- Un-supported message type (Telegram): uses Telegram
- Backup document(s) to Google Drive (Google Drive): uses Google Drive
- Send respond to user (Telegram): uses Telegram
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 (11)
- Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Telegram Trigger
n8n-nodes-base.telegramTrigger - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - n8n Form Trigger
n8n-nodes-base.formTrigger - Google Drive
n8n-nodes-base.googleDrive
From the author
📚 Telegram RAG Chatbot with PDF Document & Google Drive Backup - An upgraded Retrieval-Augmented Generation (RAG) chatbot built in n8n that lets users ask questions via Telegram and receive accurate answers from uploaded PDFs. It embeds documents using…