İçeriğe geç
YENİPazar yeri ve ekibin: geliştirdiğini sat; planlar ve değişiklikler sen görmeden önce test edilsin. Yeniliklere bak

Kütüphane / RAG ve Bilgi Bankaları

RAG ve Bilgi Bankaları

Sync a Telegram RAG chatbot with Google Drive using OpenAI and Supabase

When something happens in a connected app, it answers questions from your own knowledge base with OpenAI / ChatGPT and OpenRouter using Postgres, Supabase, Google Drive, Telegram.

Ne yapar

# Self-Updating RAG Chatbot # Synced from Google Drive ## Who's it for Teams and solo builders who maintain a living document library in Google Drive and want a chatbot that answers questions from it — without manually re-indexing every time a file changes. Upload a PDF, and the bot knows about it in seconds. Update a file, and the old knowledge is replaced. Delete a file, and it disappears from the bot's memory. Everything happens automatically. ## How it works The workflow has four independent parts that work together: - Part 1 — Chat: Always-on Telegram bot with AI Agent and memory. - Part 2 — Ingest new file: Downloads new PDFs, chunks, embeds, and saves to Supabase. - Part 3 — Update existing file: Wipes old vectors and re-indexes modified files. - Part 4 — Delete a file: Cleans up vectors when files are removed from Drive. ## How to set up 1. Create Supabase Table: Go to your Supabase project's SQL Editor and follow the official guide to set up the vector extension and documents table: Supabase LangChain Guide. 2. OpenAI Credentials: Add your OpenAI API key to n8n (used for embeddings). 3. Google Drive: Add your Google Drive credential and point the three Drive Trigger nodes to your target folder. 4. Supabase Credentials: Add your Supabase credential (URL + service key) to the Supabase nodes. 5. Telegram Bot: Create a bot via @BotFather, add your token as a credential, and set your chat ID. 6. Activate Workflows: Turn on all three sub-workflows (Ingest, Update, Delete) first, then activate the Chat workflow. 7. Test: Drop a PDF into your Google Drive folder and start chatting on Telegram! ## Requirements - OpenAI API key (for embeddings). - Supabase project with pgvector enabled. - Google account with Drive access. - Telegram bot token and chat ID. - OpenRouter (or any supported LLM). ## How to customize - Swap the OpenRouter model for GPT-4o, Claude, or Gemini in the AI Agent node. - Add a custom system prompt to give the bot a unique persona. - Filter Drive triggers by specific file types. --- Categories: AI, RAG, Knowledge Management, Productivity Nodes: 25

Adımlar

  1. Answer from knowledge base
  2. Language Model (OpenRouter)
  3. Search knowledge base
  4. Embed the query
  5. New PDF added to Drive folder
  6. Download the PDF
  7. Extract text from PDF
  8. Index into vector database
  9. PDF updated in Drive folder
  10. Remove outdated vectors
  11. Download updated PDF
  12. Extract text from updated PDF
  13. Tag with file ID and name 01
  14. Tag with file ID and name 02

Toplam 25 adım.

Benzer otomasyonlar