Process scanned invoices with Google Drive, OCR & OpenAI to Google Sheets
Ready for 3.0What this workflow does
This AI workflow has 19 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Google Drive, Google Sheets and Mailgun. It also calls api.ocr.space over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Fetch 50 docs (Google Drive): work with file folder
- Download file (Google Drive): download
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Prepare a table (HTML): parses or builds HTML
- Set file identity (Edit Fields (Set)): sets 2 fields: id, name
- Mailgun: uses Mailgun
- Save base (Extract from File): extracts data from a file (binary to propery)
- Switch: routes items into 2 branches
- Analyze Image (HTTP Request): calls api.ocr.space (POST)
- Extract from File: extracts data from a file (pdf)
…plus 6 more steps. See the full node list below.
Services it uses
HTTP calls to: api.ocr.space
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 (15)
- Manual Trigger
n8n-nodes-base.manualTrigger - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Convert to File
n8n-nodes-base.convertToFile - Switch
n8n-nodes-base.switch - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Edit Fields (Set)
n8n-nodes-base.set - Extract from File
n8n-nodes-base.extractFromFile - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - Google Sheets
n8n-nodes-base.googleSheets - Mailgun
n8n-nodes-base.mailgun - HTML
n8n-nodes-base.html
From the author
This template allows you to automatically process scanned invoices from Google Drive, extract key information using AI, and organize the data in Google Sheets with email notifications. Overview This comprehensive workflow automates the entire invoice…