# Process documents & build semantic search with OpenAI: n8n workflow

> Started by someone opening a chat with it, and works across Google Drive and Qdrant. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn...

Source: https://millionrounds.com/workflow/process-documents-and-build-semantic-search-with-openai (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# Process documents & build semantic search with OpenAI

Started by someone opening a chat with it, and works across Google Drive and Qdrant. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fprocess-documents-and-build-semantic-search-with-openai)

**23 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 4 Model 13 Logic 3 Service 3

The steps in the order they run, from what starts it.

- 1 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 2 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 3 **File Upload Form** Form trigger *Starts it*
- 4 **Recursive Character Text Splitter 1** Text Splitter Recursive Character Text Splitter *Model*
- 5 **Recursive Character Text Splitter 2** Text Splitter Recursive Character Text Splitter *Model*
- 6 **New File In Google Drive Folder** Google Drive trigger *Starts it*
- 7 **When chat message received** Chat trigger *Starts it*
- 8 **Embeddings OpenAI2** Embeddings Open Ai *Model*
- 9 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 10 **Simple Memory** Memory Buffer Window *Model*
- 11 **Manually Trigger Workflow** Manual trigger *Starts it*
- 12 **Insert to Qdrant** Vector Store Qdrant *Model*
- 13 **Insert to Qdrant1** Vector Store Qdrant *Model*
- 14 **Split Form Files** Code *Logic*
- 15 **Data Loader for Google Drive Files** Document Default Data Loader *Model*
- 16 **Data Loader for Form Files** Document Default Data Loader *Model*
- 17 **List Files in Google Drive Folder** Google Drive *Service*
- 18 **AI Agent** Agent *Model*
- 19 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 20 **Merge** Merge *Logic*
- 21 **Split Form Batches** Split In Batches *Logic*
- 22 **Download File** Google Drive *Service*
- 23 **Delete File** Google Drive *Service*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 23, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Qdrant
- **Model:** Gemini, OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Drive and Qdrant accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls Gemini and OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fprocess-documents-and-build-semantic-search-with-openai)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Build a financial documents assistant with Qdrant and Mistral** 23 steps · calls a model · Qdrant](https://millionrounds.com/workflow/build-a-financial-documents-assistant-with-qdrant-and-mistra)
- [**Chat with Supabase** 23 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/chat-with-supabase)
- [**Extract timesheet data with Mistral and Gmail** 23 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/extract-timesheet-data-with-mistral-and-gmail)
- [**Process documents with Google Drive and OpenAI** 23 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/process-documents-with-google-drive-and-openai)
- [**Save & organize LINE message files in Google Drive with Sheets** 23 steps · Google Drive, Google Sheets](https://millionrounds.com/workflow/save-and-organize-line-message-files-in-google-drive-with-sh)
- [**Automate document ingestion & RAG system with Google Drive** 24 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automate-document-ingestion-and-rag-system-with-google-drive)
