# Index n8n workflows and enable semantic AI search with OpenAI: n8n workflow

> Started by another system calling it, and works across Supabase and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from...

Source: https://millionrounds.com/workflow/index-n8n-workflows-and-enable-semantic-ai-search-with-opena (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# Index n8n workflows and enable semantic AI search with OpenAI

Started by another system calling it, and works across Supabase and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 17 steps, 1 loop or waits: a working afternoon to understand properly.

Medium Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Findex-n8n-workflows-and-enable-semantic-ai-search-with-opena)

**17 steps** Medium: a working afternoon

**0** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 3 Model 9 Logic 3 Service 2

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

- 1 **Auto Sync Trigger (24h)** Schedule trigger *Starts it*
- 2 **Prepare Documents** Document Default Data Loader *Model*
- 3 **Generate Embeddings** Embeddings Open Ai *Model*
- 4 **Query Webhook (Ask Workflows)** Webhook *Starts it*
- 5 **LLM Brain (Agent)** Lm Chat Open Ai *Model*
- 6 **Query Embeddings Generator** Embeddings Open Ai *Model*
- 7 **Tool LLM** Lm Chat Open Ai *Model*
- 8 **Fetch n8n Workflows API** Http Request *Service*
- 9 **Store in Vector DB** Vector Store Supabase *Model*
- 10 **AI Workflow Assistant** Agent *Model*
- 11 **Vector DB Search** Vector Store Supabase *Model*
- 12 **Workflow Search Tool** Tool Vector Store *Model*
- 13 **Extract Workflow List** Split Out *Logic*
- 14 **Process Each Workflow** Split In Batches *Logic*
- 15 **Return AI Response** Respond To Webhook *Starts it*
- 16 **Clear Existing Vectors** Supabase *Service*
- 17 **Transform Workflow to Chunks** Code *Logic*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 17, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Supabase, Supabase vectors
- **Model:** 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 Supabase and Supabase vectors accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls 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?

Plan an afternoon. 17 steps is enough that you should read each one before running it.

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 17 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%2Findex-n8n-workflows-and-enable-semantic-ai-search-with-opena)
- **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.

[Supabase](https://millionrounds.com/workflows?service=Supabase#library)[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**AI study assistant with RAG and Drive** 17 steps · calls a model · Google Drive, Postgres](https://millionrounds.com/workflow/ai-study-assistant-with-rag-and-drive)
- [**Build a RAG knowledge chatbot with OpenAI and Google Drive** 17 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/build-a-rag-knowledge-chatbot-with-openai-and-google-drive)
- [**Build your own RAG-ready vector database in seconds – no SQL, no** 17 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/build-your-own-rag-ready-vector-database-in-seconds-no-sql-n)
- [**AI-powered knowledge assistant with Google Sheets and OpenAI** 16 steps · calls a model · Google Sheets, Supabase vectors](https://millionrounds.com/workflow/ai-powered-knowledge-assistant-with-google-sheets-and-openai)
- [**Build a labeled Reddit opinion dataset with Apify and OpenAI** 16 steps · calls a model · Apify, Supabase](https://millionrounds.com/workflow/build-a-labeled-reddit-opinion-dataset-with-apify-and-openai)
- [**Handle GDPR access and erasure emails with Gmail and OpenAI** 18 steps · calls a model · Airtable, Gmail](https://millionrounds.com/workflow/handle-gdpr-access-and-erasure-emails-with-gmail-and-openai)
