Templates / Answer support chat questions from uploaded documents with OpenAI

Answer support chat questions from uploaded documents with OpenAI

Ready for 3.0

by isaWOW ✓ · 22 views · created 2026-08-22 · Support Chatbot, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (11)

Embeddings OpenAIDefault Data LoaderSimple Vector StoreOpenAI Chat ModelAI AgentSimple Memory

What it does

Quick overview This workflow lets you upload PDF/CSV/TXT documents into an in-memory vector store and exposes a header-authenticated webhook that answers support questions using OpenAI chat models, optionally retrieving facts from the uploaded documents while keeping short session-based conversation memory. How it works 1. Receives uploaded PDF, CSV, or TXT files via an n8n form and replaces the current in-memory knowledge base with the new content. 2. Splits the uploaded files into chunks, generates embeddings with OpenAI, and stores the vectors in an in-memory vector store. 3. Receives a POST request on a header-authenticated webhook containing a user message and a sessionid. 4. Uses an OpenAI-based support agent with a system prompt and 15-message conversation memory to answer directly when possible. 5. When needed, calls a retrieval agent that searches the in-memory vector store for relevant facts and returns only sourced information. 6. Formats the agent’s final output as plain text and returns it in the webhook response. Setup 1. Add OpenAI credentials for the embeddings node and both OpenAI chat model nodes. 2. Create an HTTP Header Auth credential for the webhook and configure your chat client to send the same header and secret. 3. Update the support agent system prompt placeholders (company name, website, contact details, hours, services, and locations). 4. Enable the document upload form, open its form URL, and upload your PDFs/CSVs/TXTs to populate the knowledge base. 5. Send POST requests to the webhook path /support-chat-bot with a JSON body containing message and sessionid.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.