AutomationFlowsAI & RAG › RAG Agent (template)

RAG Agent (template)

RAG Agent (template). Event-driven trigger; 8 nodes.

Event trigger★★★☆☆ complexity8 nodes
AI & RAG Trigger: Event Nodes: 8 Complexity: ★★★☆☆ Added:

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": "RAG Agent (template)",
  "nodes": [
    {
      "parameters": {},
      "id": "ingest-trigger",
      "name": "Ingest Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        240,
        200
      ]
    },
    {
      "parameters": {},
      "id": "chunk",
      "name": "Chunk",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        480,
        200
      ]
    },
    {
      "parameters": {},
      "id": "embed-ingest",
      "name": "Embed (attach your embeddings)",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        720,
        200
      ]
    },
    {
      "parameters": {},
      "id": "vectorstore",
      "name": "Vector Store (attach your connection)",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        960,
        200
      ]
    },
    {
      "parameters": {
        "path": "rag-ask",
        "options": {}
      },
      "id": "question-trigger",
      "name": "Ask (webhook)",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        240,
        460
      ]
    },
    {
      "parameters": {},
      "id": "retrieve",
      "name": "Retrieve top-k",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        560,
        460
      ]
    },
    {
      "parameters": {},
      "id": "answer-agent",
      "name": "Answer Agent (attach your LLM)",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        840,
        460
      ]
    },
    {
      "parameters": {
        "content": "RAG AGENT\n\nIngestion (top): chunk -> embed -> vector store. Re-run when sources change.\nAnswer (bottom): retrieve top-k -> agent grounded in retrieved context.\n\nAlways have the agent cite the source chunk IDs it used. If retrieval confidence is low, prefer 'not in my sources' over a guess.\nNo credentials ship with this template.",
        "height": 300,
        "width": 380
      },
      "id": "note",
      "name": "Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1180,
        200
      ]
    }
  ],
  "connections": {
    "Ingest Trigger": {
      "main": [
        [
          {
            "node": "Chunk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chunk": {
      "main": [
        [
          {
            "node": "Embed (attach your embeddings)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embed (attach your embeddings)": {
      "main": [
        [
          {
            "node": "Vector Store (attach your connection)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask (webhook)": {
      "main": [
        [
          {
            "node": "Retrieve top-k",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retrieve top-k": {
      "main": [
        [
          {
            "node": "Answer Agent (attach your LLM)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
Pro

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

About this workflow

RAG Agent (template). Event-driven trigger; 8 nodes.

Source: https://github.com/alm-000/agentic-cookbook/blob/4bef51f564818910f7315d12bc764ce8407a3767/examples/rag-agent.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

📊 Description Automate the entire IT asset recovery and employee offboarding process with this AI-powered n8n workflow. 📋💻 This automation monitors Google Sheets for resigned or terminated employees,

Google Sheets Trigger, Google Sheets, Gmail +1
AI & RAG

This workflow simulates an autonomous ROV mission using multi-agent control logic, runs a closed-loop 6-DOF dynamics integration, and posts mission telemetry and performance results to an external HTT

HTTP Request
AI & RAG

Tutorial - Mastering n8n Expressions. Event-driven trigger; 27 nodes.

AI & RAG

Get your AI agents paying for resources autonomously in under 10 minutes.

Data Table, HTTP Request
AI & RAG

🤹🤖 This workflow (AI Document Generator with Anthropic Agent Skills and Uploading to Google Drive) automates the process of generating, downloading, and storing professionally formatted files (PDF, DO

HTTP Request, Form Trigger, Google Drive