Automation library · Money admin

Process scanned invoices with Google Drive and OCR

Started by an event in a connected app, and works across Google Drive and Google Sheets. It hands the judgement calls to OpenAI. 19 steps, 2 branches, 1 loop or waits: a working afternoon to understand properly.

MediumCalls a model: OpenAI

19 stepsMedium: a working afternoon
2Branches: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 2Model 2Logic 7Service 8

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

  1. 1When clicking 'Execute workflow'Manual triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3Check for new invoicesGoogle Drive triggerStarts it
  4. 4Fetch 50 docsGoogle DriveService
  5. 5Information ExtractorInformation ExtractorModel
  6. 6Download fileGoogle DriveService
  7. 7Append row in sheetGoogle SheetsService
  8. 8Loop Over ItemsSplit In BatchesLogic
  9. 9Prepare a tableHtmlLogic
  10. 10Set file identitySetLogic
  11. 11MailgunMailgunService
  12. 12Save base64Extract From FileService
  13. 13Switch Mime TypeSwitchLogic
  14. 14Analyze ImageHttp RequestService
  15. 15Extract from FileExtract From FileService
  16. 16Edit FieldsSetLogic
  17. 17Identify CamScannerIfLogic
  18. 18Re-set base64SetLogic
  19. 19Convert to FileConvert To FileService

How it's built

Starts on
An event in a connected app
Steps
19, with 2 branches, 1 loop or waits
Size
Medium: a working afternoon
Connects to
Google Drive, Google Sheets
Model
OpenAI

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 an event in a connected app.

Does it use AI?

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

How long does it take to set up?

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