Automation library · Documents and files

AI agent to chat 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. 49 steps, 4 branches, 3 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 5Model 13Logic 18Service 13

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

  1. 1Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  2. 2Embeddings OpenAIEmbeddings Open AiModel
  3. 3When clicking ‘Test workflow’Manual triggerStarts it
  4. 4When chat message receivedChat triggerStarts it
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6Simple MemoryMemory Buffer WindowModel
  7. 7Embeddings OpenAI1Embeddings Open AiModel
  8. 8File CreatedGoogle Drive triggerStarts it
  9. 9File UpdatedGoogle Drive triggerStarts it
  10. 10Embeddings OpenAI3Embeddings Open AiModel
  11. 11Recursive Character Text Splitter1Text Splitter Recursive Character Text SplitterModel
  12. 12WebhookWebhookStarts it
  13. 13Default Data LoaderDocument Default Data LoaderModel
  14. 14Insert into Supabase VectorstoreVector Store SupabaseModel
  15. 15Get All FilesSupabaseService
  16. 16Edit FieldsSetLogic
  17. 17AI Agent1AgentModel
  18. 18Supabase Vector StoreVector Store SupabaseModel
  19. 19Set File IDSetLogic
  20. 20Insert into Supabase Vectorstore1Vector Store SupabaseModel
  21. 21Default Data Loader1Document Default Data LoaderModel
  22. 22Edit Fields1SetLogic
  23. 23Loop Over ItemsSplit In BatchesLogic
  24. 24AggregateAggregateLogic
  25. 25MergeMergeLogic
  26. 26Delete Old Doc RowsSupabaseService
  27. 27IfIfLogic
  28. 28Get All filesHttp RequestService
  29. 29Download FileGoogle DriveService
  30. 30DownloadHttp RequestService
  31. 31Upload File1Http RequestService
  32. 32If1IfLogic
  33. 33Get Processing Status1Http RequestService
  34. 34Upload FileHttp RequestService
  35. 35Set TextSetLogic
  36. 36Is Job Ready?1SwitchLogic
  37. 37Stop and Error1Stop And ErrorLogic
  38. 38Get Processing StatusHttp RequestService
  39. 39Merge TextMergeLogic
  40. 40Wait to stay within service limits1WaitLogic
  41. 41Get Parsed Data1Http RequestService
  42. 42Is Job Ready?SwitchLogic
  43. 43Stop and ErrorStop And ErrorLogic
  44. 44Create File record2SupabaseService
  45. 45Set Text3SetLogic
  46. 46Wait to stay within service limitsWaitLogic
  47. 47Get Parsed DataHttp RequestService
  48. 48Create File record1SupabaseService
  49. 49Set Text1SetLogic

How it's built

Starts on
Someone opening a chat with it
Steps
49, with 4 branches, 3 loops or waits
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 49 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 49 steps before you point it at anything that matters.