Automate Workflow Backups to Google Drive
detail.loadingPreview
This workflow automates the backup of your n8n workflows to Google Drive. It triggers daily, retrieves your workflow list, then fetches and saves each workflow's JSON representation as a file in your specified Google Drive folder.
About This Workflow
Ensure the safety and accessibility of your n8n workflows with this automated backup solution. This workflow is designed to run daily, at 2:30 AM, ensuring your automation configurations are regularly backed up. It begins by fetching a list of all your n8n workflows, then systematically retrieves the details of each workflow. These details are then processed and converted into a binary JSON format before being uploaded to a designated folder within your Google Drive. This provides a robust, off-site backup strategy for your critical automation processes, mitigating the risk of data loss and ensuring business continuity.
Key Features
- Scheduled Backups: Automatically runs daily at 2:30 AM to ensure regular backups.
- Comprehensive Workflow Archiving: Captures the JSON configuration of each n8n workflow.
- Secure Cloud Storage: Uploads backups directly to your Google Drive for secure, remote storage.
- Customizable Destination: Easily specify the Google Drive folder for your backups.
- Manual Execution Option: Allows for on-demand backups via the 'Execute' button.
How To Use
- Set up Trigger: Configure the 'Run Daily at 2:30am' cron node with your desired backup schedule.
- Connect to n8n: In both 'Get Workflow List' and 'Get Workflow' nodes, set up your n8n credentials using Basic Auth (ensure you have an API key or username/password configured for your n8n instance).
- Specify n8n URL: Ensure the
urlparameter in 'Get Workflow List' is set to your n8n instance's API endpoint (e.g.,http://localhost:5678/rest/workflows). - Map Workflow Data: The 'Map' node processes the workflow list to extract relevant IDs.
- Retrieve Individual Workflows: The 'Get Workflow' node fetches the details for each workflow using its ID.
- Prepare for Merge: The 'Merge' node and 'FunctionItem' node consolidate the data for each workflow.
- Convert to Binary: The 'Move Binary Data' node transforms the JSON data into a binary format suitable for upload.
- Connect to Google Drive: In the 'Google Drive' node, configure your Google Cloud credentials (ensure you have a service account or OAuth credentials set up).
- Define Backup Folder: Replace the placeholder text in the 'parents' field of the 'Google Drive' node with the actual ID of your desired Google Drive folder. You can find this ID in the URL of your Google Drive folder.
- Execute: Click the 'execute' button on the 'On clicking 'execute'' node for a manual test run.
Apps Used
Workflow JSON
{
"id": "7d0f8283-c30f-4635-9b73-8139e0e452bc",
"name": "Automate Workflow Backups to Google Drive",
"nodes": 14,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 7d0f8283-c30f...
About the Author
Crypto_Watcher
Web3 Developer
Automated trading bots and blockchain monitoring workflows.
Statistics
Related Workflows
Discover more workflows you might like
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.