๐Ÿ“– Document Q&A chatbot with Google Drive, GPT-4-mini & Telegram (RAG system)

โšก 870 views ยท ๐Ÿ“– Internal Wiki & Knowledge Base

Description

Description ๐Ÿ“Œ Overview

This workflow creates a chat-based Retrieval-Augmented Generation (RAG) agent that lets you upload documents to Google Drive and then query them directly through Telegram. It uses embeddings, vector storage, and an AI agent to retrieve, analyze, and answer user questions with context-aware responses.

๐Ÿงฉ Key Features

๐Ÿ“‚ Google Drive Integration

Watches a folder for new file uploads.

Downloads and loads documents automatically into the system.

๐Ÿ”Ž Vector Embeddings & Storage

Uses OpenAI embeddings to transform documents into vectors.

Stores them in an in-memory vector store for retrieval.

๐Ÿค– AI Agent with Memory

Built on LangChain Agent + GPT-4.1-mini.

Performs similarity search in the vector store.

Provides contextual answers with citations from the uploaded documents.

Maintains short-term conversation memory for better continuity.

๐Ÿ’ฌ Telegram Bot Integration

Users can send questions directly to the bot.

AI agent retrieves relevant information and replies with clear answers.

โš™๏ธ How It Works

Trigger: Upload a file into the Google Drive folder.

Processing: Workflow downloads the file โ†’ loads โ†’ embeds โ†’ stores in vector memory.

Query: User sends a question via Telegram.

Retrieval & Response: AI agent searches stored documents โ†’ analyzes results โ†’ returns summarized answer in Telegram.

๐Ÿ” Requirements

Google Drive OAuth credentials.

OpenAI API key (for embeddings + LLM).

Telegram Bot API token.

๐Ÿ“ฅ Use Cases

๐Ÿ“‘ Knowledge base assistant โ€“ Upload internal docs and query them in chat.

๐Ÿซ Learning support โ€“ Students upload study materials and ask questions.

๐Ÿ“Š Business intelligence โ€“ Teams upload reports and get instant summaries.

More templet: https://aitool.wiki/

๐Ÿ”— Nodes Used

Telegram, Telegram Trigger, Google Drive, Google Drive Trigger, AI Agent, Embeddings OpenAI

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup