Automation library · Data collection

Sync OpenAI vector stores from Google Sheets with Drive

Started by a clock, and works across Google Drive, Google Sheets and S3. It hands the judgement calls to OpenAI. 19 steps, 3 branches, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: OpenAI

19 stepsMedium: a working afternoon
3Branches: places the flow splits
2Loops or waits
3Services it connects to

The flow

Starts it 1Model 1Logic 7Service 10

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

  1. 1Every 2 MinutesSchedule triggerStarts it
  2. 2Get Row(s) From SheetGoogle SheetsService
  3. 3If OutdatedIfLogic
  4. 4Delete File From Vector StoreHttp RequestService
  5. 5Filter New FilesFilterLogic
  6. 6Mark Row as DeletedGoogle SheetsService
  7. 7Loop Over ItemsSplit In BatchesLogic
  8. 8All Files DoneNo OpLogic
  9. 9Route by File SourceSwitchLogic
  10. 10Download from Google DriveGoogle DriveService
  11. 11Download from S3Aws S3Service
  12. 12Download via HTTPHttp RequestService
  13. 13Upload File to OpenAIOpen AiModel
  14. 14Add File to Vector StoreHttp RequestService
  15. 15Wait 30 SecondsWaitLogic
  16. 16Poll Vector Store File StatusHttp RequestService
  17. 17Route by Embedding StatusSwitchLogic
  18. 18Mark Row as ActiveGoogle SheetsService
  19. 19Mark Row as ErrorGoogle SheetsService

How it's built

Starts on
A clock
Steps
19, with 3 branches, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Google Drive, Google Sheets, S3
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Google Drive, Google Sheets and S3 accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 19 steps is enough that you should read each one before running it.

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