Skip to product information

n8n Webhook: GPT-4o Vision to Postgres Document Records

n8n Webhook: GPT-4o Vision to Postgres Document Records

 (200+Reviews)
Regular price £29.99
Regular price £29.99 Sale price
SAVE Sold out
Instant Digital Download
Unlimited Downloads
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
23 people viewing
High interest right now
9 added today
Fast-moving digital product
n8n Webhook: GPT-4o Vision to Postgres Document Records

n8n Webhook: GPT-4o Vision to Postgres Document Records

Regular price £29.99
Regular price £29.99 Sale price
SAVE Sold out

Turn document photos into structured records automatically—via an n8n Webhook

This n8n workflow receives business document images through a webhook, uses OpenAI GPT-4o Vision to classify and extract key fields, then upserts the results into Postgres and emails an operations summary (or an “unreadable document” alert) via Gmail. A daily reminder keeps anything still marked open from slipping through.

What this workflow does

  • Webhook intake: Accepts a POST submission containing an image URL or base64 image, plus optional metadata such as document type and a sender note.
  • Validation & analysis: Verifies an image is present, then sends it to OpenAI GPT-4o Vision with instructions to return a structured JSON record and a summary.
  • Normalization: Parses the AI response into normalized fields including document type, title, summary, extracted data, amount, currency, dates, and a confidence score.
  • Postgres persistence: If recognized, the workflow upserts the structured record into the Postgres biz_documents table (using a unique doc_id).
  • Operations notifications: Emails the extracted summary to the operations inbox via Gmail. If the document is missing or unrecognized, it emails an “unreadable document” notice.
  • Daily follow-up: Runs at 08:00 (Asia/Jakarta), queries Postgres for documents not marked done and older than 24 hours, and sends a follow-up list to operations via Gmail.

Use cases

  • Automated receipt/invoice capture from email forwards or internal tools using an n8n webhook.
  • Back-office document intake: extract amounts, currencies, and dates into Postgres for reporting.
  • Operational visibility: immediate summary emails plus a daily reminder for any documents still open.

Technical details

  • Nodes/blocks: webhook, if, set, code, gmail, postgres
  • AI: OpenAI Chat Completions with the gpt-4o model for Vision-based JSON extraction.
  • Database: Postgres biz_documents table with fields used by the INSERT/UPSERT logic.
View full details