# Gmail invoice reader with Ollama: n8n workflow template

> Started by an arriving email, and works across Gmail, Google Drive, Google Sheets and NocoDB. It hands the judgement calls to a local model.

Source: https://millionrounds.com/workflow/gmail-invoice-reader-with-ollama (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)

# Gmail invoice reader with Ollama

Started by an arriving email, and works across Gmail, Google Drive, Google Sheets and NocoDB. It hands the judgement calls to a local model. 40 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: a local model

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fgmail-invoice-reader-with-ollama)

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

**3** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 2 Model 6 Logic 16 Service 16

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

- 1 **Gmail Trigger** Gmail trigger *Starts it*
- 2 **Ollama Model** Lm Ollama *Model*
- 3 **Ollama Chat Model** Lm Chat Ollama *Model*
- 4 **Google Drive Trigger** Google Drive trigger *Starts it*
- 5 **Ollama Model1** Lm Ollama *Model*
- 6 **Extract from File** Extract From File *Service*
- 7 **Convert to base64** Extract From File *Service*
- 8 **Basic LLM Chain** Chain Llm *Model*
- 9 **Basic LLM Chain1** Chain Llm *Model*
- 10 **Google Drive** Google Drive *Service*
- 11 **NocoDB1** Noco Db *Service*
- 12 **Basic LLM Chain3** Chain Llm *Model*
- 13 **Upload to Storage** Http Request *Service*
- 14 **Transform To JSON** Set *Logic*
- 15 **If** If *Logic*
- 16 **Extract from File1** Extract From File *Service*
- 17 **Convert to base** Extract From File *Service*
- 18 **Convert into single object** Function *Logic*
- 19 **Transform To JSON1** Set *Logic*
- 20 **Edit Fields** Set *Logic*
- 21 **Merge** Merge *Logic*
- 22 **No es Factura** No Op *Logic*
- 23 **Merge1** Merge *Logic*
- 24 **Merge3** Merge *Logic*
- 25 **NocoDB2** Noco Db *Service*
- 26 **Final JSON** Set *Logic*
- 27 **If2** If *Logic*
- 28 **If1** If *Logic*
- 29 **Google Sheets** Google Sheets *Service*
- 30 **NocoDB** Noco Db *Service*
- 31 **Upload to Storage1** Http Request *Service*
- 32 **Merge2** Merge *Logic*
- 33 **Edit Fields2** Set *Logic*
- 34 **Google Drive1** Google Drive *Service*
- 35 **Gmail** Gmail *Service*
- 36 **Gmail1** Gmail *Service*
- 37 **Edit Fields1** Set *Logic*
- 38 **Final JSON1** Set *Logic*
- 39 **Google Sheets1** Google Sheets *Service*
- 40 **NocoDB3** Noco Db *Service*

## How it's built

- **Starts on:** An arriving email
- **Steps:** 40, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Drive, Google Sheets, NocoDB
- **Model:** a local model

## Questions

What does it need to run?

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

What starts it?

It starts on an arriving email.

Does it use AI?

Yes. It calls a local model. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 40 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 40 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%2Fgmail-invoice-reader-with-ollama)
- **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)[NocoDB](https://millionrounds.com/workflows?service=NocoDB#library)

## Workflows like it

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

- [**Payment processing and order tracking with YooKassa** 39 steps · Google Sheets](https://millionrounds.com/workflow/payment-processing-and-order-tracking-with-yookassa)
- [**Send staged invoice payment reminders with Microsoft SQL** 42 steps · Gmail](https://millionrounds.com/workflow/send-staged-invoice-payment-reminders-with-microsoft-sql)
- [**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)
- [**AI-powered invoice processing automation with Google Sheets** 44 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/ai-powered-invoice-processing-automation-with-google-sheets)
- [**AI-powered receipt and expense tracker with Telegram** 45 steps · calls a model · Google Sheets, Redis](https://millionrounds.com/workflow/ai-powered-receipt-and-expense-tracker-with-telegram)
- [**Invoice verification and validation with Gmail and Drive** 34 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/invoice-verification-and-validation-with-gmail-and-drive)
