Turn chat replies into clear, cited answers. This setup helps content and support teams deliver responses that point to real files, with correct file names and optional links. It is useful any time you need proof behind the text, like articles, FAQs, and internal docs.
A chat button in n8n sends the message to an OpenAI assistant that uses a file store for retrieval. The system then pulls the full thread from the OpenAI API so all citations are captured. Messages are split into parts, citations are extracted, and file names are looked up from file ids. The output is normalized, aggregated, and formatted by a code step to insert numbered citations and optional Markdown links. There is also a short memory buffer to keep recent context. You can convert the final Markdown to HTML if you need it.
You need an OpenAI account, an API key, and an assistant that has file retrieval enabled with your documents uploaded. Connect your OpenAI credential in n8n and select the correct assistant. Expect faster content review and fewer errors when checking sources. Use it for content pieces with references, policy or legal notes, and customer answers that must cite PDFs or docs.