Automation library · Money admin

Parse incoming invoices from Outlook with Gemini and Excel

Started by a clock, and works across Excel and Outlook. It hands the judgement calls to Gemini. 18 steps, 1 branch, 2 loops or waits: a working afternoon to understand properly.

MediumCalls a model: Gemini

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

The flow

Starts it 1Model 2Logic 9Service 6

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

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2ModelLm Chat Google GeminiModel
  3. 3Get Recent MessagesMicrosoft OutlookService
  4. 4Message ClassifierText ClassifierModel
  5. 5MarkdownMarkdownLogic
  6. 6For Each MessageSplit In BatchesLogic
  7. 7Microsoft Excel 365Microsoft ExcelService
  8. 8Message RefNo OpLogic
  9. 9Download AttachmentsMicrosoft OutlookService
  10. 10Split AttachmentsCodeLogic
  11. 11Extract from FileExtract From FileService
  12. 12Invoice Classifier With Gemini 2.0Http RequestService
  13. 13Filter InvoicesFilterLogic
  14. 14Has Invoice?IfLogic
  15. 15File-Based OCR with Gemini 2.0Http RequestService
  16. 16Empty ResponseSetLogic
  17. 17Parse OutputSetLogic
  18. 18WaitWaitLogic

How it's built

Starts on
A clock
Steps
18, with 1 branch, 2 loops or waits
Size
Medium: a working afternoon
Connects to
Excel, Outlook
Model
Gemini

Questions

What does it need to run?

An n8n account, plus your own Excel and Outlook accounts, and a key for Gemini. 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 Gemini. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

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