Animated data flow diagram

AI Agent for Linear Issue Classification & Assignment

Version: 1.0.0 | Last Updated: 2025-05-16

Integrates with:

Linear OpenAI Slack

Overview

Unlock Automated Issue Triage with this AI Agent

This AI Agent intelligently automates the classification and assignment of Linear issues. When a new issue is created or an existing one is updated in Linear (matching your specific filter criteria), the agent springs into action. It leverages OpenAI's powerful GPT models (like GPT-4-32k, as seen in the workflow) to analyze the issue's title and description. By comparing this information against a customizable list of your teams and their defined responsibilities, the agent determines the most suitable team for the task. It then automatically updates the issue in Linear, assigning it to the identified team. If the AI cannot confidently assign the issue to a specific team (e.g., it classifies it as 'Other'), a notification is sent to a designated Slack channel, ensuring no issue falls through the cracks and that manual review can occur when necessary. This significantly speeds up your issue triage process, reduces manual workload, and ensures tasks get to the right people faster.

Key Features & Benefits

  • AI-Powered Classification: Utilizes OpenAI's advanced language understanding to accurately interpret issue content and assign it to the correct team.
  • Automated Linear Triage: Frees up valuable time by automating the manual process of reading, understanding, and assigning Linear issues.
  • Customizable Team Logic: Easily define your teams and their areas of responsibility directly within the workflow, tailoring the AI's classification to your organizational structure.
  • Direct Linear Integration: Seamlessly updates issues in Linear with the new team assignment, keeping your project management system current.
  • Slack Alert System: Provides notifications via Slack for issues that require manual attention or could not be automatically classified, ensuring complete oversight.
  • Targeted Processing: Employs filters to process only the issues that meet your predefined criteria (e.g., specific labels, states, or non-placeholder descriptions), optimizing resource usage.

Use Cases

  • B2B SaaS: Automatically route incoming bug reports from Linear to specialized engineering squads (e.g., backend, frontend, platform) based on the bug's description.
  • E-commerce: Triage customer-reported issues or feature requests logged in Linear, ensuring they are quickly assigned to the correct product or development team.
  • DevOps Teams: Efficiently manage and assign infrastructure alerts or new tasks created in Linear to the responsible on-call engineer or team.
  • Project Management: Streamline task assignment for new project tasks in Linear by having the AI suggest or assign the task to the team whose skills best match the task description.

Prerequisites

  • An n8n instance (Cloud or self-hosted).
  • OpenAI API Key with access to a suitable model (e.g., gpt-4-32k as used in the workflow, or gpt-3.5-turbo, gpt-4).
  • Linear API Key for issue updates and OAuth2 credentials for the trigger and fetching teams.
  • Slack API credentials and the name or ID of the target notification channel.

Setup Instructions

  1. Download the n8n workflow JSON file.
  2. Import the workflow into your n8n instance.
  3. Configure Linear Trigger Node ('Linear Trigger'):
    • Connect your Linear OAuth2 credentials.
    • Specify the 'Team ID' in Linear that this workflow should monitor for new/updated issues.
    • Ensure the 'Resources' parameter is set to 'issue' and 'Events' to 'Update' (or 'Create' as needed).
  4. Configure Initial Settings Node ('Set me up'):
    • Update the teams variable: List your team names and their responsibilities. Follow the format: [Teamname][Description/Areas of responsibility]. Ensure team names here exactly match your team names in Linear for successful mapping.
    • Update the slackChannel variable with the name of your desired Slack channel for notifications (e.g., #dev-alerts).
  5. Configure Filter Node ('Only tickets that need to be classified'):
    • Adjust the filter conditions to precisely target which Linear issues should be processed by the AI. The example filters by checking if the description is not a placeholder, if the issue is in a specific state (e.g., 'Triage'), and if it has a particular label (e.g., 'type/bug'). Modify these to fit your workflow.
  6. Configure OpenAI Node ('OpenAI'):
    • Connect your OpenAI API credentials.
    • The model gpt-4-32k-0314 is pre-selected; you can change it if necessary, ensuring it's suitable for classification tasks.
    • Review the system prompts. They are designed to use the teams definition from the 'Set me up' node and the issue details from the 'Linear Trigger' node.
  7. Configure HTTP Request Node ('Get all linear teams'):
    • Ensure your Linear OAuth2 credentials (the same as used in the trigger or a dedicated one for GraphQL API calls) are selected. This node fetches all team IDs to map the AI's textual team name output to a Linear team ID.
  8. Configure Linear Update Node ('Update team'):
    • Connect your Linear API Key credentials (note: some Linear operations might require an API key rather than OAuth2, or vice-versa, check Linear's API docs for issueUpdate).
  9. Configure Slack Node ('Notify in Slack'):
    • Connect your Slack API credentials.
    • The channel is dynamically set from the 'Set me up' node. Ensure the bot has permission to post in that channel.
  10. Test Thoroughly: Trigger the workflow with various test issues in Linear that match (and don't match) your filter criteria to ensure correct classification and assignment.
  11. Activate the Workflow: Once satisfied with testing, activate the workflow to begin automated issue classification.

Tags:

AI AgentAutomationOpenAILinearIssue TrackingProject ManagementProductivityDevOps

Want your own unique AI agent?

Talk to us - we know how to build custom AI agents for your specific needs.

Schedule a Consultation