This n8n workflow automates the process of restoring workflows from a GitHub repository into your n8n environment, ensuring seamless synchronization without duplicates. It is triggered manually and interacts with GitHub and n8n API nodes to list, fetch, and create workflows.
The process begins by setting global variables for the GitHub repository details such as owner, repository name, and file path. When activated via a manual trigger, the workflow fetches the list of files from a specified GitHub directory representing your workflow backups.
It then retrieves all existing workflows in your n8n instance and compares these with the files fetched from GitHub. Using a merge operation, it filters out workflows that already exist in n8n based on their names to avoid duplication.
For each new workflow identified in GitHub, the workflow retrieves its content, decodes it from base64, and then creates a new workflow in n8n with this content. Sticky notes are added throughout the workflow to describe each step for easier understanding and management.
This setup is useful for maintaining up-to-date workflows in n8n, especially when managing backups and updates via GitHub, ensuring a smooth integration and version control system.
Reviews
There are no reviews yet.