AutomationMart
Home/Browse/Report and clean up stale GitHub branches with Slack notifications
n8n

Report and clean up stale GitHub branches with Slack notifications

n8nn8n14 modulesv1.0
SlackGitHub

Quick Overview This workflow runs weekly (or manually) to scan GitHub repositories for merged-but-not-deleted and stale branches, then posts a cleanup report to Slack and can optionally auto-delete a capped number of branches. How it works 1. Runs on a weekly schedule or when you manually execute the workflow. 2. Loads configuration for the GitHub repo owner, repository list, stale age threshold, protected branch patterns, Slack channel, and deletion limits. 3. For each configured repository, fe

At a glance

Report and clean up stale GitHub branches with Slack notifications is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Slack, GitHub. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Slack, GitHub
Modules
14
Price
Free
Version
v1.0
Report and clean up stale GitHub branches with Slack notifications workflow diagram

About this workflow

Quick Overview This workflow runs weekly (or manually) to scan GitHub repositories for merged-but-not-deleted and stale branches, then posts a cleanup report to Slack and can optionally auto-delete a capped number of branches. How it works 1. Runs on a weekly schedule or when you manually execute the workflow. 2. Loads configuration for the GitHub repo owner, repository list, stale age threshold, protected branch patterns, Slack channel, and deletion limits. 3. For each configured repository, fetches all branches via the GitHub GraphQL API and fetches recently merged pull requests via the GitHub REST API. 4. Classifies branches as protected (skipped), merged-but-not-deleted, or stale based on last commit date and the configured stale-days threshold. 5. If auto-delete is enabled, deletes up to the configured maximum number of candidate branches in GitHub and compiles a success/failure summary. 6. Formats and posts the cleanup report to Slack, and if deletions ran, posts a second Slack message with the deletion results. Setup 1. Create and add GitHub credentials (fine-grained token or PAT) with access to list branches/PRs and permission to delete branches if you enable auto-delete. 2. Create and add a Slack credential with permission to post messages (chat:write) and set the target channel in the configuration. 3. Update the configuration values for repo owner, comma-separated repo list, staleDays, protectedBranches, reportOnly, and maxBranchesToDelete before activating the workflow.

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n → click the menu → Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Add new GetResponse contacts to Zoho CRM (if the contact already exists in Zoho CRM, send a message in Slack instead of adding the contact to Zoho CRM)

Every time a new contact is added to GetResponse CRM, Make will automatically check if the contact already exists in Zoho CRM. If not, it will create a new contact in Zoho CRM. If yes, Make will automatically send a message in Slack.

Free

Send Slack for new mail campaign in CleverReach

Every time a new campaign is created in CleverReach, Make will automatically send a message in Slack with details.

Free

Create script-to-video avatar videos with GPT-4.1-mini, HeyGen, Google Drive, Gmail and Slack

Description This workflow automates the entire process of taking a raw user-submitted script, rewriting it into a polished HeyGen-ready narration, generating a full avatar video, handling all processing checks, retrieving the final MP4, uploading it to Google Drive, and notifying the user through email and Slack. It turns an unstructured script into a complete, ready-to-share video package without any manual intervention. The system rewrites scripts into structured sections (intro → narrati

Free

Create a Revolut Business draft payment and send a Slack notification from a new WooCommerce order

Use this template to create a Revolut draft payment to a supplier and send a Slack notification once a WooCommerce order is created. The setup of the template assumes you have your supplier data stored in an Airtable table. Your table has to include these fields: Name of the supplier (First name and Last name if the supplier is an individual), WooCommerce product ID, Price you pay for the product to the supplier and payment details. To see which details are required to create a Revolut draft

Free

Cold outreach automation: Scrape local leads with Dumpling AI & call via Vapi

Who is this for? This template is for sales teams, agencies, or local service providers who want to quickly generate cold outreach lists and automatically call local businesses with a Vapi AI assistant. It’s perfect for automating cold calls from scraped local listings with no manual dialing or research. --- What problem is this workflow solving? Finding leads and initiating outreach calls can be time-consuming. This workflow automates the process: it scrapes business listings from Google Maps u

Free

Send Slack messages for new Harvest invoices

Every time a new invoice is created in Harvest, Make will automatically send a message in Slack.

Free

Generate weekly supply chain OTIF reports and AI analysis with Notion and GPT-4o

Tags: Logistics, Supply Chain, OTIF, KPI Tracking, Performance Management, AI Analysis, Notion Context Hi! I'm Samir, Supply Chain Engineer, Data Scientist based in Paris, and founder of LogiGreen. > Let's use AI with n8n to automate supply chain performance tracking! Tracking On-Time In-Full (OTIF) delivery performance is critical for retail logistics, but manually compiling data, computing KPIs, and writing analysis reports is time-consuming and error-prone. []( This workflow automates the

Free

Import products from Google Sheets to Shopify with multi-variant support

Short Description (for listing) Import products from Google Sheets to Shopify with automatic handling of single products and multi-variant products (sizes, colors, etc.). Includes SKU management, inventory tracking, and image uploads via GraphQL API. Category - E-commerce - Productivity - Data Import/Export Full Description Overview This workflow automates the process of importing products from a Google Sheet into your Shopify store. It intelligently detects and handles both simp

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint — instant download
  • Setup guide PDF included
  • 5 downloads · valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

₹2,499/ session
3 hrs · video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free