Linear + OpenAI: issues routed to the right team
Issue triage sounds simple until it isn’t. Tickets pile up, people guess the “right” team, and you end up with slow handoffs and a backlog that feels messier every day.
If you run support or ops, you’ve seen this pain up close. Product managers feel it when important feedback lands in the wrong queue. Engineering leads feel it when bugs bounce around for hours. This Linear issue routing automation fixes the routing problem at the source.
You’ll set up an n8n workflow that watches new or updated Linear issues, uses OpenAI to classify them, then assigns the ticket to the right team automatically. No babysitting. No “who owns this?” messages.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Linear + OpenAI: issues routed to the right team
flowchart LR
subgraph sg0["🔔 Linear Flow"]
direction LR
n0@{ icon: "mdi:swap-horizontal", form: "rounded", label: "📋 Filter New Issues Only", pos: "b", h: 48 }
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>🔔 Linear Trigger"]
n2@{ icon: "mdi:swap-horizontal", form: "rounded", label: "⚖️ If (Create or Update)", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "🤖 AI Agent (Bug Classifier)", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-horizontal", form: "rounded", label: "🔀 Engineering Router", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "🔀 Product Router", pos: "b", h: 48 }
n6@{ icon: "mdi:swap-horizontal", form: "rounded", label: "🔀 Design Router", pos: "b", h: 48 }
n7@{ icon: "mdi:swap-horizontal", form: "rounded", label: "🔀 Default Router", pos: "b", h: 48 }
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>🛠️ Assign to Engineering"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>📦 Assign to Product"]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>🎨 Assign to Design"]
n11["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/linear.svg' width='40' height='40' /></div><br/>📂 Assign to Default"]
n12@{ icon: "mdi:brain", form: "rounded", label: "🧠 OpenAI Chat Model", pos: "b", h: 48 }
n6 --> n10
n7 --> n11
n5 --> n9
n1 --> n0
n12 -.-> n3
n4 --> n8
n0 --> n2
n2 --> n3
n3 --> n4
n3 --> n5
n3 --> n6
n3 --> n7
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n1 trigger
class n3 ai
class n12 aiModel
class n0,n2,n4,n5,n6,n7 decision
classDef customIcon fill:none,stroke:none
class n1,n8,n9,n10,n11 customIcon
Why This Matters: Issue Triage Gets Messy Fast
Most teams don’t struggle because they “lack a process.” They struggle because triage is constant. Every new bug report, feature request, and vague “something’s broken” message forces someone to read, interpret, decide, and route. That’s already a lot of context switching. Then comes the follow-up: clarifying questions, reassignment, and the inevitable backlog grooming session where you discover half the tickets are sitting with the wrong team anyway. It’s not dramatic, but it’s exhausting. And it quietly slows everything down.
It adds up fast. Here’s where it breaks down in real life:
- A “simple bug” sits in Product for a day because nobody was confident enough to assign it to Engineering.
- People route based on guesswork, so two similar issues end up in different teams and get handled inconsistently.
- Triage becomes a bottleneck, which means urgent issues don’t look urgent until it’s too late.
- Backlog cleanup turns into weekly debt because the system never gets clean in the first place.
What You’ll Build: AI-Based Linear Issue Routing
This workflow listens for new or updated issues in Linear, then checks that the issue has the basics you need (like a usable title). Once it passes validation, OpenAI analyzes the issue title and description, then returns a classification that maps to a team (Engineering, Product, Design, or a default fallback). n8n uses that classification to route the issue down the correct path. Finally, the workflow updates the issue in Linear by assigning it to the right team automatically, so the ticket lands where it should the moment it exists. The end result is a backlog that stays organized without someone constantly nudging it back into shape.
The workflow starts with a Linear event trigger for creates and updates. From there, an OpenAI-powered agent decides the best team based on what the issue says. Then n8n applies routing logic and writes the team assignment back into Linear.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say your team handles about 20 new or updated Linear issues per day. If triage takes maybe 3 minutes each to read, decide, and assign, that’s about 1 hour of pure routing work daily (and that’s before reassignments). With this workflow, you’ll spend roughly 10 minutes a day reviewing edge cases, while the rest get routed automatically as they arrive. You get close to an hour back, and tickets stop lingering in the wrong place.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Linear for issue events and team assignment updates
- OpenAI to classify issues based on text
- OpenAI API key (get it from the OpenAI dashboard)
Skill level: Beginner. You will connect accounts, paste in IDs, and test with a few sample issues.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A Linear issue is created or updated. The Linear Trigger listens for issue events, so routing happens as soon as work hits your backlog.
The workflow validates the issue. An early check confirms the issue has a usable title and that the event is a create or update, which prevents noisy, half-empty tickets from wasting runs.
OpenAI classifies the issue content. n8n passes the issue title and description into an OpenAI chat model via an AI agent designed for bug classification, returning a simple output you can map to a team.
Routing logic assigns the correct team in Linear. Switch-based routes handle Engineering, Product, Design, and a default fallback, then update the issue so it lands in the right place automatically.
You can easily modify the classification rules to match your org (for example, split Engineering into “Frontend” and “Backend”). See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Linear Trigger
Set up the workflow trigger to listen for new or updated issues from Linear.
- Add and open 🔔 Linear Event Listener.
- Set Team ID to
YOUR_LINEAR_TEAM_ID. - Set Resources to
issue. - Credential Required: Connect your
linearApicredentials.
YOUR_LINEAR_TEAM_ID with the actual Linear team ID, or the trigger will not receive events.Step 2: Validate Incoming Issues
Ensure only valid issue payloads continue through the workflow.
- Open 📋 Validate New Issues.
- Confirm the condition checks that Title exists using
{{ $json.data.title }}. - Connect 🔔 Linear Event Listener → 📋 Validate New Issues.
Step 3: Set Up the AI Classifier
Configure the AI agent and its language model to classify issues into team IDs.
- Open ⚖️ Check Create or Update and keep both conditions:
{{ $json.action }}equalscreateorupdate. - Open 🤖 Bug Classifier Agent and set Prompt to the provided text, including
{{ $json.data.title }}and{{ $json.data.description }}. - Open 🧠 OpenAI Chat Engine and set Model to
gpt-4-mini. - Credential Required: Connect your
openAiApicredentials in 🧠 OpenAI Chat Engine (the AI model for 🤖 Bug Classifier Agent). - Connect 📋 Validate New Issues → ⚖️ Check Create or Update → 🤖 Bug Classifier Agent.
Step 4: Configure Routing Switches (Parallel Branches)
Route the AI output to the correct team update path.
- Configure 🔀 Route to Engineering to match
{{ $json.output }}equalsENGINEERING_TEAM_ID. - Configure 🔀 Route to Product to match
{{ $json.output }}equalsPRODUCT_TEAM_ID. - Configure 🔀 Route to Design to match
{{ $json.output }}equalsDESIGN_TEAM_ID. - Configure 🔀 Route to Default to match
{{ $json.output }}equalsDEFAULT_TEAM_ID. - 🤖 Bug Classifier Agent outputs to both 🔀 Route to Engineering and 🔀 Route to Product and 🔀 Route to Design and 🔀 Route to Default in parallel.
Step 5: Configure Linear Team Updates
Apply the classified team ID to the issue in Linear.
- Open 🛠️ Update Engineering Team and set Issue ID to
{{ $('⚖️ Check Create or Update').item.json.data.id }}and Operation toupdate. - Set Update Fields → Team ID to
{{ $json.output }}in 🛠️ Update Engineering Team. - Repeat the same configuration for 📦 Update Product Team, 🎨 Update Design Team, and 📂 Update Default Team.
- Credential Required: Connect your
linearApicredentials in all Linear update nodes.
Step 6: Test and Activate Your Workflow
Verify routing works correctly before enabling it for production use.
- Click Execute Workflow and create or update a test issue in Linear to trigger 🔔 Linear Event Listener.
- Confirm 🤖 Bug Classifier Agent outputs a valid team ID and the corresponding switch node routes the data.
- Check Linear to ensure the issue’s team is updated by one of the update nodes.
- Once verified, toggle the workflow to Active for production use.
Troubleshooting Tips
- Linear credentials can expire or lack workspace permissions. If things break, check the n8n Credentials section and confirm the token can update issues.
- If you’re testing with quick edits in Linear, event timing can be weird. Re-run with a fresh issue and confirm the trigger is set to the right event type (create or update).
- OpenAI outputs depend on your prompt and examples. If classifications feel generic, add a few “if it mentions X, it’s Engineering” rules to the agent prompt so it learns your reality.
Quick Answers
About 30 minutes if your Linear and OpenAI accounts are ready.
No. You’ll connect Linear and OpenAI, then paste the right team IDs into the workflow.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenAI API costs, which are usually a few cents per batch of issues depending on length.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you probably should. You can change the AI Agent classifier prompt to include your team names, priority rules, and examples from past tickets. If you want more destinations, duplicate the existing routing switches (like “Route to Engineering”) and add new Linear update nodes for teams such as QA, Security, or Customer Success. You can also tighten the “Validate New Issues” check so only certain projects, labels, or keywords get auto-routed.
Usually it’s an expired token or missing permission to update issues. Reconnect Linear in n8n Credentials, then confirm the connected account can access the right workspace and assign issues to teams. If it only fails on certain tickets, check that the team IDs you’re assigning actually exist in that workspace.
If you self-host n8n, there’s no fixed execution cap; it mainly depends on your server and OpenAI rate limits.
For AI-based routing, n8n is usually the more flexible choice because you can branch logic freely, add fallbacks, and keep everything in one workflow without paying extra for every path. The AI Agent pattern used here is also easier to control in n8n, since you can shape the prompt and post-process the output before updating Linear. Zapier or Make can still work, but you may hit limits when you want multiple routes, validations, and retries. If your process is “classify then assign” with zero nuance, those tools are fine. If you want routing that matches how your team actually works, n8n tends to hold up better. Talk to an automation expert if you want a quick recommendation for your setup.
Once this is running, your backlog stops relying on someone’s memory and attention. The workflow routes the repetitive stuff, so your team can get straight to fixing and shipping.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.