Deploy a robust RAG knowledge base chatbot using this advanced n8n workflow. Integrates Jotform document uploads, Supabase vector DB, Together AI embeddings, and Google Gemini for precise Q&A.
Download this n8n workflow template and start using it instantly.
Automation developers looking for advanced n8n templates integrating vector databases.
Businesses needing an automated way to turn uploaded documents (via Jotform) into searchable knowledge bases.
Support teams aiming to deploy a highly accurate, context-aware chatbot using Google Gemini and Together AI.
Users looking for a production-ready RAG system implemented using an n8n workflow.
This comprehensive n8n workflow is designed to create, maintain, and interact with a Retrieval-Augmented Generation (RAG) knowledge base. It solves the common problem of grounding Large Language Models (LLMs) in specific, internal documentation, drastically reducing hallucinations. The process is divided into two parts: document ingestion and real-time chat.
By leveraging the JotForm n8n trigger for uploads, Together AI for high-quality embeddings, Supabase for vector storage, and the powerful Google Gemini model via an n8n node, this solution offers a seamless and highly accurate way to answer user queries based solely on your uploaded source material. This specific n8n workflow demonstrates best practices for building scalable AI automation and utilizing powerful n8n templates.
This n8n workflow operates in two distinct logical branches, orchestrated by different n8n triggers:
BAAI/bge-large-en-v1.5 model to generate semantic embeddings.RAG table, completing the knowledge ingestion process of this n8n workflow.chatInput is sent to Together AI to generate a semantic embedding for the query, using the same model.matchembeddings1. This function uses the query embedding to find the top 5 most relevant stored text chunks (RAG context).matchembeddings1 RPC function are correctly configured for vector search.form ID in the "JotForm Trigger" n8n trigger.enter-your-supabase-host and API key placeholders). JotForm Trigger (n8n trigger):
Function: Starts the knowledge ingestion process upon a new file submission.
Key Configuration: Configured to watch a specific form ID.
Extract Text from PDF File (n8n node):
Function: Converts the downloaded binary PDF file into extractable raw text, preparing it for RAG processing.
Splitting into Chunks (Code n8n node):
Function: A custom n8n node that splits the extracted text into 1000-character chunks, necessary for effective embedding and vector search.
Embedding Uploaded document / Embend User Message (HTTP Request n8n nodes):
Function: Sends text (document chunk or user query) to Together AI for embedding generation using the BAAI/bge-large-en-v1.5 model.
Save the embedding in DB (Supabase n8n node):
Function: Stores the text chunk and its generated embedding vector in the Supabase RAG table.
When chat message received (Chat Trigger n8n trigger):
Function: Initializes the chat response process when a user sends a query, serving as the main n8n trigger for the chat portion of the n8n workflow.
Search Embeddings (HTTP Request n8n node):
Function: Executes a vector similarity search in Supabase by calling the matchembeddings1 RPC, retrieving the top 5 most relevant document chunks.
AI Agent (Langchain n8n node):
Function: Orchestrates the final response generation. It combines the retrieved context, the user query, and a strict system prompt to ensure the LLM stays on topic and follows formatting rules.
Google Gemini Chat Model (Langchain n8n node):
* Function: The Large Language Model utilized by the AI Agent to generate the final, context-grounded response for the user. This is a critical n8n node in the generation phase.
Use this powerful n8n workflow to build a custom RAG (Retrieval-Augmented Generation) agent powered by Google Gemini and private knowledge stored in PostgreSQL vector databases (GLPI, Confluence).

Deploy a robust, dual-path AI customer support system using this n8n workflow. It combines Google Sheets for static FAQ retrieval (RAG) and Google Gemini for intelligent fallback responses. Use this n8n template to ensure accurate, boundary-aware AI support.

Build a specialized, hallucination-free AI documentation expert using RAG (Retrieval-Augmented Generation) in an advanced n8n workflow. This template indexes the n8n docs using Gemini embeddings.

Build an internal support RAG chatbot using this comprehensive n8n workflow. Integrate MongoDB vector search, OpenAI embeddings, and Google Docs ingestion into a powerful n8n solution.

Deploy a powerful, knowledge-based WhatsApp Assistant using this sophisticated n8n workflow. Integrates Google Docs, Supabase vector search, and the Gemini AI model for advanced RAG automation.

Deploy a powerful local AI assistant using this advanced n8n workflow. It combines Ollama (Llama 3.2), RAG capabilities, and real-time search tools using specialized n8n node configurations and the n8n trigger.








































