Skip to main content

Answer support questions from a knowledge base with OpenAI GPT-4o-mini

Workflow preview

Workflow preview
100%
Answer support questions from a knowledge base with OpenAI GPT-4o-mini preview
Open on n8n.io

1. Workflow Overview

Quick Overview This workflow powers a support chat experience that uses an OpenAI RAG agent with in memory vector search to answer questions from a knowledge base, and includes a manual ingestion f...

Best for

  • Support Chatbot automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @n8n/n8n-nodes-langchain.vectorstoreinmemory, @n8n/n8n-nodes-langchain.embeddingsopenai, n8n-nodes-base.manualtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by TakatoYamada.

Original n8n.io source

1.1 Workflow description

Title
Answer support questions from a knowledge base with OpenAI GPT-4o-mini
Workflow name
Answer support questions from a knowledge base with OpenAI GPT-4o-mini

Quick Overview

This workflow powers a support chat experience that uses an OpenAI RAG agent with in-memory vector search to answer questions from a knowledge base, and includes a manual ingestion flow that fetches an external FAQ document, splits it into chunks, embeds it with OpenAI, and stores it for retrieval.

How it works

  1. Triggers when a new chat message is received.
  2. Uses an OpenAI chat model with conversation memory to generate a support reply while following the system support guidelines.
  3. Creates OpenAI embeddings for the user’s query and searches an in-memory vector knowledge base for the top matching snippets.
  4. Uses the retrieved knowledge base content as a tool to ground the final answer and returns the response to the chat.
  5. When run manually, fetches FAQ content from a specified URL via HTTP.
  6. Splits the fetched text into chunks, converts it into documents, generates OpenAI embeddings, and inserts the vectors into the in-memory knowledge base for future queries.

Setup

  1. Add OpenAI credentials for both chat completions (GPT-4o-mini) and embeddings.
  2. Update the source URL in the HTTP Request step (currently https://example.com/help-center/faq.txt) to point to your real FAQ/knowledge base content.
  3. Run the manual ingestion flow once to populate the in-memory knowledge base before testing the chat trigger.

1.2 Logical Blocks

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.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - When Chat Message Received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 8 - AI Support Assistant

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 9 - OpenAI Chat GPT-4o-Mini

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Manage Conversation Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 11 - Load Knowledge Base Data

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.1

Block 12 - Generate Query Embeddings

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 13 - Manual Document Ingestion

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 14 - Fetch FAQ Documents

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Add Data to Knowledge Base

Type / Role
@n8n/n8n-nodes-langchain.vectorStoreInMemory - vectorStoreInMemory
Config choices
Version 1.1

Block 16 - Create Insert Embeddings

Type / Role
@n8n/n8n-nodes-langchain.embeddingsOpenAi - embeddingsOpenAi
Config choices
Version 1.2

Block 17 - Load Documents

Type / Role
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - documentDefaultDataLoader
Config choices
Version 1.1

Block 18 - Split Text for Processing

Type / Role
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - textSplitterRecursiveCharacterTextSplitter
Config choices
Version 1

3. Summary Table

Workflow Answer support questions from a knowledge base with OpenAI GPT-4o-mini
Complexity advanced
Nodes 18
Categories Support Chatbot, AI RAG
Author TakatoYamada
Published 13 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16336/16336.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

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.

Frequently asked questions

What does Answer support questions from a knowledge base with OpenAI GPT-4o-mini do?

Quick Overview This workflow powers a support chat experience that uses an OpenAI RAG agent with in memory vector search to answer questions from a knowledge base, and includes a manual ingestion f...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

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 Support Chatbot, AI RAG use case.