Block 1 - Splitting into Chunks
- Type / Role
- n8n-nodes-base.code - code
- Config choices
- Version 2
This workflow is provided as-is. Please review and test before using in production.
Youtube Video: https://youtu.be/dEtV7OYuMFQ?si=fOAlZWz4aDuFFovH Workflow Pre requisites Step 1: Supabase Setup First, replace the keys in the "Sa...
n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.supabase, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.extractfromfile, @n8n/n8n-nodes-langchain.chattrigger
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by iamvaar.
Original n8n.io sourceYoutube Video: https://youtu.be/dEtV7OYuMFQ?si=fOAlZWz4aDuFFovH
First, replace the keys in the "Save the embedding in DB" & "Search Embeddings" nodes with your new Supabase keys. After that, run the following code snippets in your Supabase SQL editor:
Create the table to store chunks and embeddings:
CREATE TABLE public."RAG"
(
id bigserial PRIMARY KEY,
chunk text NULL,
embeddings vector(1024) NULL
)
TABLESPACE pg_default;
Create a function to match embeddings:
DROP FUNCTION IF EXISTS public.matchembeddings1(integer, vector);
CREATE OR REPLACE FUNCTION public.matchembeddings1(
match_count integer,
query_embedding vector
)
RETURNS TABLE (
chunk text,
similarity float
)
LANGUAGE plpgsql
AS $$
BEGIN
RETURN QUERY
SELECT
R.chunk,
1 - (R.embeddings <=> query_embedding) AS similarity
FROM public."RAG" AS R
ORDER BY R.embeddings <=> query_embedding
LIMIT match_count;
END;
$$;
Get a Together AI API key and paste it into the "Embedding Uploaded document" node and the "Embed User Message" node.
This first sequence of nodes runs when you submit a PDF through a Jotform. Its purpose is to read the document, process its content, and save it in a specialized database for the AI to use later.
JotForm Trigger
Grab New knowledgebase
submissionID to get the complete details of that submission, including the specific link to the uploaded file.Grab the uploaded knowledgebase file link
Extract Text from PDF File
Splitting into Chunks
Embedding Uploaded document
Save the embedding in DB
This second sequence starts when a user sends a message. It uses the knowledge stored in the database to find relevant information and generate an intelligent answer.
When chat message received
Embend User Message
Search Embeddings
Aggregate
AI Agent & Google Gemini Chat Model
AI Agent node is given a detailed set of instructions (a prompt).Google Gemini Chat Model to act as a professional support agent.Aggregate node as its only source of truth.This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Build a knowledge base chatbot with Jotform, RAG Supabase, Together AI & Gemini |
|---|---|
| Complexity | advanced |
| Nodes | 15 |
| Categories | Internal Wiki, AI RAG |
| Author | iamvaar |
| Published | 14 Oct 2025 |
Use the JSON export at /data/workflows/9626/9626.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Youtube Video: https://youtu.be/dEtV7OYuMFQ?si=fOAlZWz4aDuFFovH Workflow Pre requisites Step 1: Supabase Setup First, replace the keys in the "Sa...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.