ManualTrigger Automate

ManualTrigger Automate streamlines your workflow by automating tasks on a daily schedule at 20:00, integrating seamlessly with GitHub to manage files. It efficiently checks for changes, creating or editing files as needed, ensuring your projects stay up-to-date with minimal effort. This automation enhances productivity and reduces manual errors, making it ideal for teams looking to maintain consistent workflow backups.

7/8/2025
16 nodes
Complex
schedulecomplexgithubnoopsplitinbatchesautomationadvancedcodecustomapiintegrationlogicrouting
Categories:
Schedule TriggeredComplex WorkflowTechnical Infrastructure & DevOps
Integrations:
GitHubNoOpSplitInBatches

Target Audience

This workflow is ideal for:
- Developers who want to automate the backup of their GitHub workflows.
- DevOps Engineers looking for a reliable way to synchronize workflow changes with a version control system.
- Project Managers needing to ensure that workflow documentation is up-to-date and accessible.
- Teams that collaborate on workflows and need a structured method to track changes and updates.

Problem Solved

This workflow addresses the challenge of maintaining up-to-date backups of n8n workflows in GitHub. It ensures that:
- Workflow changes are automatically detected and compared against existing backups.
- New workflows are created if they do not exist in the repository.
- Updates to existing workflows are handled efficiently, minimizing the risk of data loss.

Workflow Steps

  • Triggering the Workflow: The workflow is initiated either manually or on a schedule (Daily @ 20:00).
    2. Setting Global Variables: It sets up global variables for GitHub repository details (owner, name, and path).
    3. Fetching Existing Workflows: It retrieves existing workflows from the n8n instance.
    4. Processing Workflow Data: The data is transformed into an array for further processing.
    5. Splitting Data into Batches: The workflow splits the data into manageable batches for processing one at a time.
    6. Comparing Workflows: For each workflow, it checks if it exists in GitHub and compares the content to detect differences.
    7. Determining Status: Based on the comparison, it categorizes the workflow as 'same', 'different', or 'new'.
    8. Handling Workflow Updates: If the workflow is different, it updates the existing file; if it's new, it creates a new file in the repository.
    9. Logging Results: The workflow logs the status of each operation for tracking purposes.
  • Customization Guide

    Users can customize this workflow by:
    - Modifying Schedule: Adjust the cron trigger to fit specific backup needs (e.g., changing the time to run daily).
    - Changing Repository Details: Update the global variables to point to different GitHub repositories or paths.
    - Editing the Comparison Logic: Modify the isDiffOrNew function to change how workflows are compared, such as ignoring certain fields.
    - Adding Notifications: Integrate notification nodes to alert team members when backups occur or if issues arise during the process.