Automation library · Documents and files

Index Google Drive files into a Supabase vector store

Started by someone opening a chat with it, and works across Google Drive, Postgres, 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. 26 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 3Model 4Logic 5Service 14

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

  1. 1OpenAI EmbeddingsEmbeddings Open AiModel
  2. 2When Drive File CreatedGoogle Drive triggerStarts it
  3. 3When Drive File UpdatedGoogle Drive triggerStarts it
  4. 4Split Text into ChunksText Splitter Character Text SplitterModel
  5. 5When Chat Message ReceivedChat triggerStarts it
  6. 6Insert Embeddings to VectorstoreVector Store SupabaseModel
  7. 7Loop Over Drive FilesSplit In BatchesLogic
  8. 8Load Document DataDocument Default Data LoaderModel
  9. 9Create Docs Table and Match FnPostgresService
  10. 10Set File Metadata FieldsSetLogic
  11. 11Create Document Metadata TablePostgresService
  12. 12Delete Old Doc Rows in SupabaseSupabaseService
  13. 13Create Document Rows TablePostgresService
  14. 14Delete Old Data Rows in SupabaseSupabaseService
  15. 15Insert Document Metadata to DBPostgresService
  16. 16Download File from DriveGoogle DriveService
  17. 17Route by File TypeSwitchLogic
  18. 18Extract Text from PDFExtract From FileService
  19. 19Extract Data from ExcelExtract From FileService
  20. 20Extract Data from CSVExtract From FileService
  21. 21Extract Text from DocumentExtract From FileService
  22. 22Aggregate Tabular DataAggregateLogic
  23. 23Insert Table Rows to DBPostgresService
  24. 24Summarize Tabular DataSummarizeService
  25. 25Build Schema and DataSetLogic
  26. 26Update Document Schema in DBPostgresService

How it's built

Starts on
Someone opening a chat with it
Steps
26, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Postgres, 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 Google Drive, Postgres, 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 someone opening a chat with 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?

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.