Skip to main content

Automated document sync between SharePoint and Google Drive with Supabase

Workflow preview

Workflow preview
100%
Automated document sync between SharePoint and Google Drive with Supabase preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

SharePoint → Supabase → Google Drive Sync Workflow Overview This workflow is a multi system document synchronization pipeline built in n8n , designed to automatically sync and back up files between...

Best for

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

Tools used

n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, n8n-nodes-base.scheduletrigger, n8n-nodes-base.comparedatasets, n8n-nodes-base.supabase, n8n-nodes-base.postgres, n8n-nodes-base.googledrive, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by DIGITAL BIZ TECH.

Original n8n.io source

1.1 Workflow description

Title
Automated document sync between SharePoint and Google Drive with Supabase
Workflow name
Automated document sync between SharePoint and Google Drive with Supabase

SharePoint → Supabase → Google Drive Sync Workflow

Overview

This workflow is a multi-system document synchronization pipeline built in n8n, designed to automatically sync and back up files between Microsoft SharePoint, Supabase/Postgres, and Google Drive.

It runs on a scheduled trigger, compares SharePoint file metadata against your Supabase table, downloads new or updated files, uploads them to Google Drive, and marks records as completed — keeping your databases and storage systems perfectly in sync.


Workflow Structure

  • Data Source: SharePoint REST API for recursive folder and file discovery.
  • Processing Layer: n8n logic for filtering, comparison, and metadata normalization.
  • Destination Systems: Supabase/Postgres for metadata, Google Drive for file backup.

SharePoint Sync Flow (Frontend Flow)

  • Trigger: Schedule Trigger
    Runs at fixed intervals (customizable) to start synchronization.

  • Fetch Files: Microsoft SharePoint HTTP Request
    Recursively retrieves folders and files using SharePoint’s REST API:
    /GetFolderByServerRelativeUrl(...)?$expand=Files,Folders,Folders/Files,Folders/Folders/Folders/Files

  • Filter Files: filter files
    A Code node that flattens nested folders and filters unwanted file types:

    • Excludes system or temporary files (~$)
    • Excludes extensions: .db, .msg, .xlsx, .xlsm, .pptx
  • Normalize Metadata: normalize last modified date
    Ensures consistent Last_modified_date format for accurate comparison.

  • Fetch Existing Records: Supabase (Get)
    Retrieves current entries from n8n_metadata to compare against SharePoint files.

  • Compare Datasets: Compare Datasets
    Detects new or modified files based on UniqueId, Last_modified_date, and Exists.
    Routes only changed entries forward for processing.


File Processing Engine (Backend Flow)

  • Loop: Loop Over Items2
    Iterates through each new or updated file detected.

  • Build Metadata: get metadata and Set metadata
    Constructs final metadata fields:

    • file_id, file_title, file_url, file_type, foldername, last_modified_date
      Generates fileUrl using UniqueId and ServerRelativeUrl if missing.
  • Upsert Metadata: Insert Document Metadata
    Inserts or updates file records in Supabase/Postgres (n8n_metadata table).
    Operation: upsert with id as the primary matching key.

  • Download File: Microsoft SharePoint HTTP Request1
    Fetches the binary file directly from SharePoint using its ServerRelativeUrl.

  • Rename File: rename files
    Renames each downloaded binary file to its original file_title before upload.

  • Upload File: Upload file
    Uploads the renamed file to Google Drive (My Driveroot folder).

  • Mark Complete: Postgres
    Updates the Supabase/Postgres record setting Loading Done = true.

  • Optional Cleanup: Supabase1
    Deletes obsolete or invalid metadata entries when required.


Integrations Used

Service Purpose Credential
Microsoft SharePoint File retrieval and download microsoftSharePointOAuth2Api
Supabase / Postgres Metadata storage and synchronization Supabase account 6 ayan
Google Drive File backup and redundancy Google Drive account 6 rn dbt
n8n Core Flow control, dataset comparison, batch looping Native

System Prompt Summary

> “You are a SharePoint document synchronization workflow.
Fetch all files, compare them to database entries, and only process new or modified files.
Download files, rename correctly, upload to Google Drive, and mark as completed in Supabase.”

Workflow rule summary:
> “Maintain data integrity, prevent duplicates, handle retries gracefully, and continue on errors.
Skip excluded file types and ensure reliable backups between all connected systems.”


Key Features

  • Scheduled automatic sync across SharePoint, Supabase, and Google Drive
  • Intelligent comparison to detect only new or modified files
  • Idempotent upsert for consistent metadata updates
  • Configurable file exclusion filters
  • Safe rename + upload pipeline for clean backups
  • Error-tolerant and fully automated operation

Summary

> A reliable, SharePoint-to-Google Drive synchronization workflow built with n8n, integrating Supabase/Postgres for metadata management.
It automates file fetching, filtering, downloading, uploading, and marking as completed — ensuring your data stays mirrored across platforms.

Perfect for enterprises managing document automation, backup systems, or cross-cloud data synchronization.


Need Help or More Workflows?

Want to customize this workflow for your organization?
Our team at Digital Biz Tech can extend it for enterprise-scale document automation, RAGs and social media automation.

We can help you set it up for free — from connecting credentials to deploying it live.

Contact: [email protected]
Website: https://www.digitalbiz.tech
LinkedIn: https://www.linkedin.com/company/digital-biz-tech/
You can also DM us on LinkedIn for any help.


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 - Loop Over Items2

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

Block 2 - Microsoft SharePoint HTTP Request1

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 4 - Compare Datasets

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

Block 5 - Supabase

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

Block 6 - Supabase1

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

Block 7 - Insert Document Metadata

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.5

Block 8 - Postgres

Type / Role
n8n-nodes-base.postgres - postgres
Config choices
Version 2.6

Block 9 - Upload file

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

Block 10 - Sticky Note

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

Block 11 - Sticky Note1

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

Block 12 - Sticky Note3

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

Block 13 - Sticky Note4

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

Block 14 - Sticky Note5

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

Block 15 - Sticky Note6

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

Block 16 - Sticky Note7

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

Block 17 - Sticky Note9

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

Block 18 - Sticky Note10

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

Block 19 - Sticky Note11

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

Block 20 - Sticky Note12

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

Block 21 - Sticky Note13

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

Block 22 - Sticky Note14

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

Block 23 - Microsoft SharePoint HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 24 - Sticky Note2

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

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

3. Summary Table

Workflow Automated document sync between SharePoint and Google Drive with Supabase
Complexity advanced
Nodes 30
Categories File Management
Author DIGITAL BIZ TECH
Published 12 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10749/10749.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 Automated document sync between SharePoint and Google Drive with Supabase do?

SharePoint → Supabase → Google Drive Sync Workflow Overview This workflow is a multi system document synchronization pipeline built in n8n , designed to automatically sync and back up files between...

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.