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.
- 1
Receive the new issue
Add a
Webhooknode (POST) and register it in your GitHub repo under Settings → Webhooks for theissuesevent. Filter toaction == 'opened'so edits and closes don't re-trigger triage. - 2
Classify with Claude
An
HTTP Requestto Claude sends the issue title and body and asks for strict JSON:type(bug/feature/question/docs),priority(P0–P3),area(a repo component), andis_spam. Provide your label taxonomy in the prompt so it picks from real labels. - 3
Map the classification to labels
A
Codenode 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
Apply labels via the GitHub API
A
GitHubnode (or HTTP Request toPOST /repos/{owner}/{repo}/issues/{number}/labels) adds the labels to the issue. Because it only adds, existing maintainer labels are preserved. - 5
Alert on urgent issues
An
IFnode checks for P0/P1 and, if urgent, aSlacknode 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.