# Invoice verification and validation with Gmail and Drive: n8n workflow

> Started by a clock, and works across Gmail, Google Drive and Google Sheets. It hands the judgement calls to OpenRouter.

Source: https://millionrounds.com/workflow/invoice-verification-and-validation-with-gmail-and-drive (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Money admin](https://millionrounds.com/workflows?category=Money+admin#library)

# 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.

Large Calls a model: OpenRouter

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finvoice-verification-and-validation-with-gmail-and-drive)

**34 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**2** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 2 Logic 16 Service 15

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

- 1 **OpenRouter Chat Model** Lm Chat Open Router *Model*
- 2 **Schedule Trigger** Schedule trigger *Starts it*
- 3 **Text Extractor** Agent *Model*
- 4 **Date & Time** Date Time *Logic*
- 5 **Post-Processing** Code *Logic*
- 6 **Today's Date** Code *Logic*
- 7 **If** If *Logic*
- 8 **Gmail Trigger** Gmail *Service*
- 9 **Send Raw Text Again** Set *Logic*
- 10 **Split Out** Split Out *Logic*
- 11 **Date From Email Subject** Code *Logic*
- 12 **Merge** Merge *Logic*
- 13 **Generate Unique Key** Set *Logic*
- 14 **Read Message** Gmail *Service*
- 15 **Get Attachments** Code *Logic*
- 16 **Send Invoice Data** Google Sheets *Service*
- 17 **Search Month Folder** Google Drive *Service*
- 18 **Upload Invoices** Google Drive *Service*
- 19 **Extract from File** Extract From File *Service*
- 20 **Fetch Master Data** Google Sheets *Service*
- 21 **Month Folder Found?** If *Logic*
- 22 **Loop Over Items** Split In Batches *Logic*
- 23 **Validation** Code *Logic*
- 24 **Create Month Folder** Google Drive *Service*
- 25 **Search Day Folder** Google Drive *Service*
- 26 **Notify** Gmail *Service*
- 27 **Update Results** Google Sheets *Service*
- 28 **Day Folder Found?** If *Logic*
- 29 **Get last Index** Code *Logic*
- 30 **Get Parent Folder ID** Google Drive *Service*
- 31 **Get Day Folder ID** Google Drive *Service*
- 32 **Update Totals** Google Sheets *Service*
- 33 **Create Day Folder** Google Drive *Service*
- 34 **Wait** Wait *Logic*

## 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Finvoice-verification-and-validation-with-gmail-and-drive)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also money admin, with the same services where possible, closest in size first.

- [**Automate SaaS operations with OpenAI** 33 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/automate-saas-operations-with-openai)
- [**GPT 4.1-mini proposal to payment lifecycle management** 33 steps · calls a model · Gmail, n8n data table](https://millionrounds.com/workflow/gpt-4-1-mini-proposal-to-payment-lifecycle-management)
- [**Track and classify expenses with Mindee OCR and OpenAI** 32 steps · calls a model · Google Drive, Postgres](https://millionrounds.com/workflow/track-and-classify-expenses-with-mindee-ocr-and-openai)
- [**Automated expense tracking with Google Sheets** 31 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/automated-expense-tracking-with-google-sheets)
- [**Quotes to viral videos with Gemini and ElevenLabs** 37 steps · calls a model · Google Cloud Storage, Google Sheets](https://millionrounds.com/workflow/quotes-to-viral-videos-with-gemini-and-elevenlabs)
- [**Credit card payment reminder & tracking-for Taiwan banks** 31 steps · Gmail, Google Calendar](https://millionrounds.com/workflow/credit-card-payment-reminder-and-tracking-for-taiwan-banks)
