ManualTrigger Automate

Automate backups to GitHub with the ManualTrigger Automate workflow, running every 2 hours. This workflow efficiently checks for changes in your instance workflows, creating or updating files as needed, ensuring your data is always secure and up-to-date.

7/8/2025
23 nodes
Complex
schedulecomplexsticky noten8nnoopgithubsplitinbatchesschedule triggerexecuteworkflowtriggerexecuteworkflowautomationadvancedapiintegrationlogicconditionalroutingcron
Categories:
Schedule TriggeredComplex WorkflowTechnical Infrastructure & DevOpsBusiness Process Automation
Integrations:
Sticky NoteN8nNoOpGitHubSplitInBatchesSchedule TriggerExecuteWorkflowTriggerExecuteWorkflow

Target Audience

Who should use this workflow


- Developers looking to automate backups of their workflows to GitHub.
- Project Managers who want to ensure that their workflows are regularly saved and versioned.
- Teams that require a reliable method to track changes in their automation scripts.
- GitHub Users who manage multiple workflows and need an efficient way to maintain them.

Problem Solved

What problem does this workflow solve


- Automates the backup of n8n workflows to GitHub, ensuring that no changes are lost and previous versions can be accessed.
- Reduces the risk of manual errors associated with saving files, providing a systematic approach to version control.
- Helps in maintaining a history of workflow changes, making it easier to revert to previous versions if needed.

Workflow Steps

Detailed explanation of the workflow process


1. Trigger: The workflow can be triggered manually or scheduled to run every 2 hours.
2. Get File Data: It retrieves the existing workflow data from GitHub using the provided repository details.
3. Check File Size: It checks if the file is too large or if there are errors in the retrieval process.
4. Merge Items: Combines retrieved data with new workflow data for comparison.
5. Compare Workflows: A JavaScript function determines if the retrieved workflow is the same, different, or new.
6. Conditional Logic: Based on the comparison, the workflow will either do nothing, create a new file, or edit an existing file on GitHub.
7. File Operations: If the file is new, it creates a new file in the specified GitHub repository. If the file is different, it edits the existing file with the updated content.
8. Return Status: Finally, it returns a status indicating the success of the operation.

Customization Guide

How users can customize and adapt this workflow


- Update the Globals node to set your GitHub username, repository name, and path where the workflows will be saved.
- Adjust the schedule trigger parameters to change how often the workflow runs (e.g., every 1 hour instead of 2 hours).
- Modify the commit message format in the GitHub nodes to reflect your preferred style or include additional information.
- Enhance the JavaScript code in the isDiffOrNew node to add more complex comparison logic if needed.
ManualTrigger Automate - N8N Workflow Directory