JUHE API Marketplace

[OPS] Restore workflows from GitHub to n8n

Active

For n8n, this workflow automates the restoration of workflows from GitHub, ensuring that only non-duplicate workflows are created in your n8n environment. By integrating with GitHub, it simplifies the backup recovery process, allowing users to efficiently manage and restore their automated tasks without the risk of overwriting existing workflows.

Workflow Overview

For n8n, this workflow automates the restoration of workflows from GitHub, ensuring that only non-duplicate workflows are created in your n8n environment. By integrating with GitHub, it simplifies the backup recovery process, allowing users to efficiently manage and restore their automated tasks without the risk of overwriting existing workflows.

This workflow is designed for:

  • Developers who need to restore workflows from GitHub to n8n.
  • Project Managers who want to ensure workflow continuity by restoring backups.
  • DevOps Engineers looking to automate the process of managing workflows in n8n.
  • Data Analysts who require consistent and reliable workflows for data processing tasks.

This workflow addresses the issue of restoring workflows that may have been lost or need to be re-imported from GitHub. It automates the process of checking for existing workflows, retrieving them from GitHub, and creating new workflows in n8n only if they do not already exist, thus preventing duplicates.

  1. Manual Trigger: The workflow starts when the user clicks 'execute'.
  2. Set Globals: It sets global variables for the GitHub repository owner, name, and path.
  3. Get All Files from GitHub: It retrieves a list of all workflow files from the specified GitHub repository.
  4. Get Existing Workflows from n8n: It fetches the current workflows in the n8n environment.
  5. Merge Data: The workflow merges the data from GitHub and n8n to identify which workflows do not already exist in n8n.
  6. Check for Existing Workflows: For each workflow, it checks if a workflow with the same name already exists in n8n.
  7. Create New Workflows: If a workflow does not exist, it creates a new workflow in n8n using the content retrieved from GitHub.
  8. Handle Duplicates: If a workflow already exists, it logs this and does not create a duplicate.

Statistics

17
Nodes
0
Downloads
29
Views
13658
File Size

Quick Info

Categories
Complex Workflow
Manual Triggered
+1
Complexity
complex

Tags

manual
advanced
noop
logic
conditional
complex
sticky note
n8n
+1 more