Automated Workflow Backup to Google Drive with Slack Alerts - n8n Workflow

Use this robust n8n workflow to automatically backup all your running n8n templates to Google Drive every 4 hours. Includes Slack notifications for success and failure.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

• Users running critical processes on a self-hosted n8n instance.
• System administrators or DevOps teams needing automated disaster recovery solutions.
• Anyone seeking reliable, scheduled backups for their complex n8n workflow configurations.
• Users who utilize the n8n trigger functionality and require audit trails.

Overview

Ensuring the persistence and recoverability of your automation infrastructure is paramount. This highly valuable n8n workflow solves the critical need for automated data retention by backing up every single active n8n workflow definition. Running every four hours via an n8n trigger, the system fetches all current n8n templates, converts them into individual JSON files, compresses them into a single zip archive, and uploads them to a date-stamped folder in Google Drive. By implementing this reliable n8n solution, you protect your valuable automation assets and receive immediate Slack alerts upon successful completion or failure, providing peace of mind that your critical n8n setup is secure.

How it Works

This comprehensive n8n workflow operates on a strict four-hour schedule, initiated by the dedicated n8n trigger node.


  1. Scheduled Start: The Schedule n8n trigger node activates the entire process every four hours.

  2. Folder Creation: A Google Drive n8n node creates a new, uniquely named folder (including the timestamp) within a designated parent folder (e.g., 'N8N Backups').

  3. Workflow Retrieval: The dedicated n8n node connects to the local n8n API to retrieve JSON data for all existing n8n templates.

  4. File Conversion: Each individual n8n workflow JSON object is converted into a separate binary file using the Convert to File n8n node, ensuring each file is named correctly.

  5. Binary Preparation: A Code n8n node handles the assembly of all these binaries, preparing them for batch compression.

  6. Compression: The Compression n8n node zips all the individual workflow files into a single archive, named with the current date.

  7. Data Merge & Upload: The compressed archive is merged with the previously created Google Drive folder ID, and the Upload File Google Drive n8n node securely stores the backup zip file in the appropriate location.

  8. Notification: Upon successful upload, a Slack n8n node sends a completion notification, indicating how many n8n workflows were processed. A separate connection ensures that if any major file operation fails, a dedicated failure alert is sent via Slack.

Installation Guide

To install and utilize this essential n8n workflow template:


  1. Import: Copy the provided JSON code and import it directly into your n8n instance via the 'Workflows' screen using the 'New' button.

  2. n8n Credentials: You must provide n8n API credentials (ID and Key) for the 'Get many workflows' n8n node. This allows the workflow to access and extract the definitions of all your existing n8n templates.

  3. Google Drive Credentials: Set up Google Drive OAuth2 API credentials for the 'create new folder' and 'Upload file' n8n nodes. Ensure the account has write access to the designated backup folder.

  4. Folder Configuration: Update the Folder ID parameter in the 'create new folder' n8n node to point to the desired parent directory on your Google Drive (e.g., a permanent 'N8N Backups' folder).

  5. Slack Setup: Configure the Slack API credentials for both 'Completed Notification' and 'Failed Notification' n8n nodes. Update the Channel ID parameter in both nodes to direct notifications to your preferred channel.

  6. Activation: Once all credentials and settings are verified, set the 'Schedule Trigger' n8n trigger to active mode. For immediate testing, you can use the 'On clicking 'execute'' n8n trigger.

Node Details

Schedule Trigger (n8n trigger): This is the core n8n trigger, set to run the entire n8n workflow every 4 hours, ensuring frequent and timely backups.
n8n (Get many workflows): This crucial n8n node uses n8n API credentials to fetch the JSON definition of every active n8n workflow, preparing the data for backup.
Google Drive (create new folder): Creates a time-stamped directory in Google Drive to organize each backup iteration. It requires Google Drive credentials.
Convert to File (Convert to File1): Converts the JSON data streams of individual n8n templates into usable binary files, dynamically naming each file using the workflow's name.
Code: Scripts the collection of multiple binary files generated from the n8n workflows into a single structure suitable for compression.
Compression: Compresses all individual n8n workflow files into a single .zip archive, optimizing storage and transfer.
Google Drive (Upload file): Uploads the final compressed zip file containing all n8n templates to the dynamically created Google Drive folder.
Slack (Completed/Failed Notification): These Slack n8n nodes provide immediate operational feedback, alerting users whether the n8n workflow executed successfully or encountered an error.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all

Featured*