Skip to main content

Detect and move duplicate Google Drive files with Supabase and Slack

Workflow preview

Workflow preview
100%
Detect and move duplicate Google Drive files with Supabase and Slack preview
Open on n8n.io

1. Workflow Overview

This workflow automatically detects duplicate files uploaded to a specific Google Drive folder by generating an MD5 hash of each file and comparing it against a Supabase database. If a duplicate is...

Best for

  • File Management automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.googledrivetrigger, n8n-nodes-base.code, n8n-nodes-base.googledrive, n8n-nodes-base.if, n8n-nodes-base.crypto, n8n-nodes-base.supabase, n8n-nodes-base.slack, n8n-nodes-base.noop

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Shashwat Singh.

Original n8n.io source

1.1 Workflow description

Title
Detect and move duplicate Google Drive files with Supabase and Slack
Workflow name
Detect and move duplicate Google Drive files with Supabase and Slack

This workflow automatically detects duplicate files uploaded to a specific Google Drive folder by generating an MD5 hash of each file and comparing it against a Supabase database. If a duplicate is found, the file is moved to a dedicated Duplicates folder and a Slack notification is sent. All events, including unique uploads, duplicates, race conditions, and errors, are logged for audit purposes.

It is designed for teams that handle high file volumes and need reliable, content based deduplication instead of simple filename checks.

How it works

  • Monitors a specific Google Drive folder for new files.

  • Normalizes file metadata and downloads the binary content.

  • Generates an MD5 hash from the file binary.

  • Checks Supabase to see if the hash already exists.

  • If duplicate, moves the file to a Duplicates folder and sends a Slack alert.

  • If unique, stores the hash in Supabase.

  • Logs every outcome, including errors and race conditions, in an audit table.

Setup steps

  • Connect your Google Drive account and select the folder to monitor.

  • Connect your Supabase account and create the required tables:

file_hashes
dedup_audit_log
  • Connect your Slack account and select a channel for duplicate alerts.

  • Update the Duplicates folder ID in the Google Drive Move node.

Setup typically takes 10 to 15 minutes if your Supabase project is ready.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Google Drive Trigger

Type / Role
n8n-nodes-base.googleDriveTrigger - googleDriveTrigger
Config choices
Version 1

Block 2 - Prepare File Info

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Download File

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 4 - Validate Binary

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 5 - Crypto

Type / Role
n8n-nodes-base.crypto - crypto
Config choices
Version 1

Block 6 - Check Hash Exists

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 7 - Move to Duplicates

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 8 - Notify Duplicate

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 9 - Prepare Dup Log Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Log Duplicate Event

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 11 - Prepare Hash Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Insert New Hash

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 13 - Handle DB Error

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 14 - Prepare Unique Log Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Log Unique Event

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 16 - Handle Missing Binary

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 17 - Prepare Error Log Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Log Error Event

Type / Role
n8n-nodes-base.supabase - supabase
Config choices
Version 1

Block 19 - No Operation, do nothing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 20 - Same File Re-triggered?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 21 - Hash Matched Different File?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 22 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 27 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Detect and move duplicate Google Drive files with Supabase and Slack
Complexity advanced
Nodes 27
Categories File Management
Author Shashwat Singh
Published 20 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13534/13534.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Detect and move duplicate Google Drive files with Supabase and Slack do?

This workflow automatically detects duplicate files uploaded to a specific Google Drive folder by generating an MD5 hash of each file and comparing it against a Supabase database. If a duplicate is...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your File Management use case.