Automation library · Money admin

Invoice verification and validation with Gmail and Drive

Started by a clock, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to OpenRouter. 34 steps, 3 branches, 2 loops or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenRouter

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

The flow

Starts it 1Model 2Logic 16Service 15

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

  1. 1OpenRouter Chat ModelLm Chat Open RouterModel
  2. 2Schedule TriggerSchedule triggerStarts it
  3. 3Text ExtractorAgentModel
  4. 4Date & TimeDate TimeLogic
  5. 5Post-ProcessingCodeLogic
  6. 6Today's DateCodeLogic
  7. 7IfIfLogic
  8. 8Gmail TriggerGmailService
  9. 9Send Raw Text AgainSetLogic
  10. 10Split OutSplit OutLogic
  11. 11Date From Email SubjectCodeLogic
  12. 12MergeMergeLogic
  13. 13Generate Unique KeySetLogic
  14. 14Read MessageGmailService
  15. 15Get AttachmentsCodeLogic
  16. 16Send Invoice DataGoogle SheetsService
  17. 17Search Month FolderGoogle DriveService
  18. 18Upload InvoicesGoogle DriveService
  19. 19Extract from FileExtract From FileService
  20. 20Fetch Master DataGoogle SheetsService
  21. 21Month Folder Found?IfLogic
  22. 22Loop Over ItemsSplit In BatchesLogic
  23. 23ValidationCodeLogic
  24. 24Create Month FolderGoogle DriveService
  25. 25Search Day FolderGoogle DriveService
  26. 26NotifyGmailService
  27. 27Update ResultsGoogle SheetsService
  28. 28Day Folder Found?IfLogic
  29. 29Get last IndexCodeLogic
  30. 30Get Parent Folder IDGoogle DriveService
  31. 31Get Day Folder IDGoogle DriveService
  32. 32Update TotalsGoogle SheetsService
  33. 33Create Day FolderGoogle DriveService
  34. 34WaitWaitLogic

How it's built

Starts on
A clock
Steps
34, with 3 branches, 2 loops or waits
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Drive, Google Sheets
Model
OpenRouter

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Drive and Google Sheets accounts, and a key for OpenRouter. 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 OpenRouter. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 34 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 34 steps before you point it at anything that matters.