Use this efficient n8n workflow template to automatically sync documents between Microsoft SharePoint and Google Drive, leveraging a Supabase or Postgres database for metadata tracking and efficient change detection.
Download this n8n workflow template and start using it instantly.
Managing file synchronization across large organizations that use multiple cloud environments (like Microsoft SharePoint and Google Drive) can be complex and inefficient. This powerful n8n workflow solves this problem by providing a scheduled, metadata-driven synchronization engine. It avoids unnecessary reprocessing by storing file metadata (like unique ID and last modified date) in a dedicated database (Supabase/Postgres).
This n8n automation template ensures that only truly new or modified files are downloaded from SharePoint and uploaded to Google Drive, drastically reducing bandwidth and execution time. Furthermore, the logic handles the identification of deleted files and filters out system files, making this n8n workflow an ideal solution for enterprise data management.
The synchronization process starts with the n8n trigger, which is configured as a scheduled execution:
Schedule Trigger initiates the n8n workflow. Simultaneously, it fetches the existing file metadata from the n8n_metadata table in Supabase/Postgres and recursively retrieves the current file and folder structure from SharePoint via an n8n HTTP Request node..db). The timestamps of the files are then normalized using an n8n Set node.Compare Datasets n8n node to perform a delta check. It compares the live SharePoint data against the stored Supabase metadata, identifying new files, modified files, and files that have been deleted from SharePoint (which are then deleted from the Supabase record).Loading Done = true).To deploy this synchronization n8n workflow, follow these steps:
Supabase and Postgres n8n node operations (ensure the n8n_metadata table exists).excludedExtensions array in the filter files Code n8n node if you need to exclude different file types.Schedule Trigger n8n trigger node and activate the n8n workflow. Schedule Trigger (n8n trigger): The entry point of the n8n workflow, defining the automated execution frequency.
Supabase (Get): Retrieves all existing records from the n8nmetadata table to serve as the baseline for delta comparison.
Microsoft SharePoint HTTP Request (n8n node): Uses a complex $expand OData query to recursively fetch all folders and files from the target SharePoint document library.
filter files (Code n8n node): This crucial custom n8n node flattens the nested JSON structure into a single file list and excludes files matching patterns like ~$ or specified extensions (.db, .msg, etc.).
Compare Datasets (n8n node): Performs the delta logic, comparing the SharePoint file list against Supabase records using fields like sharepointfileid and TimeLastModified to determine which files are new, modified, or deleted.
Supabase1 (n8n node): Deletes metadata records for files identified as removed from SharePoint.
Microsoft SharePoint HTTP Request1 (n8n node): Downloads the specific file content marked for synchronization. The response format is set to file to handle binary data.
rename files (Code n8n node): Renames the binary data object internally using the clean file title before passing it to Google Drive. This is required because the SharePoint download doesn't always provide a clean file name for the binary.
Upload file (Google Drive n8n node): Handles the final storage operation, uploading the newly downloaded and renamed binary file to the specified location in Google Drive.
Postgres (n8n node): Executes an UPDATE operation on n8nmetadata to set the Loading Done flag to true, finalizing the processing status for the synchronized file.
A powerful n8n workflow for automated compliance validation using Local AI (Ollama) and a Vector Database (Qdrant). Deploy sophisticated RAG pipelines using these customizable n8n templates.

Use this powerful n8n workflow to automatically fetch comprehensive statistics (posts, threads, categories) from Disqus and deliver a formatted HTML report directly to your inbox using the Gmail n8n node.

Use this advanced n8n workflow to automatically detect Discord spam using AI text classification. Leverage human-in-the-loop logic for safe, consistent moderation actions on your server. Find more n8n templates here.

Use this powerful n8n workflow to automatically retrieve completed translations from Straker Verify, rename target files based on language codes, and save them directly to Google Drive. Perfect for language service providers utilizing n8n templates.

Digital Biz Tech helps organizations turn their knowledge and workflows into practical, AI-driven systems. From zero-retention assistants that provide secure, social media automation that generate and schedule on-brand campaigns, we enable teams to work faster, smarter, and with complete confidence in their data. For consulting or collaborations, reach out at: [email protected] Website: https://www.digitalbiz.tech You can also DM us on LinkedIn for any help..







































