Templates / Detect duplicate Google Drive files and log results to Google Sheets

Detect duplicate Google Drive files and log results to Google Sheets

Ready for 3.0

by Christine ✓ · 11 views · created 2026-06-18 · File Management

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 10 nodes and runs from “Set Configuration Parameters” (no trigger node, so run it manually or call it from another workflow). Along the way it connects Google Drive, Google Sheets and Gmail.

How it runs

Trigger: From “Set Configuration Parameters” (no trigger node, so run it manually or call it from another workflow).

  1. Set Configuration Parameters (Edit Fields (Set)): sets 3 fields: folderID, spreadsheetID, sheetName
  2. Fetch Files from Drive (Google Drive): work with file folder
  3. Identify Duplicate Files (Code): runs custom JavaScript code
  4. Check for Duplicates (If): checks a condition and branches into true / false
  5. Prepare Duplicates Log Fields (Edit Fields (Set)): sets 9 fields: Group Key, File Name, File ID…
  6. Prepare Clean Log Fields (Edit Fields (Set)): sets 9 fields: Group Key, File Name, File ID…
  7. Append Duplicates to Sheets (Google Sheets): append
  8. Append Clean Log to Sheets (Google Sheets): append
  9. Limit: keeps the first few items
  10. Notify via Gmail (Gmail): uses Gmail

Services it uses

Google DriveGoogle SheetsGmail

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

From the author

Quick overview This workflow manually scans a specified Google Drive folder for duplicate and near-duplicate filenames, appends the results to a Google Sheets log, and optionally sends a single Gmail notification when duplicates are found. How it works 1.…

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