Automation library · Content

Turn forwarded business document images into structured records

Started by another system calling it, and works across Gmail and Postgres. 17 steps, 3 branches: a working afternoon to understand properly.

Medium

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

The flow

Starts it 2Logic 9Service 6

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

  1. 1When a document is forwardedWebhookStarts it
  2. 2Daily follow-up sweepSchedule triggerStarts it
  3. 3Normalize submissionSetLogic
  4. 4Find open documents from yesterday or earlierPostgresService
  5. 5Has an image attachedIfLogic
  6. 6Are there open documentsIfLogic
  7. 7Build GPT-4o vision requestCodeLogic
  8. 8Email unrecognized notice to operationsGmailService
  9. 9Build follow-up summaryCodeLogic
  10. 10Build all-clear noteCodeLogic
  11. 11Call GPT-4o visionHttp RequestService
  12. 12Email follow-up to operationsGmailService
  13. 13Parse vision resultCodeLogic
  14. 14Is the document readableIfLogic
  15. 15Store record in PostgresPostgresService
  16. 16Reattach parsed fieldsSetLogic
  17. 17Email received summary to operationsGmailService

How it's built

Starts on
Another system calling it
Steps
17, with 3 branches
Size
Medium: a working afternoon
Connects to
Gmail, Postgres
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own Gmail and Postgres accounts. 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?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

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