🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

GitHub + Slack, reliable backups with version history

Lisa Granqvist Partner Workflow Automation Expert

You don’t notice backup drift until the day you need a rollback. Then it’s a scramble through old exports, missing files, and “who last changed this?” messages while production keeps moving.

This GitHub Slack backups setup hits DevOps engineers first, but ops-minded agency owners and automation-heavy marketing teams feel it too when workflows are business-critical. The win is simple: a daily, versioned safety net for your n8n workflows, plus a Slack confirmation so you know it actually happened.

Below, you’ll see how the automation runs, what it stores, how it avoids unnecessary commits, and what “reliable backups” looks like when auditors (or incidents) show up.

How This Automation Works

See how this solves the problem:

n8n Workflow Template: GitHub + Slack, reliable backups with version history

The Challenge: Backups That Exist, But Can’t Be Trusted

Exporting n8n workflows “when you remember” sounds fine until reality hits. Someone tweaks a credential reference, changes a filter, or edits a webhook path to ship a quick fix, and suddenly the version in production is not the version you thought you had saved. Now add turnover, multiple environments, and a few dozen workflows that evolve weekly. The manual process breaks down because it relies on perfect habits, and nobody has those on a busy Tuesday.

It adds up fast. And the pain usually shows up in the worst moment possible.

  • Manual exports get skipped, so your “latest backup” is often weeks old.
  • Files end up scattered across Google Drive folders, desktops, and old tickets, which makes audits annoying and rollbacks risky.
  • People overwrite exports with vague names like “workflows-final.json,” and nobody can confidently explain what changed.
  • You only find out the backup failed when you need it, because there’s no completion signal in Slack.

The Fix: Daily n8n Workflow Backups to GitHub + Slack Proof

This workflow runs on a daily schedule and automatically backs up every workflow from your n8n instance into a GitHub repository as individual .json files. It first pulls the workflow list from n8n, then narrows the scope to the ones that matter (for example, recently updated workflows) so you’re not doing busywork commits. For each workflow, it checks whether a file already exists in GitHub and compares content so it only updates when something actually changed. At the end, you can get a Slack completion message that acts like a receipt: backups ran, and you can click into GitHub to confirm the history is there.

The workflow starts with a scheduled trigger, then reads your repository settings (owner, repo name, and the folder path you want). It loops through workflows in batches to stay memory-friendly, checks GitHub for an existing file, and then creates or updates the file based on change detection. Finally, Slack posts a “done” message so you’re not guessing.

What Changes: Before vs. After

Real-World Impact

Say your team maintains 40 n8n workflows and does a “manual export day” once a week. Even if exporting, naming, and uploading each file only takes about 3 minutes, that’s roughly 2 hours of repetitive work, plus context switching. With this automation, the daily trigger kicks off in the background, loops through batches, and commits only real changes; your hands-on time is closer to 10 minutes to set it up and spot-check. After that, you just see the Slack confirmation and move on.

Requirements

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • GitHub to store versioned workflow JSON backups.
  • Slack to send optional start and completion confirmations.
  • GitHub token (create it in GitHub Developer Settings).

Skill level: Intermediate. You’ll paste credentials, set a repo path, and be comfortable testing a run once.

Need help implementing this? Talk to an automation expert (free 15-minute consultation).

The Workflow Flow

A daily schedule starts the run. The workflow triggers every 24 hours, and (optionally) posts a quick Slack “starting backup” message so the run is visible.

Repository settings are loaded early. A configuration step sets the GitHub repo owner, repo name, and the folder path (repo_path) so files land in a clean, predictable structure.

n8n workflows are fetched and filtered. The automation retrieves your workflow list from n8n, then filters to focus on items that need attention (like recently updated workflows). Less noise means a more useful Git history.

Each workflow is processed in batches, then compared against GitHub. It loops over workflows in chunks to avoid memory spikes, checks if the corresponding JSON file exists in GitHub, and pulls file content when needed (via HTTP request) so it can detect changes reliably.

GitHub is updated, and Slack gets the receipt. Based on the comparison, it either creates a new JSON file or updates the existing one. When the loop finishes, Slack can post a completion alert so you know backups are current.

You can easily modify the filter logic to back up everything daily, or only workflows changed in the last day, based on your needs. See the full implementation guide below for customization options.

Step-by-Step Implementation Guide

Step 1: Configure the Scheduled Trigger

Set the schedule that kicks off the backup process and optionally notify your team at the start.

  1. Add and open Scheduled Run Trigger to define when the backup should run.
  2. Set your desired interval inside Scheduled Run Trigger (use your preferred schedule options).
  3. In Slack Start Alert, set Text to =Information_source: Starting Workflow Backup [{{ $execution.id }}].
  4. Credential Required: Connect your slackApi credentials in Slack Start Alert.

If you want start notifications, ensure Slack Start Alert is enabled (it is disabled in the template).

Step 2: Connect GitHub

Configure repository settings and connect GitHub so files can be created or updated.

  1. Open Repository Settings and set repo_owner to your GitHub username or organization (currently blank).
  2. Set repo_name to n8n-workflows and sub_path to folder (or your desired backup folder).
  3. Credential Required: Connect your githubApi credentials in Fetch Repo File, Update Repo File, and Create Repo File.

⚠️ Common Pitfall: Leaving repo_owner blank will cause GitHub file operations to fail.

Step 3: Set Up Workflow Retrieval and Batching

Pull workflow data from n8n, filter by recent updates, and iterate through each workflow.

  1. In Retrieve Workflow List, connect to your n8n instance. Credential Required: Connect your n8nApi credentials.
  2. In Filter Recent Updates, keep the condition values as ={{ $json.updatedAt }} and ={{ $now.minus(1, 'days') }} to filter workflows updated in the last day.
  3. Use Iterate Workflow Batch to process the filtered workflows in batches (default options are fine).

Iterate Workflow Batch outputs to Slack Completion Alert and to both Fetch Repo File and Combine Sources in parallel.

Step 4: Configure Change Detection and Routing

Pull any existing repository file, merge it with the current workflow, and decide if it should be created, updated, or skipped.

  1. In Fetch Repo File, set File Path to ={{ $('Repository Settings').item.json.sub_path }}/{{$('Iterate Workflow Batch').item.json.name}}.json.
  2. In Check File Size, keep the conditions that check ={{ $json.content }} is empty and ={{ $json.error }} does not exist.
  3. In Download File Content, set URL to ={{ $json.download_url }}.
  4. Leave Combine Sources and Detect Changes as-is to merge inputs and compare JSON content.
  5. In Route by Status, keep the output keys Different, New, and Same using ={{$json.github_status}} comparisons.

Check File Size outputs to both Download File Content and Combine Sources in parallel to handle existing vs. new files.

Step 5: Configure Output and Notifications

Write updates to GitHub and send a completion message after all workflows are processed.

  1. In Update Repo File, set File Content to ={{$('Detect Changes').item.json["n8n_data_stringy"]}} and Commit Message to ={{$('Iterate Workflow Batch').item.json.name}} ({{$json.github_status}}).
  2. In Create Repo File, set File Content to ={{$('Detect Changes').item.json["n8n_data_stringy"]}} and Commit Message to ={{$('Iterate Workflow Batch').item.json.name}} ({{$json.github_status}}).
  3. In Finalize Output, set Done to true.
  4. In Slack Completion Alert, keep Text as =✅ Backup has completed - {{ $('Retrieve Workflow List').all().length }} workflows have been processed..
  5. Credential Required: Connect your slackApi credentials in Slack Completion Alert.

If you want completion notifications, enable Slack Completion Alert (it is disabled in the template).

Step 6: Test and Activate Your Workflow

Run a controlled test to confirm GitHub backups and Slack alerts behave as expected.

  1. Click Execute Workflow to run the workflow manually.
  2. Confirm that Retrieve Workflow List returns workflow items and Detect Changes sets github_status values.
  3. Verify GitHub commits were created or updated by Update Repo File or Create Repo File.
  4. If Slack alerts are enabled, check that Slack Start Alert and Slack Completion Alert post messages.
  5. Turn on the workflow with the Active toggle to begin scheduled backups.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Watch Out For

  • GitHub credentials can expire or need specific permissions. If things break, check your GitHub Personal Access Token scopes and repo access first.
  • If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
  • Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.

Common Questions

How quickly can I implement this GitHub Slack backups automation?

About 30 minutes if your GitHub repo and tokens are ready.

Can non-technical teams implement this backups solution?

Yes, but expect a little setup friction the first time. You’ll mostly be copying credentials and choosing a repo folder path.

Is n8n free to use for this GitHub Slack backups workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in GitHub and Slack (usually $0 unless you’re on paid org plans).

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

How do I adapt this GitHub Slack backups solution to my specific challenges?

You can. Most customizations happen in the filtering and routing parts of the flow: adjust the “Filter Recent Updates” logic to back up everything (or only certain tags), and tweak “Route by Status” to force creates, force updates, or skip unchanged files. Some teams also change the folder structure in the repository settings so each environment (prod vs. staging) gets its own repo_path. If you want approvals, switch the GitHub update action to create a branch and open a PR instead.

Why is my GitHub connection failing in this workflow?

Usually it’s an expired or under-scoped token. Regenerate your GitHub Personal Access Token, confirm it can read and write to the target repo, then update the credential in n8n. If it fails only on larger repos, check rate limiting and make sure the repo owner/repo name values in the settings step match exactly.

What’s the capacity of this GitHub Slack backups solution?

For most small teams, it’s effectively “as many workflows as you have,” because it processes them in batches and only commits changes. On n8n Cloud Starter you’re limited by monthly executions, while self-hosting has no execution cap (your server resources decide). In practice, backing up dozens of workflows daily is normal; if you have hundreds, keep the filter, keep batching, and run it during off-peak hours.

Is this GitHub Slack backups automation better than using Zapier or Make?

Often, yes, because this is not a simple two-step zap. You need looping, conditional branching, file existence checks, and change detection, and n8n handles that without turning every edge case into a separate paid task. Self-hosting also matters here, since backups should keep running even when you’re trying to minimize per-run costs. Zapier or Make can work if you only back up a handful of items and never need branching. If you’re unsure, Talk to an automation expert and describe your volume and compliance needs.

Once this is in place, backups stop being a chore and start being infrastructure. You get clean history in GitHub, a simple Slack receipt, and a much calmer rollback story.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Launch login modal Launch register modal