JUHE API Marketplace

ManualTrigger Automate

Active

For n8n, this automated workflow backs up all instance workflows to GitHub every 24 hours, organizing files into a structured `YYYY/MM/` directory path and naming them `ID.json`. It efficiently processes multiple workflows, reducing memory usage by calling itself, and provides real-time notifications via Slack upon completion or failure, ensuring seamless workflow management and data integrity.

Workflow Overview

For n8n, this automated workflow backs up all instance workflows to GitHub every 24 hours, organizing files into a structured `YYYY/MM/` directory path and naming them `ID.json`. It efficiently processes multiple workflows, reducing memory usage by calling itself, and provides real-time notifications via Slack upon completion or failure, ensuring seamless workflow management and data integrity.

This workflow is designed for:

  • Developers: Who need to automate the backup of workflows to GitHub, ensuring version control and easy access.
  • Project Managers: Looking to maintain a reliable backup of project workflows to avoid data loss.
  • Teams: Collaborating on multiple workflows and requiring a systematic way to track changes and updates in GitHub.
  • Automation Enthusiasts: Interested in leveraging n8n for seamless integration with GitHub and Slack for notifications.

This workflow addresses the issue of workflow backup management by:

  • Automating the backup process of n8n workflows to GitHub, ensuring that all changes are recorded and accessible.
  • Reducing the risk of data loss by maintaining a versioned history of workflows.
  • Providing notifications via Slack to keep team members informed about the backup status, including successes and failures.
  1. Schedule Trigger: The workflow is triggered on a daily schedule at 1:33 AM.
  2. Starting Message: It sends an initial notification to a Slack channel indicating the start of the backup process.
  3. Loop Over Items: Iterates through all workflows in the n8n instance, processing each one individually.
  4. Get File Data: Attempts to retrieve the existing backup file from GitHub for each workflow.
  5. If File Too Large: Checks if the file size is manageable before proceeding to download.
  6. Merge Items: Combines the data from the retrieved file and the current workflow for comparison.
  7. isDiffOrNew: Determines if the workflow has changed compared to the last backup or if it’s a new workflow.
  8. Check Status: Evaluates the status of the workflow (same, different, or new) and routes accordingly:
    • Same file: Does nothing.
    • File is different: Edits the existing file in GitHub.
    • File is new: Creates a new file in GitHub.
  9. Create/Edit File: Depending on the status, either creates a new file or edits an existing one in GitHub.
  10. Completed Notification: Sends a final notification to Slack indicating the number of workflows processed.
  11. Failed Flows: Notifies the team in Slack if any workflow backup fails during the process.

Statistics

26
Nodes
0
Downloads
22
Views
13123
File Size

Quick Info

Categories
Communication & Messaging
Schedule Triggered
+3
Complexity
complex

Tags

advanced
api
integration
noop
logic
conditional
complex
sticky note
+13 more

Boost your workflows with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more. Free trial.