← All N8N workflows
Developer toolsGithubIfManual TriggerMergeN8N

[OPS] Restore workflows from GitHub to n8n

Configured with Github, N8N. Review the connections and setup before adapting this template.

Workflow preview
TriggerOn clicking 'execute'Manual TriggerTransformGlobalsEdit FieldsRoutingWorkflow name alreadyexistsNo OpRoutingIf workflow alreadyexistsIfTransformSet n8n existingworkflows namesEdit FieldsIntegrationGitHub - get all filesGithubIntegrationn8n - get all workflowsN8NIntegrationGitHub - get each fileGithubTransformSet name and contentEdit FieldsIntegrationn8n - create workflowN8NTransformMerge globals and filesMergeTransformMerge Github and n8nworkflows - Keep only…Merge

Node categories in this workflow

  • Trigger
  • Transform
  • Routing
  • Integration

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
On clicking 'execute'TriggerManual TriggerSee node parameters
GlobalsTransformEdit FieldsSee node parameters
Workflow name already existsRoutingNo OpSee node parameters
If workflow already existsRoutingIfSee node parameters
Set n8n existing workflows namesTransformEdit FieldsSee node parameters
GitHub - get all filesIntegrationGithubfile / list
n8n - get all workflowsIntegrationN8NSee node parameters
GitHub - get each fileIntegrationGithubfile / get
Set name and contentTransformEdit FieldsSee node parameters
n8n - create workflowIntegrationN8Ncreate
Merge globals and filesTransformMergeSee node parameters
Merge Github and n8n workflows - Keep only non existing workflows based on the nameTransformMergeSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • githubApi
  • n8nApi

Workflow notes

Workflow - Restore Backups

Workflow - Restore Backups

This workflow will restore backed-up workflows from Github. It is launch by testing the workflow

Setup

Open Globals and update the values below repo.owner: This is your Github username repo.name: This is the name of your repository repo.path: This is the folder where your workflows are saved, within the repository.

If your username was n8n-io and your repository was called n8n-backups and you wanted the workflows to go into a workflows folder you would set:

repo.owner - n8n-io repo.name - n8n-backups repo.path - workflows

Get all Github files

Get all Github files

  1. List all the files from your repository
  2. Get each file as a JSON.
  3. The content, retrieved as base64, is converted in the "Set Name and Content" node

The "Set Name and Content" node creates a list of workflows with name and content, in order to compare it with the existing n8n workflows in the workspace.

Merge Github and n8n workflows

Merge Github and n8n workflows

Here, we only keep the workflows from Github that doesn't already exist in n8n workspace, based on the name

Create n8n workflow

Create n8n workflow

Create the n8n workflow using:

  • Content saved in Github
  • Name of the file in Github

If the workflow name already exist in n8n, then the workflow is not created - to avoid duplicates.

Get existing n8n workflows

Get existing n8n workflows

  1. Get all workflows
  2. Prepare a list of workflows in order to compare it with the workflows saved in the Github repo.
[OPS] Restore workflows from GitHub to n8n

[OPS] Restore workflows from GitHub to n8n

Purpose and structure

This folder contains the [OPS] Restore workflows from GitHub to n8n workflow. Its executable nodes use github, if, manualTrigger, merge, n8n, noOp, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

On clicking 'execute'

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Github/1988_GitHub_Manual_Automate_Triggered.json MIT; preserve source notices.

More in Developer tools