AutomationFlowsAI & RAG › Chat RAG Webui

Chat RAG Webui

chat rag webUI. Uses agent, lmChatOpenAi, memoryPostgresChat, vectorStoreSupabase. Webhook trigger; 8 nodes.

Webhook trigger★★★☆☆ complexityAI-powered8 nodesAgentOpenAI ChatMemory Postgres ChatSupabase Vector StoreOpenAI Embeddings
AI & RAG Trigger: Webhook Nodes: 8 Complexity: ★★★☆☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI Embeddings 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": "chat rag webUI",
  "nodes": [
    {
      "parameters": {
        "content": "## Agente RAG\nUn agente RAG (Retrieval Augmented Generation) Generaci\u00f3n aumentada por recuperaci\u00f3n, combina la capacidad de generaci\u00f3n de los LLM's con la capacidad de recuperaci\u00f3n de informaci\u00f3n relevante de fuentes especializadas.\n\nMinimiza las alucinaciones.\n\nConexi\u00f3n a base de dato vectorial con informaci\u00f3n que sempre est\u00e1 actualizada.",
        "height": 220
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -380,
        0
      ],
      "id": "7b94caf3-b0ab-4b13-80ec-6b80143cdc69",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.body.chatInput }}",
        "options": {
          "systemMessage": "Eres un asistente personal. Tu funcion es identificar que es lo que quiere buscar el usuario referente a Genexus, y documentacion de la empresa en Pinecone Vector Store. Responde de forma concreta, s\u00f3lo referente a la informaci\u00f3n que consultas en pinecone. En tu respuesta, Siempre coloca como referencia la fuente de datos del documento."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        260,
        0
      ],
      "id": "d51d056d-cec8-427a-940e-1f5fb977eaa7",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        180,
        180
      ],
      "id": "5a7a12e8-ff12-47ee-a1e5-b70f67722585",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $json.body.chat_id }}",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
      "typeVersion": 1.3,
      "position": [
        320,
        180
      ],
      "id": "b543718d-3986-49d4-a1aa-b1f2242a91f7",
      "name": "Postgres Chat Memory",
      "credentials": {
        "postgres": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "mode": "retrieve-as-tool",
        "toolName": "rag",
        "toolDescription": "={{ $json.chatInput }}",
        "tableName": {
          "__rl": true,
          "value": "documents",
          "mode": "list",
          "cachedResultName": "documents"
        },
        "topK": 10,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
      "typeVersion": 1.1,
      "position": [
        440,
        180
      ],
      "id": "47c485f0-7795-47a4-a653-a57f8656edb8",
      "name": "Supabase Vector Store",
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "typeVersion": 1.2,
      "position": [
        420,
        340
      ],
      "id": "43bbed3e-badb-4639-8dca-5afedc6b38ca",
      "name": "Embeddings OpenAI",
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "f2a5f950-ae9f-4d8b-b16e-96f358e74a2d",
        "responseMode": "responseNode",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        60,
        0
      ],
      "id": "036320f4-eba7-454b-a4ec-88dc6e1cd073",
      "name": "Webhook"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        600,
        0
      ],
      "id": "f9d85fd2-4773-4b3b-b58e-9c977b952e27",
      "name": "Respond to Webhook1"
    }
  ],
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "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
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "Supabase Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Respond to Webhook1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "39918f3c-1d8c-4491-8458-599f87fb50c1",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "Z2ovMZ93y7O7Ms1X",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

chat rag webUI. Uses agent, lmChatOpenAi, memoryPostgresChat, vectorStoreSupabase. Webhook trigger; 8 nodes.

Source: https://gist.github.com/brayanmezac/fd0546d1b810c79422806c5d0e63a043 — 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

RAG_AI_Agent_PDFs_Excel. Uses lmChatOpenAi, documentDefaultDataLoader, embeddingsOpenAi, toolVectorStore. Webhook trigger; 28 nodes.

OpenAI Chat, Document Default Data Loader, OpenAI Embeddings +7
AI & RAG

Chatbot Webhook. Uses lmChatGoogleGemini, agent, outputParserStructured, memoryPostgresChat. Webhook trigger; 14 nodes.

Google Gemini Chat, Agent, Output Parser Structured +4
AI & RAG

InsightsLM - Chat. Uses agent, memoryPostgresChat, vectorStoreSupabase, embeddingsOpenAi. Webhook trigger; 11 nodes.

Agent, Memory Postgres Chat, Supabase Vector Store +5
AI & RAG

RagBook - Chat. Uses agent, memoryPostgresChat, vectorStoreSupabase, embeddingsOpenAi. Webhook trigger; 11 nodes.

Agent, Memory Postgres Chat, Supabase Vector Store +5
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