✨ $500 AI Visibility Audit — live at Spurlock Studios. Book the audit

Operations & Systems

Restore Backups from Github

This n8n workflow restores backups. It manually triggers to fetch workflow files from GitHub, compares them with existing workflows using the n8n API, and then creates only the non-existent workflows in your n8n instance, preventing duplicates.

Built · ~3 hours saved per week

Restore Backups from GitHub Workflow Overview This workflow automates the process of restoring n8n workflows from a backup stored in a GitHub repository. It efficiently reads all workflow backup files (in JSON format) from a specified GitHub folder, compares them against the workflows currently in the n8n instance, and only creates the ones that do not already exist. This provides significant value by creating a reliable, one-click disaster recovery or environment synchronization process. It intelligently avoids creating duplicate workflows, ensuring the n8n instance remains clean and preventing accidental overwrites or clutter. Technologies Used - n8n: The core automation platform, used to coordinate the process and manage workflows. - GitHub: Used as a version-controlled repository to store backups of n8n workflow JSON files. Node-by-Node Analysis H3: Trigger and Configuration - On clicking 'execute' (Manual Trigger): The workflow is initiated manually. This is ideal for a restoration task that should only be run on-demand. - Globals (Set Node): This node acts as a central configuration hub. It allows the user to easily define the owner (GitHub username), name (repository name), and path (folder) for the GitHub repository where backups are stored. This makes the workflow easily adaptable to any user's setup without needing to edit multiple nodes. H3: Fetching Data in Parallel The workflow executes two branches simultaneously to gather the necessary data. Branch 1: Fetching GitHub Backups - GitHub - get all files: Connects to the specified GitHub repository and lists all the file metadata within the configured backup folder. - Merge globals and files: This utility node combines the global repository settings with the list of files, ensuring that each file item has the necessary repository context for the next step. - GitHub - get each file: This node iterates through the list of files from the previous step. For each file, it fetches the actual file content, which is encoded in Base64. - Set name and content: This is a crucial data transformation step. It decodes the Base64 content back into its original workflow JSON format.

Tags: Admin, n8n, Data Transformation

Related automations

Back to the Automation Library