Extract invoice data from Google Drive images with GPT-4o and Postgres
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This AI workflow has 10 nodes and runs on Google Drive events (file created). Along the way it connects Google Drive, OpenAI and Postgres.
How it runs
Trigger: On Google Drive events (file created).
- Download from Google Drive (Google Drive): download
- AI Image Analyzer (OpenAI): analyze (image)
- Parse JSON Response (Code): runs custom JavaScript code
- Move to Failed Folder (Google Drive): move
- Check Duplicate Entry (Postgres): run a query
- If: checks a condition and branches into true / false
- Move to Duplicate Folder (Google Drive): move
- Insert Invoice Record (Postgres): run a query
- Move to Processed Folder (Google Drive): move
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if
From the author
Quick overview This workflow watches a Google Drive folder for new invoice images, extracts key invoice fields with OpenAI vision, checks for duplicates in Postgres, and then stores the invoice or moves the file into processed, duplicate, or failed folders.…