Who is this workflow for? This workflow enables seamless interaction with your documents stored in Supabase through an AI-driven chatbot. By automating the processing, vectorization, and querying of text and PDF files, it allows for efficient retrieval of contextual information using natural language conversations..

What does this workflow do?

  • Fetch File List from Supabase:
  • Retrieve the list of stored files from a designated Supabase bucket.
  • Implement logic to handle empty folder placeholders, ensuring only relevant files are processed.
  • Compare and Filter Files:
  • Aggregate retrieved files and compare them with entries in the Supabase files table.
  • Exclude duplicate and placeholder files to process only new, unhandled documents.
  • Handle File Downloads:
  • Download new files using appropriate storage configurations for public or private access.
  • Adjust storage settings and GET requests to align with your Supabase setup.
  • File Type Processing:
  • Utilize a Switch node to identify specific file types (e.g., PDFs or text files).
  • For PDFs, extract embedded content; for text files, process the text directly.
  • Content Chunking:
  • Divide large text data into smaller, manageable chunks using the Text Splitter node.
  • Define chunk size (default: 500 tokens) and overlap to maintain necessary context.
  • Vector Embedding Creation:
  • Generate vectorized embeddings for the processed content using OpenAI’s embedding tools.
  • Include metadata, such as file ID, to facilitate easy data retrieval.
  • Store Vectorized Data:
  • Save the vectorized information into a dedicated Supabase vector store.
  • Utilize the default schema and table provided by Supabase for seamless integration.
  • AI Chatbot Integration:
  • Incorporate a chatbot node to handle user inputs and retrieve relevant document chunks.
  • Leverage metadata like file ID for targeted queries, especially when multiple documents are involved.

🤖 Why Use This Automation Workflow?

  • Efficiency: Automates the time-consuming process of manually searching through large document repositories.
  • Scalability: Handles extensive collections of files without the need for additional storage services.
  • Enhanced Retrieval: Utilizes AI to provide accurate, context-based responses to user queries.

👨‍💻 Who is This Workflow For?

This workflow is ideal for researchers, analysts, business owners, educators, and anyone managing a significant collection of documents. It is particularly beneficial for individuals who require quick access to specific information within text-heavy files stored in Supabase.

🎯 Use Cases

  1. Academic Research: Quickly locate and reference specific sections within extensive academic papers and studies.
  2. Business Analysis: Extract key insights and data points from large sets of internal reports and documents.
  3. Educational Support: Enable students and educators to interact with course materials for efficient study and teaching.

TL;DR

This workflow integrates Supabase with an AI-powered chatbot to efficiently process, store, and query your text and PDF files. By automating file handling, vectorization, and conversational querying, it provides a robust solution for quick and contextually relevant information retrieval from your document repository.

Help us find the best n8n templates

About

A curated directory of the best n8n templates for workflow automations.