RAG Agent: PDF Q&A with Supabase and OpenAI
detail.loadingPreview
This workflow creates a RAG (Retrieval-Augmented Generation) agent that answers questions based on a PDF document stored in Google Drive, utilizing Supabase for vector storage and OpenAI for embeddings and language generation.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This n8n workflow implements a Retrieval-Augmented Generation (RAG) system, enabling an AI agent to answer questions based on specific document content. It starts by downloading a PDF from Google Drive using the 'Download file' node. The document content is then processed and embedded using the 'Embeddings OpenAI' node, and this information is stored in a Supabase vector database via the 'Supabase Vector Store' node. The 'AI Agent' node orchestrates the RAG process, using the 'OpenAI' node for language generation, 'Postgres' for chat memory, and the 'Supabase' vector store to retrieve relevant information. This setup allows for a knowledge base to be queried using natural language.
Key Features
- Downloads PDF documents from Google Drive.
- Leverages Supabase for efficient vector storage and retrieval.
- Uses OpenAI for generating embeddings and natural language responses.
- Implements chat memory using a Postgres database.
- Creates a conversational AI agent capable of answering questions based on provided documents.
How To Use
- Connect Google Drive: Authorize the 'Download file' node with your Google Drive credentials and specify the file ID of the PDF you want to use.
- Connect Supabase: Configure the 'Supabase Vector Store' and 'Supabase' nodes with your Supabase project details, including the API key and URL.
- Connect OpenAI: Provide your OpenAI API key to the 'Embeddings OpenAI' and 'OpenAI' nodes.
- Configure Postgres: Set up the 'Postgres' node with your PostgreSQL connection details for chat memory.
- Set up AI Agent: Connect the 'AI Agent' node to the 'OpenAI' language model, 'Postgres' memory, and the 'Supabase' tool.
- Execute Workflow: Trigger the workflow manually or via the 'Chat' webhook to start interacting with the AI agent.
Apps Used
Workflow JSON
{
"id": "f30c0128-12c9-4978-a1c8-3adc598e6f67",
"name": "RAG Agent: PDF Q&A with Supabase and OpenAI",
"nodes": 0,
"category": "AI Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: f30c0128-12c9...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
RAG Agent with Memory and Supabase Vector Store
This workflow enables a Retrieval Augmented Generation (RAG) agent to converse with memory, powered by OpenAI's chat model and leveraging Supabase for vector storage. It allows the agent to recall past interactions and access information from a vector database.
Automated RAG Evaluation and Email Response Generation
This workflow automates the evaluation of AI-generated responses against ground truth data and sends automated email responses. It leverages Langchain's RAG capabilities with Supabase for data retrieval and OpenAI for embeddings, then uses Gmail for sending emails.
AI Earnings Report Analysis with Vector Databases
This n8n workflow empowers an AI agent to analyze earnings reports using Pinecone and Supabase vector databases. It leverages chat triggers and HTTP requests to query and process financial data, providing detailed insights with citations.
Automate Live Stream Chat Moderation with AI and n8n
This n8n workflow uses AI to moderate live stream chats by splitting messages, generating embeddings, querying a vector store, and responding via an agent. It logs the interactions to Google Sheets for review.
Master n8n Hacks: Streamline Your Automation with AI
Explore a collection of n8n hacks, demonstrating how to integrate AI nodes like OpenAI and Perplexity for advanced automation. This workflow showcases practical examples of API requests, data manipulation, and dynamic content generation.
AI-Powered Image Combination with n8n and Nanobanana
This workflow combines two images into a new AI-generated image using the Nanobanana API. It fetches images from Google Drive, uploads them for processing, and saves the result back to Google Drive, offering an automated image creation solution.