Block 1 - Knowledge Base Agent
- Type / Role
- @n8n/n8n-nodes-langchain.agent - agent
- Config choices
- Version 1.9
This workflow is provided as-is. Please review and test before using in production.
Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation an...
@n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.vectorstoremongodbatlas, @n8n/n8n-nodes-langchain.documentdefaultdataloader, @n8n/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by NovaNode.
Original n8n.io sourceThis template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation and enable AI-driven, retrieval-augmented question answering.
Support agents often spend too much time manually searching through lengthy documentation, leading to inconsistent or delayed answers. This solution automates importing, chunking, and indexing product manuals, then uses retrieval-augmented generation (RAG) to answer user queries accurately and quickly with AI.
Workflow 1: Document Ingestion & Indexing Manually triggered to import product documentation from Google Docs.
Automatically splits large documents into chunks for efficient searching.
Generates vector embeddings for each chunk using OpenAI embeddings.
Inserts the embedded chunks and metadata into a MongoDB Atlas vector store, enabling fast semantic search.
Workflow 2: AI-Powered Query & Response Listens for incoming user questions (can be extended to webhook).
Converts questions to vector embeddings and performs similarity search on MongoDB vector store.
Uses OpenAI’s GPT-4o-mini model with retrieval-augmented generation to produce direct, context-aware answers.
Maintains short-term conversation context using a memory buffer node.
Setting up vector embeddings Authenticate Google Docs and connect your Google Docs URL containing the product documentation you want to index.
Authenticate MongoDB Atlas and connect the collection where you want to store the vector embeddings. Create a search index on this collection to support vector similarity queries.
Ensure the index name matches the one configured in n8n (data_index).
See the example MongoDB search index template below for reference.
Setting up chat Configure the AI system prompt in the “Knowledge Base Agent” node to reflect your company’s tone, answering style, and any business rules.
Update the workflow description and instructions to help users understand the chat’s purpose and capabilities.
Connect the MongoDB collection used for vector search in the chat workflow and update the vector search index if needed to match your setup.
Both MongoDB nodes (in ingestion and chat workflows) are connected to the same collection, with:
An embedding field storing vector data,
Relevant metadata fields (e.g., document ID, source), and
The same vector index name configured (e.g., data_index).
Search Index Example: { "mappings": { "dynamic": false, "fields": { "_id": { "type": "string" }, "text": { "type": "string" }, "embedding": { "type": "knnVector", "dimensions": 1536, "similarity": "cosine" }, "source": { "type": "string" }, "doc_id": { "type": "string" } } } }
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Build a knowledge base chatbot with OpenAI, RAG and MongoDB vector embeddings |
|---|---|
| Complexity | advanced |
| Nodes | 15 |
| Categories | Internal Wiki, AI RAG |
| Author | NovaNode |
| Published | 30 May 2025 |
Use the JSON export at /data/workflows/4526/4526.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Who is this for? This template is designed for internal support teams, product specialists, and knowledge managers in technology companies who want to automate ingestion of product documentation an...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Internal Wiki, AI RAG use case.