Automation library · Documents and files

Chat with Ollama and Supabase Vector DB

Started by someone opening a chat with it, and works across Google Drive, Supabase and Supabase vectors. It puts a local model behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 26 steps, 1 branch: large, and worth reading before you trust it with anything live.

LargeCalls a model: a local modelRetrieval

26 stepsLarge: read it before trusting it with anything live
1Branch: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 5Model 11Logic 4Service 6

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

  1. 1File CreatedGoogle Drive triggerStarts it
  2. 2File UpdatedGoogle Drive triggerStarts it
  3. 3Postgres Chat MemoryMemory Postgres ChatModel
  4. 4When chat message receivedChat triggerStarts it
  5. 5WebhookWebhookStarts it
  6. 6Character Text SplitterText Splitter Character Text SplitterModel
  7. 7Embeddings OllamaEmbeddings OllamaModel
  8. 8Embeddings Ollama1Embeddings OllamaModel
  9. 9Ollama ModelLm OllamaModel
  10. 10Ollama Chat ModelLm Chat OllamaModel
  11. 11Set File IDSetLogic
  12. 12RAG AI AgentAgentModel
  13. 13Edit FieldsSetLogic
  14. 14Default Data LoaderDocument Default Data LoaderModel
  15. 15Insert into Supabase VectorstoreVector Store SupabaseModel
  16. 16Supabase Vector StoreVector Store SupabaseModel
  17. 17User_documentsTool Vector StoreModel
  18. 18Delete Old Doc RowsSupabaseService
  19. 19Respond to WebhookRespond To WebhookStarts it
  20. 20Download FileGoogle DriveService
  21. 21SwitchSwitchLogic
  22. 22Extract PDF TextExtract From FileService
  23. 23Extract from ExcelExtract From FileService
  24. 24Extract Document TextExtract From FileService
  25. 25AggregateAggregateLogic
  26. 26SummarizeSummarizeService

How it's built

Starts on
Someone opening a chat with it
Steps
26, with 1 branch
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Supabase, Supabase vectors
Model
a local model
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, Supabase and Supabase vectors accounts, and a key for a local model. 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 a local model. 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 26 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 26 steps before you point it at anything that matters.