Automation library · Documents and files

Automate document ingestion & RAG system with Google Drive

Started by someone submitting a form, and works across Google Drive, Google Sheets and Pinecone. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 24 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 3Model 9Logic 3Service 9

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

  1. 1Embeddings OpenAIEmbeddings Open AiModel
  2. 2Recursive Character Text SplitterText Splitter Recursive Character Text SplitterModel
  3. 3createGoogle Drive triggerStarts it
  4. 4updateGoogle Drive triggerStarts it
  5. 5OpenAI Chat ModelLm Chat Open AiModel
  6. 6On form submissionForm triggerStarts it
  7. 7Embeddings OpenAI1Embeddings Open AiModel
  8. 8Pinecone Vector StoreVector Store PineconeModel
  9. 9Pinecone Vector Store1Vector Store PineconeModel
  10. 10Default Data LoaderDocument Default Data LoaderModel
  11. 11Search files and foldersGoogle DriveService
  12. 12AI AgentAgentModel
  13. 13Pinecone Vector Store2Vector Store PineconeModel
  14. 14Loop Over ItemsSplit In BatchesLogic
  15. 15FormFormService
  16. 16nonDownloadableFileIfLogic
  17. 17Download fileGoogle DriveService
  18. 18createHashCryptoService
  19. 19searchRecordMangerGoogle SheetsService
  20. 20SwitchSwitchLogic
  21. 21Add to Record MangerGoogle SheetsService
  22. 22Update the RecordMangerGoogle SheetsService
  23. 23Download file1Google DriveService
  24. 24Download file2Google DriveService

How it's built

Starts on
Someone submitting a form
Steps
24, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Google Sheets, Pinecone
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, Google Sheets and Pinecone accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

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 24 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 24 steps before you point it at anything that matters.