GenAiHub

Last checked 24 November 2026 — responded normally.

Answer website chat questions about attached documents with OpenAI

Quick Overview

Live
Open / InstallLast updated November 24, 2026

Description

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 memory for follow-up questions. How it works Receives a website chat message via a public webhook that supports streaming responses and file uploads. Checks whether the visitor attached a file and, if so, determines whether it is a PDF or a text/Markdown document. Extracts text from the uploaded file (or flags it as unreadable/unsupported) and truncates it to the first 20,000 characters. Stores the extracted document text as hidden messages in the chat conversation memory so the agent can reference it in later turns. Uses an OpenAI chat model to answer the visitor’s question (or generate a short summary if only a file was sent) based only on the document content, and streams the response back to the chat. Setup Add an OpenAI API credential (or replace the chat model node with another supported provider) and select the model you want to use. Publish the workflow, copy the production chat webhook URL, and embed it in your website chat widget configuration (enable file uploads). Set the allowed origins on the chat trigger to your website domain(s) to control where the widget can call the webhook from. If you expect long documents or long chats, adjust the 20,000-character limit and consider switching from in-process memory to a persistent chat memory (for example Postgres or Redis). An n8n automation workflow template by paul.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

paul

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • ai-agent
  • openai-chat-model
  • simple-memory
  • chat-memory-manager

Capabilities

  • 4 nodes

Information

TypeWorkflow
Sourcen8n
AddedNovember 4, 2026

Comments

?

Others in the same category, ranked by how often they are opened.