Templates / Build a retrieval-based chatbot with Telegram, OpenAI and Google Drive PDF backup

Build a retrieval-based chatbot with Telegram, OpenAI and Google Drive PDF backup

Ready for 3.0

by Trung Tran ✓ · 1,984 views · created 2025-08-05 · 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 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).

  1. Is text message? (If): checks a condition and branches into true / false
  2. Insert Data to Store (Simple Vector Store): stores documents in the Simple vector store, with embeddings: Embeddings OpenAI; document loader: Default Data Loader
  3. Code: runs custom JavaScript code
  4. Telegram document query agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Query Data Tool)
  5. Un-supported message type (Telegram): uses Telegram
  6. Backup document(s) to Google Drive (Google Drive): uses Google Drive
  7. Send respond to user (Telegram): uses Telegram

Services it uses

Embeddings OpenAIOpenAI Chat ModelTelegramGoogle Drive

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)

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…

Excerpt from Trung Tran'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.