Automate Workflow Versioning and Comparison
detail.loadingPreview
Seamlessly track and compare versions of your n8n workflows. This solution automates the process of checking for new, modified, or identical workflow files stored in a Git repository, ensuring you always have the latest insights.
About This Workflow
This n8n workflow provides a robust solution for managing and versioning your n8n workflows within a Git repository. Triggered manually, it first fetches the current state of a workflow from a specified repository. It then compares this fetched workflow against the currently executed workflow. Utilizing a custom JavaScript node, it intelligently determines if the workflow is 'new', 'different', or 'same' based on a deep JSON comparison. Based on this comparison, it can trigger subsequent actions, such as creating a new file in the repository if the workflow is new, or doing nothing if it's identical. This ensures your Git repository accurately reflects your n8n workflow evolution.
Key Features
- Automatic Version Comparison: Intelligently detects if an n8n workflow is new, different, or the same as its repository counterpart.
- GitHub Integration: Leverages GitHub's API to fetch and create workflow files directly.
- Customizable File Paths: Define dynamic file paths for your workflows within the repository.
- Configurable Repository Details: Easily specify repository owner, name, and path.
- Clear Status Indicators: Outputs a clear status ('new', 'different', 'same') for each workflow comparison.
How To Use
- Trigger Node: Initiate the workflow by clicking the 'execute' button on the manual trigger node.
- Configuration: Ensure your
Confignode (assumed to exist and not shown in snippet) is correctly set up withrepo_owner,repo_name, andrepo_path. - Fetch File: The 'Get File' node will attempt to retrieve the existing workflow file from your GitHub repository based on the provided URL.
- Compare Workflows: The 'isDiffOrNew' code node compares the fetched workflow with the currently executed n8n workflow, determining its status ('new', 'different', 'same').
- Branching Logic: The 'Check Status' switch node directs the workflow based on the comparison result.
- Same: The 'Same file - Do nothing' node is executed.
- Different: The 'File is different' node is executed (you can add further actions here).
- New: The 'Create new file' GitHub node is executed, committing the new workflow to your repository.
Apps Used
Workflow JSON
{
"id": "5590be2d-74c6-49d3-a0ac-618b316925bd",
"name": "Automate Workflow Versioning and Comparison",
"nodes": 25,
"category": "DevOps",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 5590be2d-74c6...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Related Workflows
Discover more workflows you might like
Automated PR Merged QA Notifications
Streamline your QA process with this automated workflow that notifies your team upon successful Pull Request merges. Leverage AI and vector stores to enrich notifications and ensure seamless integration into your development pipeline.
Automate Qualys Report Generation and Retrieval
Streamline your Qualys security reporting by automating the generation and retrieval of reports. This workflow ensures timely access to crucial security data without manual intervention.
Visualize Your n8n Workflows: Interactive Dashboard with Mermaid.js
Gain unparalleled visibility into your n8n automation landscape. This workflow transforms your n8n instance into a dynamic, interactive dashboard, leveraging Mermaid.js to visualize all your workflows in one accessible place.