Automation library · Documents and files

Process documents with Google Drive and OpenAI

Started by an event in a connected app, and works across Google Drive and Supabase vectors. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps, 1 branch, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: Gemini, OpenAIRetrieval

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

The flow

Starts it 2Model 9Logic 7Service 5

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

  1. 1Google Drive TriggerGoogle Drive triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Embeddings OpenAIEmbeddings Open AiModel
  4. 4Character Text SplitterText Splitter Character Text SplitterModel
  5. 5When clicking ‘Execute workflow’Manual triggerStarts it
  6. 6Google Gemini Chat ModelLm Chat Google GeminiModel
  7. 7SupaBase QueryHttp Request ToolService
  8. 8Loop Over ItemsSplit In BatchesLogic
  9. 9Basic LLM ChainChain LlmModel
  10. 10Supabase Vector StoreVector Store SupabaseModel
  11. 11Default Data LoaderDocument Default Data LoaderModel
  12. 12OpenAIOpen AiModel
  13. 13AI AgentAgentModel
  14. 14File infoSetLogic
  15. 15SummarizeSummarizeService
  16. 16Google DriveGoogle DriveService
  17. 17SwitchSwitchLogic
  18. 18Extract from PDFExtract From FileService
  19. 19Extract from TEXTExtract From FileService
  20. 20PDF to DATASetLogic
  21. 21Document DataSetLogic
  22. 22Recursive SplitterCodeLogic
  23. 23Chunk SplittingSplit OutLogic

How it's built

Starts on
An event in a connected app
Steps
23, with 1 branch, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Supabase vectors
Model
Gemini, 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 and Supabase vectors accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls Gemini and 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 23 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 23 steps before you point it at anything that matters.