Back to library
Research·n8n workflow

AI Knowledge-Base Agent (RAG)

Grounded Q&A over your docs: returns an LLM answer with sources and an honest "not in the docs" fallback — the answer core for a RAG bot (plug in your own retrieval step).

Inside this workflow

Slack QuestionSlack QuestionAnswer from KBAnswer from KBRespond to SlackRespond to Slack

Overview

**What it automates:** Webhook (question + context) → OpenAI reads context, answers question, cites source + confidence → responds to caller with fallback "not in docs" if uncertain. This is the answer core; you add your own retrieval (vector search, BM25) in the step before. **Business outcome:** Support teams spend 20% of time on FAQ-answerable questions. This workflow is the grounded-answer engine that powers your knowledge-base chatbot or Slack integration. **Apps & nodes:** Webhook, retrieval provider (your DB/vector store), OpenAI (grounded answering), HTTP response **Setup (4 steps):** 1. Create webhook for questions 2. Build/integrate your retrieval step (vector search, Supabase, Algolia) 3. Add OpenAI API key with grounding instructions 4. Test with known questions **Difficulty:** Intermediate-Advanced (20 min setup) | **Credentials:** OpenAI, your retrieval provider

What's included

Importable n8n workflow (JSON)
Real, wired nodes — trigger, logic, and actions
Setup notes: which credentials to connect
Free updates when the workflow changes
Commercial-use license — keep and customize
Email support if you get stuck

Quickstart

  1. 01

    Download the JSON

    With an active Library Pass, download the workflow file right from this page or your dashboard.

  2. 02

    Import into n8n

    Choose Import from File and select the downloaded JSON. The full agent graph appears, ready to configure.

  3. 03

    Plug in credentials

    Each integration node prompts for credentials on first run. The setup guide lists every credential the agent expects.

  4. 04

    Activate and test

    Run once with sample input, confirm the expected output, then flip the activate toggle.

Reviews (0)

No reviews yet. Be the first.

Sign in to leave a review.

Library Pass

Included with any pass

This agent — and every other in the library — comes with a Library Pass. One pass, the whole catalog.

Get a Library Pass
  • Every agent in the library
  • All new releases while active
  • Unlimited downloads
  • Commercial-use license
  • Priority email support
  • 30-day money-back guarantee
Browse the full library →