Field SOP
Field SOP

GitHub Issue Auto-Triage Workflow Template: Webhook + LLM Classification + Labeling (Downloadable)

When open-source issues pile up, manual triage is a disaster. This n8n workflow listens to a GitHub webhook, LLM judges type (bug/feature/docs/question) and priority (P0-P3), calls GitHub API to label, then notifies a channel. With .json template, classification prompt, and three pitfalls.

Published July 26, 20264 min read
<!-- workflow-github-issue-triage | resource | GitHub Issue Auto-Triage Workflow Template -->

When open-source issues pile up, manual triage is a disaster. This n8n workflow template listens to a GitHub webhook, uses an LLM to label new issues, judge priority, and notify a channel. Maintainers and teams save hours of triage.

Workflow Chain

GitHub webhook trigger -> extract issue title and body -> LLM classifies (bug/feature/docs/question + priority) -> call GitHub API to add labels -> notify channel.

Download Template

Setup Steps

  1. Import: n8n -> Workflows -> Import from File, pick github-issue-triage.json
  2. Webhook node: set a POST path; in GitHub repo Settings -> Webhooks, point to your n8n public URL, trigger on Issues
  3. LLM node: fill API key; the prompt makes the model output JSON (type + priority + reason)
  4. GitHub API node: fill a Personal Access Token (needs repo scope); use PATCH /repos/:owner/:repo/issues/:number to add labels
  5. Notify node: Feishu/DingTalk/Slack webhook
  6. Test run: open a test issue, watch the labels appear

Companion Prompt (LLM Classification)

Prompt
You are a project maintainer. Classify this GitHub issue's type and priority, output JSON only:
- type: bug | feature | documentation | question
- priority: P0 (blocker/data loss) | P1 (major feature broken) | P2 (minor) | P3 (enhancement/question)
- reason: one-sentence basis
Basis: title + body. Empty body or "doesn't work" with no repro steps starts at P2 minimum.
Issue title: {{title}}
Issue body: {{body}}

Pitfalls

  • LLM returns non-JSON: stress "JSON only" at the end of the prompt; add a parse-retry + fallback branch in n8n (default needs-triage label)
  • GitHub API rate limits: authenticate with a token-unauthenticated is 60/hr, nowhere near enough; adding labels is PATCH not POST
  • Webhook security: verify GitHub's X-Hub-Signature-256-don't let any random request trigger your workflow

This article is AI-assisted and human-edited. Last updated: 2026-07-26

Related