Skip to main content

Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase

Workflow preview

Workflow preview
100%
Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Convert any website into a searchable vector database for AI chatbots. Submit a URL, choose scraping scope, and this workflow handles everything: scraping, cleaning, chunking, embedding, and storin...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.vectorstoresupabase, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.embeddingsgooglegemini, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter, @n8n/n8n-nodes-langchain.documentdefaultdataloader, n8n-nodes-base.set, n8n-nodes-base.formtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dean Pike.

Original n8n.io source

1.1 Workflow description

Title
Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase
Workflow name
Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase

Convert any website into a searchable vector database for AI chatbots. Submit a URL, choose scraping scope, and this workflow handles everything: scraping, cleaning, chunking, embedding, and storing in Supabase.

What it does

  • Scrapes websites using Apify (3 modes: full site unlimited, full site limited, single URL)
  • Cleans content (removes navigation, footer, ads, cookie banners, etc)
  • Chunks text (800 chars, markdown-aware)
  • Generates embeddings (Google Gemini, 768 dimensions)
  • Stores in Supabase vector database

Requirements

  • Apify account + API token
  • Supabase database with pgvector extension
  • Google Gemini API key

Setup

  1. Create Supabase documents table with embedding column (vector 768). Run this SQL query in your Supabase project to enable the vector store setup
  2. Add your Apify API token to all three "Run Apify Scraper" nodes
  3. Add Supabase and Gemini credentials
  4. Test with small site (5-10 pages) or single page/URL first

Next steps

Connect your vector store to an AI chatbot for RAG-powered Q&A, or build semantic search features into your apps.

Tip: Start with page limits to test content quality before full-site scraping. Review chunks in Supabase and adjust Apify filters if needed for better vector embeddings.


Sample Outputs

Apify actor "runs" in Apify Dashboard from this workflow

Supabase docuemnts table with scraped website content ingested in chunks with vector embeddings

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Supabase Vector Store

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreSupabase - vectorStoreSupabase
Config choices
Version 1.1

Block 2 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Embeddings Google Gemini

Type / Role
@n8n/n8n-nodes-langchain.embeddingsGoogleGemini - embeddingsGoogleGemini
Config choices
Version 1

Block 4 - Improve Content Structure Quality

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Recursive Character Text Splitter

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

Block 6 - Default Data Loader

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 7 - Clean Data

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 8 - Enter Website URL and Settings

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.3

Block 9 - Prepare Settings for Apify Web Scraper

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.3

Block 10 - Set Data in Correct Request Format

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Run Apify Scraper: Scrape All - w/Limit

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - Run Apify Scraper: Scrape 1 URL Only

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - No Limit to Number of Scraped Pages?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 14 - Run Apify Scraper: Scrape All - No Limit

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase
Complexity advanced
Nodes 19
Categories Document Extraction, AI RAG
Author Dean Pike
Published 06 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10565/10565.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Create RAG-ready knowledge bases from websites using Apify, Gemini & Supabase do?

Convert any website into a searchable vector database for AI chatbots. Submit a URL, choose scraping scope, and this workflow handles everything: scraping, cleaning, chunking, embedding, and storin...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 Document Extraction, AI RAG use case.