AutomationFlowsAI & RAG › Firecrawl RAG with OpenAI & Supabase

Firecrawl RAG with OpenAI & Supabase

Original n8n title: Firecrawl RAG

Firecrawl RAG. Uses embeddingsOpenAi, vectorStoreSupabase, lmChatOpenAi, agent. Event-driven trigger; 13 nodes.

Event trigger★★★★☆ complexityAI-powered13 nodesOpenAI EmbeddingsSupabase Vector StoreOpenAI ChatAgentText Splitter Recursive Character Text SplitterDocument Default Data LoaderHTTP RequestForm Trigger
AI & RAG Trigger: Event Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Firecrawl RAG",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        2688,
        2112
      ],
      "id": "e5b2fe93-fe69-4094-828c-bdaf6f7bcd12",
      "name": "Embeddings OpenAI Retriver"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        1440,
        1920
      ],
      "id": "aef7abd1-d8ab-46a1-8d7c-ba4d58252efa",
      "name": "Embeddings OpenAI"
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolName": "knowledge_base",
        "toolDescription": "Cerca informazioni nel sito web caricato e salvato nel database vettoriale.",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "topK": 15,
        "options": {}
      },
      "id": "56a134fb-3027-4fbd-9698-2a386bf9c7cf",
      "name": "Retriever",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        2688,
        1856
      ],
      "typeVersion": 1.1
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "id": "33dfb4cb-f66e-42fd-ae22-2fbc823e6574",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2384,
        1872
      ]
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "=# Personaggio\nSei un analista di documenti rigoroso..."
        }
      },
      "id": "db7c4756-9591-4ae4-bc63-292c11829e0c",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2448,
        1632
      ]
    },
    {
      "parameters": {
        "chunkSize": 1500,
        "chunkOverlap": 200,
        "options": {}
      },
      "id": "047755ac-2c0e-4c4d-855b-03c1d02c5519",
      "name": "Markdown Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
      "position": [
        1680,
        2048
      ]
    },
    {
      "parameters": {
        "options": {
          "metadata": {
            "metadataValues": [
              {
                "name": "url",
                "value": "={{ $json.metadata.url }}"
              }
            ]
          }
        }
      },
      "id": "f52faf25-ac1b-4e8e-8916-b271f0c33725",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        1680,
        1840
      ]
    },
    {
      "parameters": {
        "mode": "insert",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "embeddingBatchSize": 100,
        "options": {}
      },
      "id": "6265d235-d3f3-49d0-8655-d0270a99a67e",
      "name": "Supabase Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "position": [
        1440,
        1664
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.firecrawl.dev/v2/scrape",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"url\": \"{{ $json[\"Website Url\"] }}\",\n  \"formats\": [\"markdown\"],\n  \"onlyMainContent\": true,\n  \"waitFor\": 1000\n}",
        "options": {}
      },
      "id": "88e4c01f-d0e7-4aa7-9cd9-d0230491711f",
      "name": "Firecrawl Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1040,
        1664
      ]
    },
    {
      "parameters": {
        "formTitle": "Caricamento Sito Web",
        "formDescription": "Inserisci l'URL del sito per alimentare il database IA",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Website Url",
              "placeholder": "https://esempio.it"
            }
          ]
        }
      },
      "id": "0d1ce416-f6f5-4f0a-9354-dc2a734e4a20",
      "name": "Enter Website Url",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        816,
        1664
      ]
    },
    {
      "parameters": {
        "public": true,
        "mode": "webhook"
      },
      "id": "fc3b1c06-3c75-4c5f-ac7d-c31b7f728f33",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        2144,
        1632
      ]
    },
    {
      "parameters": {
        "tableName": "chat_memory"
      },
      "id": "6180d26d-9c1d-4b78-8d5b-89ccfbbf3d46",
      "name": "Chat Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "position": [
        2496,
        2128
      ]
    },
    {
      "parameters": {
        "jsCode": "const data = $input.item.json.data || {};\nlet markdown = data.markdown || \"\";\n\nif (markdown) {\n  let lines = markdown.split('\\n');\n\n  let cleanLines = lines.filter(line => {\n    const l = line.trim().toLowerCase();\n    if (l.length < 5) return false;\n\n    if (l.includes(\"skip to\") || \n        l.includes(\"search...\") || \n        l.includes(\"ctrl k\") || \n        l.includes(\"login\") || \n        l.includes(\"sign up\")) {\n      return false;\n    }\n\n    return true;\n  });\n\n  let cleanText = cleanLines.join('\\n');\n\n  return [{\n    json: {\n      content: cleanText,\n      metadata: {\n        url: data.metadata?.url || \"url non disponibile\",\n        title: data.metadata?.title || \"senza titolo\"\n      }\n    }\n  }];\n}\n\nreturn [{ json: { content: \"ERRORE\", metadata: {} } }];"
      },
      "id": "63378e53-94f5-4d16-8c65-6ac5e877d653",
      "name": "Extract Markdown",
      "type": "n8n-nodes-base.code",
      "position": [
        1248,
        1664
      ]
    }
  ],
  "connections": {
    "Embeddings OpenAI Retriver": {
      "ai_embedding": [
        [
          {
            "node": "Retriever",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Retriever": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Markdown Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Firecrawl Scraper": {
      "main": [
        [
          {
            "node": "Extract Markdown",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enter Website Url": {
      "main": [
        [
          {
            "node": "Firecrawl Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Extract Markdown": {
      "main": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Firecrawl RAG. Uses embeddingsOpenAi, vectorStoreSupabase, lmChatOpenAi, agent. Event-driven trigger; 13 nodes.

Source: https://github.com/arcangelorosato-dev/firecrawl-rag/blob/dae47403e11853cd9635e5d7354637e46b10a0b1/workflow.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Your AI workforce is ready. Are you?

Google Sheets Tool, Mcp Trigger, Google Drive +29
AI & RAG

This intelligent chatbot leverages cutting-edge financial APIs and AI-driven analysis to deliver comprehensive stock research reports. Get instant access to professional-grade investment analysis that

Tool Think, Supabase Vector Store, OpenAI Embeddings +15
AI & RAG

This n8n template automatically classifies incoming emails (Sales, Support, Internal, Finance, Promotions) and routes them to a dedicated OpenAI LLM Agent for processing. Depending on the category, th

OpenAI, Gmail, Text Classifier +16
AI & RAG

Automate Outreach Prospect automates finding, enriching, and messaging potential partners (like restaurants, malls, and bars) using Apify Google Maps scraping, Perplexity enrichment, OpenAI LLMs, Goog

@Devlikeapro/N8N Nodes Waha, Google Drive Trigger, @Apify/N8N Nodes Apify +14
AI & RAG

Chat with docs - 5minAI New version. Uses httpRequest, documentDefaultDataLoader, textSplitterRecursiveCharacterTextSplitter, embeddingsOpenAi. Event-driven trigger; 62 nodes.

HTTP Request, Document Default Data Loader, Text Splitter Recursive Character Text Splitter +10