# n8n: GitHub Issue → Linear Ticket with AI Enrichment

> Turn inbound GitHub issues into fully-formed Linear tickets, enriched with priority, team assignment, and a suggested acceptance-criteria list.

**Platform:** n8n  
**Category:** n8n  
**Difficulty:** Intermediate  
**Tags:** n8n, github, linear, openai  
**Updated:** 2026-06-23  
**Source:** https://promptfoo.tech/workflows/n8n-github-issue-to-linear

## Overview
Open-source projects and shared internal repos drown in issues that need triage. This n8n workflow catches every new issue, classifies it, drafts acceptance criteria, and creates a Linear ticket in the right team with the right priority — leaving the human to approve, not to type.

## How it works
1. GitHub webhook on issues.opened → n8n.
2. GPT-4o-mini classifies: bug/feature/question, area, priority.
3. Prompt generates acceptance criteria if it's a bug or feature.
4. Linear GraphQL mutation creates the issue in the mapped team with labels.
5. n8n posts back a comment on the GitHub issue linking the Linear ticket.

## Benefits
- Every issue lands in Linear the same day, formatted the same way.
- Reporter sees an acknowledgement + link within a minute.
- Triage meetings shorten by 60%.

## Use cases
- OSS maintainers with high issue volume.
- Internal platform teams whose customers are other engineers.
- Product teams using GitHub for public roadmap and Linear internally.

## Step-by-step
### Step 1: Configure the GitHub webhook
Repo settings → Webhooks → issues event. Send to n8n with a signing secret.

### Step 2: Verify the HMAC signature
Function node validates x-hub-signature-256. Reject on mismatch.

### Step 3: Classify with a small model
GPT-4o-mini with tool-choice=required and a strict JSON schema (type, area, priority, ac[]).

### Step 4: Create the Linear issue
GraphQL createIssue mutation. Map area→team via a lookup table stored in n8n static data.

### Step 5: Comment back on GitHub
'Tracking internally as LIN-1234'. Close-loop transparency for external reporters.

### Step 6: Audit weekly
Sample 20 tickets, grade classification accuracy. Update the prompt with new areas as products evolve.

## Example
```
Issue: 'Crash on iPad Safari when uploading > 5MB' → type:bug, area:uploads, priority:high, ac:['Reproduce on iPadOS 17 Safari','Confirm 413 vs client-side crash','Fix + add e2e test'].
```

## FAQs
**Why not GitHub Actions?**

Actions can do this but n8n's UI + retries + auth management make it faster to maintain when the flow grows tentacles.

**How do I handle spam?**

Add a pre-filter: reject issues from new accounts with < 2 karma unless a maintainer labels them 'valid'.

**Cost?**

About $0.001 per issue on GPT-4o-mini. Free tier of n8n Cloud handles low volume.

---
Licensed under CC-BY-4.0. Attribution: PromptFoo.tech