This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n. Title: n8n Credentials and Workflows Backup on Change Detection Purpose: Never lose track of your n8n changes again! This workflow smartly backs up all your workflows and credentials, automatically detects any changes using hash comparison, and pushes updates to GitHub—but only when something has actually changed. Set your own interval and stop cluttering your repo with redundant commits.

This n8n workflow template uses community nodes and is only compatible with the self-hosted version of n8n. Title: n8n Credentials and Workflows Backup on Change Detection Purpose: Never lose track of your n8n changes again! This workflow smartly backs up all your workflows and credentials, automatically detects any changes using hash comparison, and pushes updates to GitHub—but only when something has actually changed. Set your own interval and stop cluttering your repo with redundant commits. Walkthrough Video on YouTube --- Trigger: Schedule Trigger: Executes the entire process at a user-defined interval. No need to worry about traceability or managing countless backups, as the workflow only commits changes when a difference is detected. --- Workflow Backup Process: 1. Set Workflow Path: Defines the local backup file path for workflows. 2. Get Old Workflow Hash: Executes a helper workflow to retrieve the previous hash. 3. Execute Workflow Backup: Runs n8n export:workflow to export all workflows to the defined file path. 4. Get New Workflow Hash: Executes a helper workflow to generate the new hash from the exported file. 5. Compare Hashes (If Workflow Updated): Checks if the new hash differs from the old one. 6. If Updated: Read Workflow Data → Extract Text → Push to GitHub: Reads, extracts, and commits the updated workflow JSON to GitHub under a timestamped filename. --- Credential Backup Process: 1. Set Credential Path: Defines the local backup file path for credentials. 2. Get Old Credential Hash: Executes a helper workflow to retrieve the previous hash. 3. Execute Credential Backup: Runs n8n export:credentials to export all credentials. 4. Get New Credential Hash: Executes a helper workflow to generate the new hash from the exported file. 5. Compare Hashes (If Credential Updated): Checks for changes. 6. If Updated: Read Credential Data → Extract Text → Push to GitHub: Commits the new credentials JSON to GitHub if changes are found. --- Hash Generator (Helper Flow): Used in both workflow and credential backup paths: Read File → Extract Text → Hash Data Outputs SHA-256 hash used for comparison --- GitHub Integration: Commits are created with ISO timestamp in the filename and message. Repository: File paths: backups/WorkFlow Backup -timestamp-.json and backups/Credential Backup -timestamp-.json --- Change Detection Logic: Only commits files when hash changes are detected (i.e., actual content change). Avoids unnecessary GitHub commits and storage use. Error Handling: GitHub nodes are set to continue workflow execution on error, avoiding full process interruption.
Download the workflow JSON file after purchase.
Open n8n → click the menu → Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.