Auto File Organizer for Google Drive: Sort PDFs, Images & Documents by Type

Go to Workflow
0 views
Built by Rahul Joshi Rahul Joshi
Created on June 05, 2026

Description

Description:

This ready-to-deploy n8n automation template smartly detects and classifies files uploaded to a specified Google Drive folder based on MIME type. It automatically moves each file into its correct destination folder: Documents, PDFs, or Images β€” ensuring a clean and organized Drive, effortlessly.

Perfect for remote teams, admins, educators, legal pros, and automation-focused operations, this workflow eliminates manual sorting and saves hours of repetitive work.

What This Template Does (Step-by-Step)

βš™οΈManual Trigger: Launch the workflow on demand using the "Execute Workflow" trigger.

πŸ“ Search Files in Source Folder (Google Drive): Lists all files inside your chosen folder (e.g., "Uploads").

πŸ” Loop Over Files (SplitInBatches): Iterates through each file one-by-one to ensure reliability.

πŸ“₯ Download File (Google Drive): Retrieves file metadata and MIME type required for filtering.

🧠 Smart File Type Detection via If Nodes
application/json β†’ Move to Documents folder
application/pdf β†’ Move to PDFs folder
image/jpeg β†’ Move to Images folder
(Easily customizable to support additional types like PNG, DOCX, etc.)

πŸ“‚ Move Files to Designated Folders: Uses Google Drive API to relocate each file to its proper location.

πŸ” Loop Returns for Next File
After each move, the loop picks the next file in queue.

Key Features

βš™οΈ Google Drive API v3 Integration
πŸ” OAuth2 for secure access
πŸ“„ MIME-type–based routing logic
πŸ” Batch-safe with looping logic
βœ… File properties are preserved
πŸ”„ Auto-removal from source after sorting

Required Integration
Google Drive (OAuth2)

Use Cases

Auto-organize client uploads
Separate scanned PDFs, images, or forms
Route invoices, receipts, or contracts into folders
Automatically sort uploaded assignments or resources
Maintain structured cloud storage without manual intervention

Why Use This Template?

βœ… No-code deployment
βœ… Saves hours of manual work
βœ… Works across teams, departments, or shared Drives
βœ… Easy to expand with more file types or routing rules
βœ… Keeps your Drive clean, fast, and organized

Nodes Used (1)

Google Drive
n8n-nodes-base.googleDrive