Back to Catalog

Automated workflow backup with intelligent change detection using GitHub

Maksym BrashenkoMaksym Brashenko
654 views
2/3/2026
Official Page

Advanced n8n Workflow Sync with GitHub

A robust workflow to back up and synchronize your n8n workflows to a GitHub repository, with intelligent change detection and support for file renames.

🎯 Who's it for?

This workflow is for n8n administrators, developers, and power users who want a reliable, automated way to:

  • Keep a version-controlled history of their workflows.
  • Collaborate on workflows using GitHub's infrastructure.
  • Prevent data loss and have a disaster recovery plan for their n8n instance.

✨ Key Features (What it does)

  • Intelligent Sync: Backs up all your n8n workflows to a designated GitHub repository.
  • Human-Readable Filenames: Saves workflows with filenames based on their actual names in n8n (e.g., My Awesome Workflow.json).
  • Reliable Matching: Uses the unique n8n workflow ID to reliably track files, even if their names change.
  • Rename Detection: If you rename a workflow in n8n, it intelligently deletes the old file and creates a new one in a single logical operation.
  • Efficient Commits: Commits changes to GitHub only when there are actual modifications to a workflow's logic or structure. It performs a deep comparison, ignoring metadata changes.
  • Clear Commit History: Generates clean, informative commit messages:
    • create: workflowName
    • update: workflowName
    • rename: oldName - newName

βš™οΈ How It Works (Simple Steps)

  1. Get n8n Workflows: The workflow starts by fetching all your current workflows from n8n.
  2. Get GitHub Files: At the same time, it lists all existing workflow files from your GitHub repository.
  3. Compare & Decide: It then compares each n8n workflow with its GitHub counterpart. It checks if anything changed, if it was renamed, or if it's new.
  4. Take Action:
    • If a workflow is new, it's created on GitHub.
    • If a workflow is updated, the file content is changed on GitHub.
    • If a workflow was renamed, the old file is deleted, and a new one is created.
    • If nothing changed, the workflow is skipped.
  5. Send Report: Finally, it can send a summary report to Telegram about what happened.

πŸš€ How to Set Up

  1. Credentials:

    • GitHub: Go to Credentials > New and add your GitHub credentials. You'll need a token with repo permissions.
    • n8n API: In the same Credentials section, create n8n API credentials. You'll need your n8n instance's Base URL and an API key (you can create one in your n8n user settings).
    • Telegram (Optional): If you want notifications, add your Telegram Bot credentials.
  2. Configure the Workflow:

    • Open the Configuration node (the green one at the start).
    • Fill in the following values:
      • repo.owner: Your GitHub username or organization name.
      • repo.name: The name of the repository for backups.
      • repo.path: The folder inside the repository to store workflows (e.g., workflows/).
      • report.tg.chatID (Optional): Your Telegram chat ID for notifications. Set to 0 to disable.
      • report.verbose: Set to true to receive a report even if there were no changes.
  3. Connect Credentials:

    • Select your newly created credentials in the following nodes:
      • Get all workflows: Select your n8n API credentials.
      • All GitHub nodes (e.g., List files, Create new file): Select your GitHub credentials.
      • Send a message (Telegram): Select your Telegram credentials.
  4. Set the Schedule:

    • In the Schedule Trigger node, configure how often you want the backup to run (e.g., every hour, once a day).
  5. Activate the Workflow:

    • Save the workflow and toggle it to "Active".

πŸ”§ How to Customize

  • Change Report Destination: The final part of the workflow sends a report to Telegram. You can easily replace the Send a message node with a node for Slack, Discord, or email to change where notifications go. The message is pre-formatted in the Render summary node.

πŸ’‘ What's Next? (Future Updates)

This workflow is actively maintained! Here's a sneak peek at what's planned for future versions:

  • Automatic Archive Handling: The next major update will introduce logic to automatically detect when a workflow is archived in n8n and move it to a dedicated archived/ folder in your GitHub repository, keeping your main backup directory clean.
  • Performance Optimizations: I'm exploring ways to reduce API traffic by intelligently checking for changes before fetching full workflow data.

To get the latest version with these features when it's released, be sure to follow my profile for new workflow publications!

Automated Workflow Backup with Intelligent Change Detection using GitHub

This n8n workflow provides a robust solution for automatically backing up your n8n workflows to a GitHub repository. It intelligently detects changes in your active workflows and only commits updates when a modification is found, preventing unnecessary commits and providing a clear history of your workflow evolution.

What it does

  1. Schedules Execution: The workflow runs on a predefined schedule (e.g., daily, hourly) to check for changes.
  2. Fetches Active Workflows: It retrieves a list of all currently active n8n workflows.
  3. Loops Through Workflows: Each active workflow is processed individually.
  4. Retrieves Workflow Definition: For each workflow, it fetches its JSON definition.
  5. Prepares File Content: The workflow's JSON is formatted and prepared to be saved as a file.
  6. Checks for Existing File: It attempts to retrieve the existing workflow file from the specified GitHub repository.
  7. Compares Content: The current workflow's JSON content is compared with the content of the file in GitHub.
  8. Conditional Update:
    • If the file does not exist in GitHub, or if the content has changed, it proceeds to update/create the file.
    • If no changes are detected, it skips the update for that specific workflow.
  9. Updates/Creates GitHub File: If a change is detected or the file is new, it creates or updates the workflow's JSON file in the GitHub repository.
  10. Notifies on Error: In case of any errors during the process, it stops and reports the error.
  11. Sends Telegram Notification (Optional): If configured, it can send a Telegram message with details about the updated workflows.

Prerequisites/Requirements

  • n8n Instance: An active n8n instance where this workflow will run.
  • GitHub Account: A GitHub account and a repository where you want to store your workflow backups.
  • GitHub Credential in n8n: A configured GitHub credential in your n8n instance with appropriate permissions to create, read, and update files in your chosen repository.
  • Telegram Bot (Optional): If you wish to receive notifications, a Telegram bot and chat ID are required, along with a Telegram credential in n8n.

Setup/Usage

  1. Import the Workflow:
    • Download the provided JSON file for this workflow.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "Import from JSON" button and paste the workflow JSON or upload the file.
  2. Configure Credentials:
    • GitHub Node (ID: 16):
      • Select or create a new GitHub credential. This credential needs access to the repository where you intend to store your backups.
      • Configure the "Repository" and "Owner" fields to point to your GitHub repository.
    • Telegram Node (ID: 49 - Optional):
      • If you want Telegram notifications, select or create a new Telegram credential.
      • Enter the Chat ID where you want the notifications to be sent.
  3. Adjust Schedule:
    • Schedule Trigger Node (ID: 839):
      • Configure the schedule (e.g., every 1 hour, once a day) according to your backup frequency requirements.
  4. Activate the Workflow:
    • Once configured, activate the workflow by toggling the "Active" switch in the top right corner of the workflow editor.

The workflow will now automatically run on your defined schedule, backing up your active n8n workflows to GitHub with intelligent change detection.

Related Templates

Two-way property repair management system with Google Sheets & Drive

This workflow automates the repair request process between tenants and building managers, keeping all updates organized in a single spreadsheet. It is composed of two coordinated workflows, as two separate triggers are required β€” one for new repair submissions and another for repair updates. A Unique Unit ID that corresponds to individual units is attributed to each request, and timestamps are used to coordinate repair updates with specific requests. General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trigger workflow design in n8n. --- βš™οΈ How It Works Workflow 1 – New Repair Requests Behind the Scenes: A tenant fills out a Google Form (β€œRepair Request Form”), which automatically adds a new row to a linked Google Sheet. Steps: Trigger: Google Sheets rowAdded – runs when a new form entry appears. Extract & Format: Collects all relevant form data (address, unit, urgency, contacts). Generate Unit ID: Creates a standardized identifier (e.g., BUILDING-UNIT) for tracking. Email Notification: Sends the building manager a formatted email summarizing the repair details and including a link to a Repair Update Form (which activates Workflow 2). --- Workflow 2 – Repair Updates Behind the Scenes:\ Triggered when the building manager submits a follow-up form (β€œRepair Update Form”). Steps: Lookup by UUID: Uses the Unit ID from Workflow 1 to find the existing row in the Google Sheet. Conditional Logic: If photos are uploaded: Saves each image to a Google Drive folder, renames files consistently, and adds URLs to the sheet. If no photos: Skips the upload step and processes textual updates only. Merge & Update: Combines new data with existing repair info in the same spreadsheet row β€” enabling a full repair history in one place. --- 🧩 Requirements Google Account (for Forms, Sheets, and Drive) Gmail/email node connected for sending notifications n8n credentials configured for Google API access --- ⚑ Setup Instructions (see more detail in workflow) Import both workflows into n8n, then copy one into a second workflow. Change manual trigger in workflow 2 to a n8n Form node. Connect Google credentials to all nodes. Update spreadsheet and folder IDs in the corresponding nodes. Customize email text, sender name, and form links for your organization. Test each workflow with a sample repair request and a repair update submission. --- πŸ› οΈ Customization Ideas Add Slack or Telegram notifications for urgent repairs. Auto-create folders per building or unit for photo uploads. Generate monthly repair summaries using Google Sheets triggers. Add an AI node to create summaries/extract relevant repair data from repair request that include long submissions.

Matt@VeraisonLabsBy Matt@VeraisonLabs
208

Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API

Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use β€” Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➀ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen

RapiwaBy Rapiwa
183

Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack

πŸ“Š Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. πŸš€πŸ“šπŸ’¬ What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. πŸ“¦ Step 3: Logs release data into Google Sheets for record-keeping and analysis. πŸ“Š Step 4: Retrieves FAQ or documentation data from Notion. πŸ“š Step 5: Merges GitHub and Notion data to calculate documentation drift. πŸ” Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. πŸ”” Key Benefits βœ… Keeps SDK documentation aligned with product releases βœ… Prevents outdated information from reaching users βœ… Provides centralized release tracking in Google Sheets βœ… Sends real-time Slack alerts for overdue updates βœ… Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.

Rahul JoshiBy Rahul Joshi
31