Interactive knowledge base chat with Supabase RAG using AI ππ¬
Google Drive File Ingestion to Supabase for Knowledge Base ππΎ Overview π This n8n workflow automates the process of ingesting files from Google Drive into a Supabase database, preparing them for a knowledge base sy...
Template notes
Google Drive File Ingestion to Supabase for Knowledge Base ππΎ
Overview π
This n8n workflow automates the process of ingesting files from Google Drive into a Supabase database, preparing them for a knowledge base system. It supports text-based files (PDF, DOCX, TXT, etc.) and tabular data (XLSX, CSV, Google Sheets), extracting content, generating embeddings, and storing data in structured tables. This is a foundational workflow for building a company knowledge base that can be queried via a chat interface (e.g., using a RAG workflow). π
Problem Solved π― Manually managing a knowledge base with files from Google Drive is time-consuming and error-prone. This workflow solves that by: - Automatically ingesting files from Google Drive as they are created or updated. - Extracting content from various file types (text and tabular). - Generating embeddings for text-based files to enable vector search. - Storing data in Supabase for efficient retrieval. - Handling duplicates and errors to ensure data consistency.
Target Audience: - Knowledge Managers: Build a centralized knowledge base from company files. - Data Teams: Automate the ingestion of spreadsheets and documents. - Developers: Integrate with other workflows (e.g., RAG for querying the knowledge base).
Workflow Description π
This workflow listens for new or updated files in Google Drive, processes them based on their type, and stores the extracted data in Supabase tables for later retrieval. Hereβs how it works:
1. File Detection: Triggers when a file is created or updated in Google Drive. 2. File Processing: Loops through each file, extracts metadata, and validates the file type. 3. Duplicate Check: Ensures the file hasnβt been processed before. 4. Content Extraction: - Text-based Files: Downloads the file, extracts text, splits it into chunks, generates embeddings, and stores the chunks in Supabase. - Tabular Files: Extracts data from spreadsheets and stores it as rows in Supabase. 5. Metadata Storage: Stores file metadata and basic info in Supabase tables. 6. Error Handling: Logs errors for unsupported formats or duplicates.