Automation library · Documents and files

Document-based RAG chat assistant with Google Drive

Started by someone opening a chat with it, and works across Google Drive, 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. 32 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

32 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 4Model 8Logic 10Service 10

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

  1. 1OpenAI Chat ModelLm Chat Open AiModel
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3Embeddings OpenAI1Embeddings Open AiModel
  4. 4Default Data LoaderDocument Default Data LoaderModel
  5. 5Update FileGoogle Drive triggerStarts it
  6. 6New FileGoogle Drive triggerStarts it
  7. 7Schedule TriggerSchedule triggerStarts it
  8. 8ChatChat triggerStarts it
  9. 9Chat MemoryMemory Postgres ChatModel
  10. 10AI AgentAgentModel
  11. 11Supabase Vector StoreVector Store SupabaseModel
  12. 12Supabase Vector Store1Vector Store SupabaseModel
  13. 13Edit FieldsSetLogic
  14. 14Edit Fields2SetLogic
  15. 15Search files and foldersGoogle DriveService
  16. 16Switch1SwitchLogic
  17. 17Delete a rowSupabaseService
  18. 18Download fileGoogle DriveService
  19. 19Get many rowsSupabaseService
  20. 20Merge1MergeLogic
  21. 21Extract From PDFExtract From FileService
  22. 22Remove DuplicatesRemove DuplicatesLogic
  23. 23SwitchSwitchLogic
  24. 24Delete a row1SupabaseService
  25. 25Edit Fields1SetLogic
  26. 26Edit Fields4SetLogic
  27. 27Extract from PDFExtract From FileService
  28. 28Extract from Binary FileExtract From FileService
  29. 29Create folderGoogle DriveService
  30. 30MergeMergeLogic
  31. 31Edit Fields3SetLogic
  32. 32Upload fileGoogle DriveService

How it's built

Starts on
Someone opening a chat with it
Steps
32, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, 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, 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 32 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 32 steps before you point it at anything that matters.