Automation library · Money admin

Extract invoice data from Google Drive to Sheets with Mistral

Started by an event in a connected app, and works across Google Drive and Google Sheets. It hands the judgement calls to Gemini. 20 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: Gemini

20 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
2Services it connects to

The flow

Starts it 2Model 2Logic 5Service 11

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

  1. 1When clicking ‘Test workflow’Manual triggerStarts it
  2. 2On new file in Google DriveGoogle Drive triggerStarts it
  3. 3Google Gemini Chat ModelLm Chat Google GeminiModel
  4. 4Load files from Google Drive folderGoogle DriveService
  5. 5Get Fields SchemaGoogle SheetsService
  6. 6Field ExtractorAgentModel
  7. 7Filter processed filesMergeLogic
  8. 8extract schemaCodeLogic
  9. 9Add google drive Id backCodeLogic
  10. 10Download file for OCRGoogle DriveService
  11. 11Get already processed rows from SheetsGoogle SheetsService
  12. 12Save data to Google SheetsGoogle SheetsService
  13. 13IfIfLogic
  14. 14Mistral Upload1Http RequestService
  15. 15Mistral UploadHttp RequestService
  16. 16Mistral Signed URL1Http RequestService
  17. 17Mistral Signed URLHttp RequestService
  18. 18Mistral IMAGE OCRHttp RequestService
  19. 19Mistral DOC OCRHttp RequestService
  20. 20Join OCR Pages and remove id fieldCodeLogic

How it's built

Starts on
An event in a connected app
Steps
20, with 1 branch
Size
Medium: a working afternoon
Connects to
Google Drive, Google Sheets
Model
Gemini

Questions

What does it need to run?

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

What starts it?

It starts on an event in a connected app.

Does it use AI?

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

How long does it take to set up?

Plan an afternoon. 20 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 20 steps before you point it at anything that matters.