Automated Google Drive Duplicate File Manager
detail.loadingPreview
Automatically clean up your Google Drive by identifying and managing duplicate files. This workflow intelligently processes files, allowing you to choose whether to keep the first or last version and then either trash or flag the duplicates.
About This Workflow
Tired of a cluttered Google Drive filled with redundant files? This n8n workflow provides a robust solution for automated duplicate file management. It uses MD5 checksums and creation timestamps to accurately detect copies, offering flexible configuration to suit your needs. You decide if the oldest or newest version of a file should be preserved. Once identified, duplicates can be automatically sent to trash, freeing up valuable storage, or flagged with a special prefix for manual review. Designed for files owned by a specific user within a designated folder, it streamlines your file organization and enhances productivity, ensuring your drive remains clean and efficient.
Key Features
- Intelligent Deduplication: Uses MD5 checksums and creation times to accurately identify duplicate files in Google Drive.
- Configurable Retention Policy: Choose to keep either the 'first' (oldest) or 'last' (newest) version of a duplicated file.
- Automated Action Options: Set the workflow to either 'trash' (delete) detected duplicates or 'flag' them by renaming them with a 'DUPLICATE-' prefix.
- Targeted Folder Management: Focus the deduplication on specific Google Drive folders, with options to expand to entire drives.
- User-Specific File Handling: Ensures the workflow operates correctly on files owned by a specified Google Drive user.
How To Use
To set up and run this Google Drive Duplicate File Manager workflow:
- Connect Google Drive: Ensure you have configured your Google Drive OAuth2 API credentials in n8n.
- Define Retention Policy: In the
Confignode, locate thekeepparameter. Set its value tofirstto retain the oldest file, orlastto keep the newest version when duplicates are found. The default islast. - Specify Duplicate Action: In the same
Confignode, adjust theactionparameter. Choosetrashto automatically delete duplicates, orflagto rename them (e.g., "DUPLICATE-filename.ext"). The default isflag. - Configure Target Folder (Optional): This workflow is designed to work within a specific folder and for files owned by a particular user, typically fed from an upstream trigger. Review the notes in
Sticky Note6regarding the "Working Folder" if you need to modify the scope to the entire drive or different nested folders. Theownerandfolderparameters in theConfignode are usually dynamically set from the trigger and rarely need manual adjustment. - Activate Workflow: Once configured, enable the workflow. It will then automatically detect and manage duplicate files based on your specified settings when triggered (e.g., on a schedule or new file upload).
Apps Used
Workflow JSON
{
"id": "bdc3cebe-335f-43ca-bc60-c80fa612cb47",
"name": "Automated Google Drive Duplicate File Manager",
"nodes": 21,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: bdc3cebe-335f...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Google Sheets to Icypeas: Automated Bulk Domain Scanning
This workflow streamlines the process of performing bulk domain scans by integrating your Google Sheets data directly with the Icypeas platform. Automate the submission of company names from your spreadsheet to Icypeas for comprehensive domain information, saving valuable time and effort.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.