Restore Automation Backups from GitHub Repository - n8n Workflow

Use this n8n workflow to automatically restore all your backed-up n8n workflow configurations from a GitHub repository, ensuring rapid recovery and deployment.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • n8n self-hosters and developers managing their instances.

  • Users who utilize GitHub for backing up their n8n templates.

  • Automation specialists needing a reliable disaster recovery plan for their n8n workflow library.

Overview

Maintaining complex automation setups requires robust backup and recovery strategies. This specific n8n workflow provides a critical DevOps function: rapidly restoring multiple n8n workflow definitions from a GitHub repository. If your n8n instance experiences issues or you need to migrate configurations, this pre-built n8n templates solution saves significant time. It automates the tedious process of fetching each workflow file, ensuring every backed-up n8n workflow is recreated on your active instance, making it a crucial n8n node utility for maintaining high availability. This n8n workflow is an excellent example of using n8n to manage n8n itself.

How it Works


  1. The n8n workflow is initiated manually via the n8n trigger or test button.

  2. The Globals n8n node sets the necessary configuration variables: GitHub repository owner, name, and the specific path where the workflow JSON files are stored.

  3. The workflow then uses an HTTP Request n8n node to call the GitHub API, listing all file paths within the designated backup folder.

  4. The Split the result n8n node iterates over the list, handling one workflow file path at a time.

  5. The Get file content from GitHub n8n node fetches the raw content (the JSON definition) of the currently iterated file from the GitHub repository.

  6. The Convert files to JSON n8n node processes this raw content, transforming it into a structured JSON object.

  7. Finally, the Restore n8n Workflows n8n node, leveraging the internal n8n API, uses the converted JSON object to create and restore the complete n8n workflow definition onto the current n8n instance. This process repeats for every file found.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and import it into your n8n instance via the 'Workflows' > 'New' > 'Import from JSON' option.

  2. GitHub Credentials: Ensure you have a valid GitHub API credential set up in n8n, accessible by the Get all files in given path n8n node. This typically requires a Personal Access Token with read permissions for the repository.

  3. n8n API Credentials: Configure an n8n API credential (used by the Restore n8n Workflows n8n node) that points back to your own n8n instance (usually http://localhost:5678 or your external URL). This credential requires administrative access to create new n8n workflows.

  4. Configuration: Navigate to the Globals set n8n node. Update the values for repo.owner, repo.name, and repo.path to match your specific GitHub backup repository structure. This step is critical for the n8n workflow to target the correct backup location.

  5. Execution: Once configured, run the n8n trigger manually to start the restoration process.

Node Details

When clicking ‘Test workflow’ (Manual Trigger): Functions as the initial n8n trigger to manually start the recovery process when testing or running a critical restoration.
Globals (Set): Defines essential variables for the n8n workflow, including the target GitHub repository owner, name (n8n-backup), and the folder path (workflows). This is crucial setup for any n8n templates relying on external configuration.
Get all files in given path (HTTP Request): Uses the GitHub Content API URL structure to list all files (n8n templates) that need to be restored. Requires GitHub API credentials.
Split the result (Split Out): An essential flow control n8n node that separates the list of files, allowing the workflow to process and restore each individual n8n workflow sequentially.
Get file content from GitHub (GitHub Node): Fetches the raw file content (the JSON definition of the n8n workflow) for the currently processed item, utilizing the path derived from the previous step.
Convert files to JSON (Extract From File): Converts the raw data received from GitHub into a valid, restorable JSON object required by the internal n8n API.


  • Restore n8n Workflows (n8n Node): The final action n8n node. It connects to the local n8n API and uses the extracted JSON object to create the new n8n workflow on the running instance.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Automation specialist with 10+ years of experience helping SME website owners streamline their workflows—specializing in Squarespace, Shopify, and WordPress. Book an initial consultation for custom n8n automation using my link.

Featured*