Quick overview
Restore one or all n8n workflows from a GitHub repository into any n8n instance — in one click.
Use it for disaster recovery, migrating to a new n8n instance, bulk importing workflows, or recovering a single accidentally deleted workflow.
How it works
- Starts manually and sets the GitHub repository, branch, workflows directory, restore mode (all or single), and target n8n base URL.
- If a specific workflow path is provided, it uses that file path; otherwise it lists all JSON workflow files in the configured GitHub directory and filters them based on the selected mode.
- Fetches each selected workflow JSON file from GitHub using the GitHub API.
- Cleans the exported workflow data by removing IDs and instance-specific metadata and normalizing settings for import.
- Queries the target n8n instance for an existing workflow with the same name via the n8n API.
- Updates the existing workflow if found, or creates a new workflow in the target n8n instance if not.
Setup
- Create a GitHub OAuth2 credential in n8n that can read the repository containing your exported workflow JSON files.
- Create an n8n API credential for the target instance and ensure the instance’s base URL is reachable from where this workflow runs.
- Update the configuration values for repo owner, repo name, branch, workflows directory, target n8n base URL, and restore mode, and set either selectedWorkflowPath or selectedWorkflowName when using single mode.