Automation library · Research and reporting

Analyze incoming letters with Google Drive and OpenAI

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

MediumCalls a model: OpenAI

16 stepsMedium: a working afternoon
0Branches: places the flow splits
2Loops or waits
2Services it connects to

The flow

Starts it 2Model 1Logic 6Service 7

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

  1. 1Manuell starten (Bestand)Manual triggerStarts it
  2. 2Google Drive TriggerGoogle Drive triggerStarts it
  3. 3Dateien im Eingang auflistenGoogle DriveService
  4. 4Datei-SchleifeSplit In BatchesLogic
  5. 5Alle Dateien verarbeitetNo OpLogic
  6. 6Vorhandene Zeilen lesenGoogle SheetsService
  7. 7Vorhandene Zeilen aggregierenCodeLogic
  8. 8Datei herunterladenGoogle DriveService
  9. 9Dokument analysieren (KI)Open AiModel
  10. 10Zeile aufbauenCodeLogic
  11. 11Fehlerzeile aufbauenCodeLogic
  12. 12In Google Sheet eintragenGoogle SheetsService
  13. 13Fehler ins SheetGoogle SheetsService
  14. 14Pause (Rate-Limit)WaitLogic
  15. 15In Fehler-Ordner verschiebenGoogle DriveService
  16. 16Ins Archiv verschiebenGoogle DriveService

How it's built

Starts on
An event in a connected app
Steps
16, 2 loops 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. 16 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 16 steps before you point it at anything that matters.