Templates / Capture, classify, and log Gmail PDF invoices with Gemini and Google Drive

Capture, classify, and log Gmail PDF invoices with Gemini and Google Drive

Ready for 3.0

by Murilo Costa ✓ · 25 views · created 2026-09-04 · Invoice Processing, AI Summarization

Ready 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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.

  1. Has PDF Attachment? (If): checks a condition and branches into true / false
  2. Split Out: splits a list into separate items
  3. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  4. Analyze document (Google Gemini): work with document
  5. Merge: merges the data from its input branches
  6. Merge: merges the data from its input branches
  7. Edit Fields (Edit Fields (Set)): sets 1 field: content.parts[0].text
  8. Upload to Corporate Drive (Google Drive): uses Google Drive
  9. Upload to Personal Drive (Google Drive): uses Google Drive
  10. 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

GmailGoogle GeminiGoogle DriveGoogle Sheets

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)

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…

Excerpt from Murilo Costa's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.