Send Stale GitHub PR Alerts

OpenAIGitHubSlack

Scan open GitHub pull requests every 4 hours and send a ranked Slack alert for any PRs inactive for over 24 hours to clear engineering bottlenecks.

GitHubSlackCode ReviewEngineering

What It Does

Runs every 4 hours and checks all open pull requests across your GitHub repositories. Any PR with no activity (no commits, comments, or reviews) for more than 24 hours gets flagged. The team receives a Slack alert with a ranked list of stale PRs and direct links. When all PRs are active, it sends a single All Clear message instead to prevent notification fatigue.

How It Works

  1. Scheduled Trigger fires every 4 hours (using the cron schedule 0 */4 * * *).
  2. GitHub Node lists all open pull requests across every repository the authenticated user has access to. It retrieves the title, author, repository name, created time, last updated time, and PR URL.
  3. AI Agent calculates how long each PR has been inactive. It separates stale PRs (24h+ without activity) from recently active ones and generates a Slack message in mrkdwn format featuring ranked action items and direct PR links.
  4. Slack Node posts the alert to your designated code review channel.

What You Get

  1. Slack alerts up to 6 times a day featuring a stale PR list and direct links.
  2. An "All Clear" message when nothing needs attention so the channel stays quiet.
  3. A ranked action list so the team knows exactly which PR to tackle first.
  4. The exact hours since the last activity displayed for each stale PR.

Who It Is For

  1. Engineering teams where PRs frequently sit unreviewed for days.
  2. Tech leads who want automated review hygiene without daily nagging.
  3. Remote and async teams where time zones create natural review gaps.
  4. Any team that consistently loses sprint points to review bottlenecks.

Setup

  1. Connect your GitHub account (requires repository read access).
  2. Connect your Slack account and select the channel to post PR alerts to.
  3. Publish the workflow to start running it automatically every 4 hours.

Customize It

ConfigurationInstructions
Stale ThresholdChange the threshold from 24h to 12h or 48h by editing the rules in the AI Agent prompt.
Repo FiltersRestrict alerts to specific repositories by adding an explicit filter instruction in the prompt.
Alert FrequencyChange the posting frequency from 4 hours to 8 hours by editing the cron schedule in the trigger node.

Timezone Note

The trigger fires based on UTC time. The */4 pattern runs every 4 hours starting at midnight UTC. You can adjust the expression to 0 2,6,10,14,18,22 * * * to shift the windows so they align perfectly with your team's working hours.

Built By

Shamanth Kumar M Staff Technical Program Manager with 14+ years in engineering delivery. I build intelligent automation systems that replace manual work, from sprint tracking to DevOps pipelines to delivery health dashboards.

Want to showcase your own workflows?

Become a Needle workflow partner and turn your expertise into recurring revenue.

Try Needle today

Streamline AI productivity at your company today

Join thousands of people who have transformed their workflows.

Agentic workflowsAutomations, meet AI agents
AI SearchAll your data, searchable
Chat widgetsDrop-in widget for your website
Developer APIMake your app talk to Needle
    Needle LogoNeedle
    Like many websites, we use cookies to enhance your experience, analyze site traffic and deliver personalized content while you are here. By clicking "Accept", you are giving us your consent to use cookies in this way. Read our more on our cookie policy .