Templates / Answer website chat questions about attached documents with OpenAI

Answer website chat questions about attached documents with OpenAI

Ready for 3.0

by paul · 1 views · created 2026-10-31 · 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This AI workflow has 13 nodes and runs when a chat message arrives. Along the way it connects OpenAI Chat Model.

How it runs

Trigger: When a chat message arrives.

  1. Settings (Edit Fields (Set)): sets 1 field: maxCharacters
  2. A file attached? (If): checks a condition and branches into true / false
  3. Which kind of file? (Switch): routes items into branches
  4. Answer (AI Agent): runs an AI agent, with model: Chat model; memory: Conversation memory
  5. Read the PDF (Extract from File): extracts data from a file (pdf)
  6. Read the text (Extract from File): extracts data from a file (text)
  7. Unsupported file (Edit Fields (Set)): sets 4 fields: sessionId, fileName, text…
  8. The document (Edit Fields (Set)): sets 5 fields: sessionId, fileName, fullText…
  9. Keep it in the conversation (Chat Memory Manager): uses Chat Memory Manager, with memory: Conversation memory
  10. Back to the message (Edit Fields (Set)): sets or maps fields

Services it uses

OpenAI Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (9)

From the author

Quick Overview This workflow hosts a public chat webhook for your website where visitors can upload a PDF, TXT, or Markdown file and ask questions about it, using OpenAI to respond strictly from the document text while keeping the document in conversation…

Excerpt from paul's description on n8n.io.

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.