# AI-powered invoice processing automation with Google Sheets: n8n workflow

> Started by another system calling it, and works across Google Drive and Google Sheets. It puts OpenAI behind a retrieval step, so answers are drawn from...

Source: https://millionrounds.com/workflow/ai-powered-invoice-processing-automation-with-google-sheets (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)

# AI-powered invoice processing automation with Google Sheets

Started by another system calling it, and works across Google Drive and Google Sheets. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 44 steps, 2 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fai-powered-invoice-processing-automation-with-google-sheets)

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

**2** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 1 Model 11 Logic 14 Service 18

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

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 3 **OpenAI Chat Model2** Lm Chat Open Ai *Model*
- 4 **Simple Memory** Memory Buffer Window *Model*
- 5 **get_facturas** Google Sheets Tool *Service*
- 6 **calculadora** Tool Calculator *Model*
- 7 **download_facturas** Google Drive Tool *Service*
- 8 **search_facturas** Google Drive Tool *Service*
- 9 **Webhook** Webhook *Starts it*
- 10 **Extractor de Información** Information Extractor *Model*
- 11 **Extractor de Información2** Information Extractor *Model*
- 12 **AI Agent** Agent *Model*
- 13 **normalizar_datos** Set *Logic*
- 14 **Merge** Merge *Logic*
- 15 **Edit Fields** Set *Logic*
- 16 **Merge1** Merge *Logic*
- 17 **Edit Fields1** Set *Logic*
- 18 **Code1** Code *Logic*
- 19 **Switch** Switch *Logic*
- 20 **Upload file** Google Drive *Service*
- 21 **Merge3** Merge *Logic*
- 22 **Upload file1** Google Drive *Service*
- 23 **Merge4** Merge *Logic*
- 24 **If** If *Logic*
- 25 **Obter m dia em base64** Evolution Api *Service*
- 26 **Obter m dia em base** Evolution Api *Service*
- 27 **Edit Fields2** Set *Logic*
- 28 **Obter m dia em base65** Evolution Api *Service*
- 29 **Sheets #1** Google Sheets *Service*
- 30 **Sheets #** Google Sheets *Service*
- 31 **Code2** Code *Logic*
- 32 **Code** Code *Logic*
- 33 **Convert to File** Convert To File *Service*
- 34 **Convert to File1** Convert To File *Service*
- 35 **Merge2** Merge *Logic*
- 36 **Convert to File2** Convert To File *Service*
- 37 **Download file1** Google Drive *Service*
- 38 **Enviar texto1** Evolution Api *Service*
- 39 **PDFKit** Pdf Kit *Service*
- 40 **Extraer Texto1** Mistral Ai *Model*
- 41 **Transcribe a recording** Open Ai *Model*
- 42 **Extract from File1** Extract From File *Service*
- 43 **Extraer Texto** Mistral Ai *Model*
- 44 **Enviar documento1** Evolution Api *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 44, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Google Sheets
- **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 and Google Sheets accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

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 44 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 44 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%2Fai-powered-invoice-processing-automation-with-google-sheets)
- **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.

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

- [**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)
- [**WhatsApp productivity assistant with OpenAI and Gmail** 47 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/whatsapp-productivity-assistant-with-openai-and-gmail)
- [**Gmail invoice reader with Ollama** 40 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/gmail-invoice-reader-with-ollama)
- [**Payment processing and order tracking with YooKassa** 39 steps · Google Sheets](https://millionrounds.com/workflow/payment-processing-and-order-tracking-with-yookassa)
- [**Handle Telegram support, payments, and logo orders** 51 steps · calls a model · Google Sheets, Telegram](https://millionrounds.com/workflow/handle-telegram-support-payments-and-logo-orders)
- [**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)
