turn any Website into AI Knowledge Base
Shared 11/15/2025
125 views
Visual Workflow
JSON Code
{
"id": "wjUiqmhSvZGZ6akf",
"meta": {
"instanceId": "7384244b4de26555986ebcaeaf8ac78e3a6df8d5bf3b6599373804fe6662b1a6",
"templateCredsSetupCompleted": true
},
"name": "turn any Website into AI Knowledge Base",
"tags": [
{
"id": "IBMzHCPssICNxiMa",
"name": "hadidizflow",
"createdAt": "2025-03-19T00:20:23.148Z",
"updatedAt": "2025-03-19T00:20:23.148Z"
},
{
"id": "d52MoQFoCvnA1TXN",
"name": "youtube",
"createdAt": "2025-03-19T02:42:38.905Z",
"updatedAt": "2025-03-19T02:42:38.905Z"
}
],
"nodes": [
{
"id": "847aa32a-6996-4717-9fe1-af4f6deff790",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
-2240,
-336
],
"webhookId": "d3ee2e6e-aeee-4a4b-93e5-51f0ae9cb922",
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "08da0ae5-5d10-4021-99be-15761641b5d1",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1936,
-384
],
"parameters": {
"options": {
"systemMessage": "You are a helpful assistant that have All the Documentation Of N8N. \nUse the tools to answer the questions\n"
}
},
"typeVersion": 2.2
},
{
"id": "758d12d8-202d-4d7d-9679-0d6404ca2e30",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2016,
-192
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5-mini",
"cachedResultName": "gpt-5-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "JnS0mmg35R5VwbqR",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "8c4ac0e5-5fef-41ff-816c-0483a338a140",
"name": "Supabase Vector Store",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
-1632,
-256
],
"parameters": {
"mode": "retrieve-as-tool",
"options": {},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
},
"toolDescription": "Use this tool to get up-to-date, accurate information from N8N Documentation."
},
"credentials": {
"supabaseApi": {
"id": "X2l9eJhGJBsStxGT",
"name": "Supabase account"
}
},
"typeVersion": 1.3
},
{
"id": "b6d2ad3a-40cc-4f4d-b61b-ecc6f96c9387",
"name": "Embeddings OpenAI",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-1664,
608
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "JnS0mmg35R5VwbqR",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "82e4dcc0-065b-4ec2-8405-21a27f15c546",
"name": "Crawl a website",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
-2160,
208
],
"parameters": {
"url": "https://docs.n8n.io/",
"delay": 100,
"limit": 2,
"operation": "crawl",
"crawlOptions": {},
"requestOptions": {}
},
"credentials": {
"firecrawlApi": {
"id": "Bb3rryGkKpGIAeAd",
"name": "Firecrawl account"
}
},
"typeVersion": 1
},
{
"id": "3d1db72e-53b9-4a6c-8b85-c7327594ef37",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2416,
208
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7bf1e83f-0c59-49c2-a70e-b162316ae5e5",
"name": "Postgres Chat Memory",
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"position": [
-1872,
-224
],
"parameters": {},
"credentials": {
"postgres": {
"id": "X2bzH9oUK7ElhM6b",
"name": "Postgres account 2"
}
},
"typeVersion": 1.3
},
{
"id": "6f0b576e-ea02-4096-bfc7-8737f322b5ff",
"name": "Supabase Vector Store1",
"type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
"position": [
-1584,
432
],
"parameters": {
"mode": "insert",
"options": {
"queryName": "match_documents"
},
"tableName": {
"__rl": true,
"mode": "list",
"value": "documents",
"cachedResultName": "documents"
},
"embeddingBatchSize": 400
},
"credentials": {
"supabaseApi": {
"id": "X2l9eJhGJBsStxGT",
"name": "Supabase account"
}
},
"typeVersion": 1.3
},
{
"id": "cb62f801-a454-49b0-94ed-44d089bd0a68",
"name": "Default Data Loader1",
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"position": [
-1536,
608
],
"parameters": {
"options": {},
"textSplittingMode": "custom"
},
"typeVersion": 1.1
},
{
"id": "f63ce497-519f-4e62-bcf4-fa7f790a37b1",
"name": "Recursive Character Text Splitter1",
"type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
"position": [
-1520,
768
],
"parameters": {
"options": {
"splitCode": "markdown"
},
"chunkSize": 3000,
"chunkOverlap": 100
},
"typeVersion": 1
},
{
"id": "5538100f-649b-4ea0-8dcf-4f57f78d6fe9",
"name": "Switch1",
"type": "n8n-nodes-base.switch",
"position": [
-1504,
192
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "still scraping",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "5a23e585-68cb-4f91-a8a0-40b0ff96ca92",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "scraping"
}
]
},
"renameOutput": true
},
{
"outputKey": "Done",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "46b10b47-8d0f-4cab-ac53-58dbb0ee489d",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "completed"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.3
},
{
"id": "4ca97189-f552-425a-8cc7-4c61ee4f773f",
"name": "Get crawl status",
"type": "@mendable/n8n-nodes-firecrawl.firecrawl",
"position": [
-1696,
208
],
"parameters": {
"crawlId": "={{ $('Crawl a website').last().json.id }}",
"operation": "getCrawlStatus",
"requestOptions": {}
},
"credentials": {
"firecrawlApi": {
"id": "Bb3rryGkKpGIAeAd",
"name": "Firecrawl account"
}
},
"typeVersion": 1
},
{
"id": "2f5ec03b-fc7a-4021-83a5-926a2100a9e1",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
-1904,
208
],
"webhookId": "d2da288a-93f4-4f63-83cc-c90b9f846770",
"parameters": {
"amount": 20
},
"typeVersion": 1.1
},
{
"id": "f3807e85-c95d-4941-b089-6e8114b3173a",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
-1888,
432
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "66bdd858-8c55-4976-856b-f74df01b2ddb",
"name": "data",
"type": "string",
"value": "={{ $json.metadata.title }} \n {{ $json.metadata.description }}\n {{ $json.markdown }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8cc0e2da-9b6e-472c-a710-7cb9eeacf078",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
-1168,
224
],
"parameters": {
"options": {},
"fieldToSplitOut": "data.data"
},
"typeVersion": 1
},
{
"id": "f3ed1dad-822c-4220-adcc-4a828d67d043",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2976,
-16
],
"parameters": {
"color": 6,
"width": 400,
"height": 320,
"content": "## **First time Only:** \n### Run this Node Once to Set Up your Supabase Database Tables:"
},
"typeVersion": 1
},
{
"id": "9d207b66-ccf1-4589-a765-eacbcdd2d4ce",
"name": "Setup Supabase Vectors and Create Table",
"type": "n8n-nodes-base.postgres",
"position": [
-2832,
112
],
"parameters": {
"query": "-- Enable the pgvector extension to work with embedding vectors\ncreate extension IF NOT EXISTS vector;\n-- Create a table to store your documents\ncreate table IF NOT EXISTS documents (\n id bigserial primary key,\n content text, -- corresponds to Document.pageContent\n metadata jsonb, -- corresponds to Document.metadata\n embedding vector(1536) -- 1536 works for OpenAI embeddings, change if needed\n);\n\n-- Create a function to search for documents\nCREATE OR REPLACE function match_documents (\n query_embedding vector(1536),\n match_count int default null,\n filter jsonb DEFAULT '{}'\n) returns table (\n id bigint,\n content text,\n metadata jsonb,\n similarity float\n)\nlanguage plpgsql\nas $$\n#variable_conflict use_column\nbegin\n return query\n select\n id,\n content,\n metadata,\n 1 - (documents.embedding <=> query_embedding) as similarity\n from documents\n where metadata @> filter\n order by documents.embedding <=> query_embedding\n limit match_count;\nend;\n$$;",
"options": {},
"operation": "executeQuery"
},
"credentials": {
"postgres": {
"id": "X2bzH9oUK7ElhM6b",
"name": "Postgres account 2"
}
},
"typeVersion": 2.6
},
{
"id": "72fa5ee1-bb52-4eeb-908e-44b8bd1c38ba",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2976,
-400
],
"parameters": {
"color": 6,
"width": 400,
"height": 368,
"content": "## Getting Started:\nFirst watch this Video [Watch Here!](https://www.youtube.com/@Hadidiz)\n\n### 1. Signup for the free [Firecrawl](https://firecrawl.link/hadidiz) and get your API Key\n\n2. Connect your supabase account!\n3. Run the First time use NODE to setup your supabase for Vectors\n\n4. Choose your desired website then edit the \"Crawl a Website\" node to add the URL.\n\n5. Modify the AI Agent System Prompt To give it context on the Website"
},
"typeVersion": 1
},
{
"id": "6c09ea5e-7f69-453d-be7b-039dbce466b4",
"name": "Embeddings OpenAI2",
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"position": [
-1680,
-112
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "JnS0mmg35R5VwbqR",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "cf72ef66-867f-4a44-a222-dbb40e2bffb6",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1152,
496
],
"parameters": {
"color": 7,
"width": 150,
"height": 80,
"content": "## By Hadidiz\n[Youtube!](https://www.youtube.com/@Hadidiz)"
},
"typeVersion": 1
},
{
"id": "bceec635-1dd9-43da-b152-d1af00a0a1cd",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2304,
-496
],
"parameters": {
"color": 5,
"width": 960,
"height": 528,
"content": "## AI Agent With Knowledge Base"
},
"typeVersion": 1
},
{
"id": "6303c259-8389-4505-a57a-edfe619e7554",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2512,
80
],
"parameters": {
"color": 5,
"width": 1520,
"height": 496,
"content": "## Crawl a Website And Convert it into Knowldege Base\nA website crawler is employed to retrieve all the webpages of a website. Subsequently, the retrieved content is converted into Markdown format, which is the most comprehensible format for artificial intelligence. \nThe Markdown content is then divided into smaller chunks and ingested into the Vector Table within Supabase."
},
"typeVersion": 1
},
{
"id": "4da4f15a-371f-4f16-9455-5e8755433512",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1744,
384
],
"parameters": {
"color": 5,
"width": 496,
"height": 512,
"content": ""
},
"typeVersion": 1
},
{
"id": "bcc70423-7cd9-40f7-8e44-5cf99303bb77",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2592,
624
],
"parameters": {
"color": 3,
"width": 368,
"height": 256,
"content": "## Clean and delete the database table content"
},
"typeVersion": 1
},
{
"id": "c1124b84-0819-4931-b8ab-bd2f98b29263",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2208,
624
],
"parameters": {
"color": 3,
"width": 400,
"height": 256,
"content": "## Clean and delete the AI chat history"
},
"typeVersion": 1
},
{
"id": "0fc2dac0-ff5d-49b6-9ad6-91a54e31a075",
"name": "Delete ALL rows From Documents_crawler1",
"type": "n8n-nodes-base.supabase",
"position": [
-2048,
704
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "0",
"condition": "neq"
}
]
},
"tableId": "n8n_chat_histories",
"operation": "delete"
},
"credentials": {
"supabaseApi": {
"id": "X2l9eJhGJBsStxGT",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "c3f73955-3031-4b49-96c0-ab6e912a26ce",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2224,
352
],
"parameters": {
"color": 5,
"width": 230,
"height": 112,
"content": "#### ^ Enter Website URL Here\nFeel Free to change the pages limit as you wish"
},
"typeVersion": 1
},
{
"id": "dce0af41-37a2-4272-8ffc-441651d14f78",
"name": "Delete ALL rows From Documents",
"type": "n8n-nodes-base.supabase",
"position": [
-2448,
704
],
"parameters": {
"filters": {
"conditions": [
{
"keyName": "id",
"keyValue": "0",
"condition": "neq"
}
]
},
"tableId": "documents",
"operation": "delete"
},
"credentials": {
"supabaseApi": {
"id": "X2l9eJhGJBsStxGT",
"name": "Supabase account"
}
},
"typeVersion": 1
},
{
"id": "b64092f0-eb3b-4f37-a39b-3296fe339f4a",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3216,
-544
],
"parameters": {
"color": 7,
"width": 2336,
"height": 1520,
"content": "## By Hadidiz\n[Youtube!](https://www.youtube.com/@Hadidiz)"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {
"Wait": [
{
"json": {
"id": "cb60a7ec-10cb-464b-aa16-04b56da9ef01",
"url": "https://api.firecrawl.dev/v2/crawl/cb60a7ec-10cb-464b-aa16-04b56da9ef01",
"success": true
}
}
],
"Crawl a website": [
{
"json": {
"id": "cb60a7ec-10cb-464b-aa16-04b56da9ef01",
"url": "https://api.firecrawl.dev/v2/crawl/cb60a7ec-10cb-464b-aa16-04b56da9ef01",
"success": true
}
}
],
"When clicking ‘Execute workflow’": [
{
"json": {}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "ddb6e2df-4aad-47d6-8fc0-a8161ea9b6ad",
"connections": {
"Wait": {
"main": [
[
{
"node": "Get crawl status",
"type": "main",
"index": 0
}
]
]
},
"Switch1": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
],
[
{
"node": "Split Out",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Supabase Vector Store1",
"type": "main",
"index": 0
}
]
]
},
"Crawl a website": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Get crawl status": {
"main": [
[
{
"node": "Switch1",
"type": "main",
"index": 0
}
]
]
},
"Embeddings OpenAI": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings OpenAI2": {
"ai_embedding": [
[
{
"node": "Supabase Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Default Data Loader1": {
"ai_document": [
[
{
"node": "Supabase Vector Store1",
"type": "ai_document",
"index": 0
}
]
]
},
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Supabase Vector Store": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Recursive Character Text Splitter1": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader1",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Crawl a website",
"type": "main",
"index": 0
}
]
]
}
}
}