Capture, classify, and log Gmail PDF invoices with Gemini and Google Drive
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs on Gmail events. Along the way it connects Gmail, Google Gemini, Google Drive and Google Sheets.
How it runs
Trigger: On Gmail events.
- Has PDF Attachment? (If): checks a condition and branches into true / false
- Split Out: splits a list into separate items
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Analyze document (Google Gemini): work with document
- Merge: merges the data from its input branches
- Merge: merges the data from its input branches
- Edit Fields (Edit Fields (Set)): sets 1 field: content.parts[0].text
- Upload to Corporate Drive (Google Drive): uses Google Drive
- Upload to Personal Drive (Google Drive): uses Google Drive
- Is Corporate Invoice? (If): checks a condition and branches into true / false
…plus 1 more step. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Gemini + Google Sheets templates (819) · Other Google Drive + Google Sheets templates (720)
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 (9)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - If
n8n-nodes-base.if - Split Out
n8n-nodes-base.splitOut - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Google Gemini
@n8n/n8n-nodes-langchain.googleGemini - Edit Fields (Set)
n8n-nodes-base.set - Merge
n8n-nodes-base.merge - Google Drive
n8n-nodes-base.googleDrive - Google Sheets
n8n-nodes-base.googleSheets
From the author
Quick overview This workflow monitors a Gmail inbox for incoming emails with PDF invoices, uses Google Gemini to extract and classify invoice data, uploads the PDF to a corporate or personal Google Drive location, and appends the extracted metadata and file…