Dev Ops · n8n

Auto-Triage New GitHub Issues with AI Labels and Priority

An n8n workflow that fires on every new GitHub issue, uses Claude to classify it by type, priority and affected area, then applies the right labels and posts a triage summary to Slack — so your backlog stays organized without a maintainer manually sorting each report.

difficulty Intermediatesetup 45 minresult Every new issue arrives already labelled by type, priority and area, with a Slack heads-up for urgent ones
  1. 1

    Receive the new issue

    Add a Webhook node (POST) and register it in your GitHub repo under Settings → Webhooks for the issues event. Filter to action == 'opened' so edits and closes don't re-trigger triage.

  2. 2

    Classify with Claude

    An HTTP Request to Claude sends the issue title and body and asks for strict JSON: type (bug/feature/question/docs), priority (P0–P3), area (a repo component), and is_spam. Provide your label taxonomy in the prompt so it picks from real labels.

  3. 3

    Map the classification to labels

    A Code node turns the JSON into a GitHub labels array — e.g. ['bug','P1','area:api']. It also decides whether to trigger the urgent path based on priority P0/P1.

  4. 4

    Apply labels via the GitHub API

    A GitHub node (or HTTP Request to POST /repos/{owner}/{repo}/issues/{number}/labels) adds the labels to the issue. Because it only adds, existing maintainer labels are preserved.

  5. 5

    Alert on urgent issues

    An IF node checks for P0/P1 and, if urgent, a Slack node pings the maintainers channel with the title, priority and a link. Routine issues stay silent and simply land labelled in the backlog.

Frequently asked questions

How does the workflow receive new issues?

Via a GitHub webhook. In your repo settings, add a webhook for the `issues` event pointing at this workflow's n8n Webhook URL. GitHub then POSTs the full issue payload the instant one is opened — no polling, no API quota concerns.

What if Claude mislabels an issue?

Labels are cheap to change and non-destructive — the workflow only adds labels, it never closes or edits the issue body. Maintainers can relabel manually anytime. To build trust, start by having it only suggest labels in a comment for a week, then switch on auto-apply once you're happy with the accuracy.

Can it detect duplicates or spam?

To a degree — the prompt can flag likely spam or ask Claude to note if the issue resembles a common known problem. For true duplicate detection you'd search existing issues via the GitHub API and pass candidates to Claude. This recipe keeps to triage; duplicate-hunting is a natural add-on branch.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.