Mindket

OpenAI file search answers with cited file names inline

Newversion 1 · updated

Overview

An n8n workflow that answers a chat question from your own OpenAI vector store and writes the name of each source file into the answer, right after the passage it supports.

OpenAI file search answers with cited file names inline is an n8n workflow in the Research category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file there and open its chat
  • Your own n8n server: the same file and steps
  • OpenAI: the vector store that holds your files
  • Another app: swap the Chat Trigger for another trigger

Platform

Connects 1 app

How it works

Trigger

Chat message

It starts when someone sends a message in n8n’s chat:

  • The question they type

Actions

  1. The question goes to OpenAI’s Responses API with the file search tool and your vector store
  2. OpenAI searches the files and writes an answer with a citation for each passage
  3. A Code node inserts each cited file’s name into the answer at its position
  4. An optional node turns the Markdown into HTML

Result

A chat answer taken from your files, with the name of each source file after the passage it supports

Integrations

What you need before you start.

OpenAI

Language model and file search

Searches the vector store, writes the answer and reports which file each passage came from.

NeedsAn OpenAI API key, and the ID of a vector store that holds your files

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
4 steps, starting on a chat message
AI
No step calls an AI model
Sign-ins
Signs in to: OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 4 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow answers a chat question from the files in your own OpenAI vector store and names the file behind each passage. It sends the question to OpenAI’s Responses API with the file search tool. A Code node then writes each file name into the answer at the spot where its citation belongs. Mindket’s copy swaps OpenAI’s retired Assistants API for that single call. Four nodes run it, beside four sticky notes.

Who it suits

Teams that keep their knowledge in documents and want chat answers that show where each statement came from. Skip it if you need a chat that remembers earlier messages, or if you cannot keep your files in an OpenAI vector store.

Who uses it, and how
IndustryWho uses itHow they use itExample
LegalParalegalsAsk questions of a set of policy or contract filesA paralegal asks about a notice period and sees the contract file named in the answer.
SupportSupport teamsAnswer customers from help documentsA support lead asks about refunds and sees the policy file named beside each point.
ResearchAnalystsQuery a folder of reportsAn analyst asks what a report says on churn and sees which report each line came from.
EducationCourse teamsAnswer student questions from course notesA student asks about an exam rule and sees the handbook named.

You need a little n8n: import a file, add one credential and paste one vector store ID.

Where to use it

Any n8n that can reach OpenAI will run it. The answers appear in n8n’s own chat window.

  • n8n Cloud: import the file there and open its chat
  • Your own n8n server: the same file and steps
  • OpenAI: the vector store that holds your files
  • Another app: swap the Chat Trigger for another trigger

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup takes one credential and one vector store ID.

What you need first
NeedDetail
n8nOn n8n Cloud or on a server of your own
OpenAIAn API key, and a vector store that holds your files
Vector store IDThe ID of that store, from OpenAI
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Add an OpenAI credential and select it in Ask OpenAI with File Search.
  3. In the JSON body of that node, replace <YOUR_VECTOR_STORE_ID> with your vector store’s ID.
  4. Open the chat from Chat Trigger and ask a question that your files can answer.

How to use it

Open the chat and ask about your files. The answer arrives with a file name in italics after each cited passage. Turn on the Markdown node if you want HTML instead.

What to change for a different result
To changeWhere
The modelmodel in the body of Ask OpenAI with File Search
How many passages OpenAI usesmax_num_results on the tool in that body
The look of each noteThe text in Insert File Names
HTML outputOptional Markdown to HTML

Example

A support lead adds a refund policy and a delivery guide to a vector store and pastes its ID into the request body. A customer asks how long a refund takes.

OpenAI searches both files and writes a short answer. The Code node adds the policy’s file name in italics after the sentence that came from it, and the delivery guide’s name after the line about shipping.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Here one box asks OpenAI and one tidies the answer. A vector store is a set of your files that OpenAI has made searchable. Start with two short files.

For experts. The workflow is a Chat Trigger, one HTTP Request to the Responses API and a Code node. The file names come from the citations in the reply, so no second call is needed.

Where to look closer
NodeWhat it doesWhat to know
Ask OpenAI with File SearchPosts the question with the file_search tool and the vector storeIt uses the OpenAI credential type, so n8n adds the key
Insert File NamesReads the output_text part and inserts each file name at its citation indexIt inserts from the end of the text, so earlier positions stay right
Optional Markdown to HTMLTurns the Markdown into HTMLIt is switched off

Good to know

OpenAI’s Assistants API shut down on 26 August 2026, so this copy calls the Responses API and keeps no memory of earlier messages.

  • The repair: OpenAI’s deprecations page, read on 12 November 2026, names the Responses API and the Conversations API as the replacement. One request replaces the original’s assistant, thread and file lookups
  • The model: the original assistant took its model from OpenAI’s dashboard. This copy names gpt-5.6-terra, which OpenAI lists as supporting file search
  • Memory: the original wired a memory node to the assistant, and each question here is answered on its own
  • Citations: OpenAI’s reference gives each citation’s index as the spot in the text where it belongs, and the Code node trusts it
  • Errors: the Code node expects a message in the reply, so an error from OpenAI stops the run there
  • Your data: the question and the matching passages of your files go to OpenAI
  • Credentials: the JSON holds none

README and files

README

OpenAI file search answers with cited file names inline

An n8n workflow that answers a chat question from the files in your own OpenAI vector store, then writes the name of each
file it used into the answer. The answer comes from OpenAI's Responses API and its file search tool.

What is inside

  • workflow.json: the workflow as n8n exports it, eight nodes: four that do the work and four sticky notes. It holds no
    credential.
  • README.md: these notes.

What we changed from the original copy

  • The original ran on OpenAI's Assistants API. It called an assistant, read that assistant's thread with one request and
    looked up each cited file's name with another. OpenAI's deprecations page, read on 12 November 2026, says the Assistants
    API shut down on 26 August 2026 and names the Responses API and the Conversations API as its replacement. Those nodes
    cannot run now.
  • Mindket's copy asks the Responses API directly. Chat Trigger feeds Ask OpenAI with File Search, an HTTP Request node
    that posts to https://api.openai.com/v1/responses with the file search tool and your vector store. Insert File Names
    then writes the names into the answer.
  • The two lookups are gone, with the three Split Out nodes, the Set node and the Aggregate node that served them. OpenAI's
    file search guide shows each file citation carrying the file's name, so no second request is
    needed.
  • The assistant's ID is gone. The vector store's ID is <YOUR_VECTOR_STORE_ID> in the request body.
  • The original assistant took its model from OpenAI's dashboard, which the file does not show. The request now names
    gpt-5.6-terra, which OpenAI's model page lists as supporting file search in the Responses API.
  • The old Code node swapped odd marker text in the answer for the file name. A Responses API citation says where in the text
    it belongs, so the new Code node inserts the name at that spot instead.
  • Window Buffer Memory is gone, because it fed the assistant node. Each question is answered on its own.
  • The notes are rewritten as short notes about each step.
  • Nothing else.

Before you start

  • An n8n instance, on n8n Cloud or your own server.
  • An OpenAI API key.
  • An OpenAI vector store that holds your files, and its ID. OpenAI's file search guide explains how to make one.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Add an OpenAI credential and select it in Ask OpenAI with File Search.
  3. In the JSON body of that node, replace <YOUR_VECTOR_STORE_ID> with your vector store's ID. Remove the angle brackets too.
  4. Open the chat from Chat Trigger and ask a question that your files can answer.

How a run goes

  1. Chat Trigger takes the question as chatInput.
  2. Ask OpenAI with File Search posts the question with the file_search tool and your vector store. OpenAI searches the
    files and writes the answer.
  3. Insert File Names reads the answer's text and its file citations. At each citation's position it adds the file's name
    in Markdown italics, and two files at one spot are joined by a comma.
  4. Optional Markdown to HTML is switched off. Turn it on to change the Markdown into HTML.

Change the look

  • The model: model in the JSON body of Ask OpenAI with File Search.
  • How many passages OpenAI may use: add max_num_results to the tool in the body. OpenAI's guide lists it.
  • The look of the note: the text in Insert File Names.
  • HTML instead of Markdown: switch on Optional Markdown to HTML.

Good to know

  • Each question starts fresh, because the request carries no earlier messages.
  • OpenAI's API reference, read on 12 November 2026, defines a citation's index as the position in the output text where the
    citation belongs. The Code node trusts it.
  • The Code node expects a message in the reply. An error body from OpenAI has none, so the run stops there.
  • The question and the matching passages of your files go to OpenAI.
  • The JSON holds no credential.
Files
NOTICE.md  634 B
README.md  4 KB
workflow.json  5 KB

3 files, 10 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Research

See all in Research

EarthJev

dBenf · Kit

Answers typed questions about satellite image patches from all 12 Sentinel-2 bands, returning a probability for each option without writing text. A Qwen3.5-0.8…

New

getting-over-it-rl-jax

zimmerk4 · Kit

Plays the full game Getting Over It from the bottom to the end with a small trained policy network that learned inside a JAX physics simulator. For reinforceme…

New

ReFoCo

yuji-nozawa · Kit

Pretrained vision transformer checkpoints in three sizes from a research paper on training attention heads to focus on image regions. For researchers who extra…

New