AutomationFlowsAI & RAG › Ai-powered RAG Q&a Chatbot with Openai, Google Sheets, Glide & Supabase

Ai-powered RAG Q&a Chatbot with Openai, Google Sheets, Glide & Supabase

BySam Yassine @samyassine on n8n.io

Automate AI-Powered RAG System with Contextual Q&A, Google Sheets Integration, and Glide Frontend—Powered by n8n, OpenAI, Supabase, and Google Apps Script.

Webhook trigger★★★★★ complexityAI-powered34 nodesGoogle CalendarOpenAI ChatChain LlmQdrant Vector StoreOpenAI EmbeddingsTool Vector StoreAgentHTTP Request
AI & RAG Trigger: Webhook Nodes: 34 Complexity: ★★★★★ AI nodes: yes Added:

This workflow corresponds to n8n.io template #4071 — we link there as the canonical source.

This workflow follows the Agent → Chainllm 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
{
  "id": "cqUkesdTBt1eb0Ny",
  "name": "Advanced Chatbot+Rag Agent",
  "tags": [],
  "nodes": [
    {
      "id": "b1f01c72-c1bf-4729-9016-431c06270e92",
      "name": "n8n_order",
      "type": "n8n-nodes-base.webhook",
      "position": [
        0,
        240
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "063583e6-bb88-4c88-801b-fdd57e2b92a6",
      "name": "Google Calendar",
      "type": "n8n-nodes-base.googleCalendar",
      "position": [
        2020,
        220
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "57e406c7-5b52-49c1-a4c6-bee15d97bdcd",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        420
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "7b6f9c79-95aa-42ee-a0f6-4b1eeec7192c",
      "name": "Concert start date",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1640,
        220
      ],
      "parameters": {},
      "typeVersion": 1.6
    },
    {
      "id": "b4556eea-381d-4ac2-8930-248043ed02e3",
      "name": "n8n_appointment",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1380,
        220
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9f443fc4-e71a-4152-b304-c4a8cbf8abea",
      "name": "Retrive Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        3260,
        420
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c9e4d71a-80db-45c9-8cb6-7d645c081de7",
      "name": "Embeddings OpenAI2",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        3220,
        600
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "d70f8ef2-e252-4dca-acf5-cec60f80db7c",
      "name": "RAG",
      "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
      "position": [
        3420,
        220
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d9884de0-7389-4cd8-9657-80fffa95fe34",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3220,
        220
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "41441ea8-f3c0-4b36-8a47-f12e3a624866",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        3580,
        440
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "51a0a38b-ab01-47b8-9665-0cbc2be623f6",
      "name": "Retrive Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3300,
        0
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "6dc391c8-54bb-4223-b0fb-aa99ba9becb6",
      "name": "n8n_rag",
      "type": "n8n-nodes-base.webhook",
      "position": [
        2880,
        0
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "4461b2ea-9391-4d16-8e8a-9b5bd077f899",
      "name": "Tracking response",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        240
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "16918647-88af-4a67-8798-e1a24c142d82",
      "name": "Calendar response",
      "type": "n8n-nodes-base.set",
      "position": [
        2220,
        220
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "758d752c-06ab-473c-8ebc-ccac5792207d",
      "name": "Webhook tracking response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1040,
        240
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "53c2db23-0b29-40a8-9c6c-66582785f363",
      "name": "API URL Tracking",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        360,
        240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "19d9fdf0-ee81-4a2b-9f23-f160ffc9ace9",
      "name": "Webhook calendar response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        2420,
        220
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1404754e-362c-45a8-a48d-5bdd81903ed5",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1860,
        420
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "50445cd1-d8e3-4132-b81c-29c61ab4c4e4",
      "name": "Webhook RAG response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3940,
        0
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e4aa410b-6c69-4a4f-a774-0d8dc18fa7d3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4400,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5849e29d-80bb-4b4b-b01c-5df0e125710d",
      "name": "When clicking \u2018Test workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1920,
        120
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0393e143-7e02-4e25-bd1a-96ade644ee52",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        -620,
        240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1a16e82c-1072-4a68-8e32-2ebb93afa211",
      "name": "Create collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -860,
        -80
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "2d995c22-3ac9-4714-a7b8-0f9d58b44385",
      "name": "Refresh collection",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1300,
        240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "9830b153-1ec5-431a-b2a1-9434934eac79",
      "name": "Get folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1080,
        240
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "f7b07a4d-19d6-4e92-9ad8-030bf4371227",
      "name": "Download Files",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -860,
        240
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "c7aab9a9-6972-4510-8534-cad58d2532df",
      "name": "Embeddings OpenAI",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        -640,
        440
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "992e7ef4-c08a-4c54-b2df-5489dcc91dcb",
      "name": "Default Data Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        -460,
        440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "60b75454-0608-4f86-a9ed-ff55f0046615",
      "name": "Token Splitter",
      "type": "@n8n/n8n-nodes-langchain.textSplitterTokenSplitter",
      "position": [
        -440,
        580
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a7e705e9-9896-46cd-9a69-41aa2e0b9c66",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -240
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6d004528-4049-41f8-be6d-5a694780f352",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d80d575d-8dc9-43e7-b14d-4a9d00a1330b",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2820,
        -180
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "c82ee641-46fa-4534-b9ff-246caf46d60e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        40
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "091602c1-6c19-4dbd-885a-ba393068f6af",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        40
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "87411f47-2164-4d91-9416-833740264b6f",
  "connections": {
    "RAG": {
      "ai_tool": [
        [
          {
            "node": "Retrive Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "n8n_rag": {
      "main": [
        [
          {
            "node": "Retrive Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n_order": {
      "main": [
        [
          {
            "node": "API URL Tracking",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get folder": {
      "main": [
        [
          {
            "node": "Download Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrive Agent": {
      "main": [
        [
          {
            "node": "Webhook RAG response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Files": {
      "main": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Token Splitter": {
      "ai_textSplitter": [
        [
          {
            "node": "Default Data Loader",
            "type": "ai_textSplitter",
            "index": 0
          }
        ]
      ]
    },
    "Google Calendar": {
      "main": [
        [
          {
            "node": "Calendar response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "n8n_appointment": {
      "main": [
        [
          {
            "node": "Concert start date",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "API URL Tracking": {
      "main": [
        [
          {
            "node": "Tracking response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calendar response": {
      "main": [
        [
          {
            "node": "Webhook calendar response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Tracking response": {
      "main": [
        [
          {
            "node": "Webhook tracking response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Concert start date": {
      "main": [
        [
          {
            "node": "Google Calendar",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI2": {
      "ai_embedding": [
        [
          {
            "node": "Retrive Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "RAG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Retrive Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "Concert start date",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Refresh collection": {
      "main": [
        [
          {
            "node": "Get folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Default Data Loader": {
      "ai_document": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Concert start date",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Retrive Qdrant Vector Store": {
      "ai_vectorStore": [
        [
          {
            "node": "RAG",
            "type": "ai_vectorStore",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Create collection",
            "type": "main",
            "index": 0
          },
          {
            "node": "Refresh collection",
            "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

Automate AI-Powered RAG System with Contextual Q&A, Google Sheets Integration, and Glide Frontend—Powered by n8n, OpenAI, Supabase, and Google Apps Script.

Source: https://n8n.io/workflows/4071/ — 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

Camila IA. Uses postgres, crypto, redis, agent. Webhook trigger; 92 nodes.

Postgres, Crypto, Redis +13
AI & RAG

Hi! I’m Amanda, a creator of intelligent automations using n8n and Make. I’ve been building AI-powered workflows for over 2 years, always focused on usability and innovation. This one here is very spe

OpenAI Chat, Redis, OpenAI +11
AI & RAG

Turn unstructured pitch decks and investment memos into polished Due Diligence PDF reports automatically. This n8n workflow handles everything from document ingestion to final delivery, combining inte

HTTP Request, Pinecone Vector Store, OpenAI Embeddings +7
AI & RAG

Transform raw investment memorandums and financial decks into comprehensive, professional Due Diligence (DD) PDF reports. This workflow automates document parsing via LlamaParse, enriches internal dat

HTTP Request, Pinecone Vector Store, OpenAI Embeddings +7
AI & RAG

Streamline M&A due diligence with AI. This n8n workflow automatically parses financial documents using LlamaIndex, embeds data into Pinecone, and generates comprehensive, AI-driven reports with GPT-5-

HTTP Request, Pinecone Vector Store, OpenAI Embeddings +6