Templates / Classify documents with Gemini and organize them in Google Drive

Classify documents with Gemini and organize them in Google Drive

Ready for 3.0

by Yanagita Yusuke ✓ · 259 views · created 2026-05-20 · Document Extraction, 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-10-19.

What this workflow does

This workflow has 20 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Drive, Google Sheets, Google Calendar and Gmail. It also calls generativelanguage.googleapis.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Get inbox files (Google Drive): work with file folder
  2. Loop through files (Loop Over Items (Split in Batches)): loops over the items in batches
  3. Download file (Google Drive): download
  4. Check file type (Switch): routes items into 2 branches
  5. Convert to Base (Code): runs custom JavaScript code
  6. Handle unsupported format (Code): runs custom JavaScript code
  7. Gemini OCR classification (HTTP Request): calls generativelanguage.googleapis.com (POST)
  8. Send error notification (Gmail): uses Gmail
  9. Parse AI response (Code): runs custom JavaScript code
  10. Log error to sheet (Google Sheets): append

…plus 8 more steps. See the full node list below.

Services it uses

Google DriveGoogle SheetsGoogle CalendarGmail

HTTP calls to: generativelanguage.googleapis.com

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 (11)

From the author

Who is this for Accountants and office managers who want to automatically classify and organize documents in Google Drive. What this workflow does Retrieves files from a Google Drive inbox folder, classifies each using Gemini 2.5 Flash OCR, then renames,…

Excerpt from Yanagita Yusuke'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.