Skip to main content

Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team

Workflow preview

Workflow preview
100%
Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Use case When working with multiple teams, bugs must get in front of the right team as quickly as possible to be resolved. Normally this includes a manual grooming of new bugs that have arrived in ...

Best for

  • Ticket Management automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.lineartrigger, n8n-nodes-base.filter, n8n-nodes-base.stickynote, n8n-nodes-base.linear, n8n-nodes-base.httprequest, n8n-nodes-base.set, n8n-nodes-base.if, n8n-nodes-base.slack

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Niklas Hatje.

Original n8n.io source

1.1 Workflow description

Title
Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team
Workflow name
Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team

Use case

When working with multiple teams, bugs must get in front of the right team as quickly as possible to be resolved. Normally this includes a manual grooming of new bugs that have arrived in your ticketing system (in our case Linear). We found this way too time-consuming. That's why we built this workflow.

What this workflow does

This workflow triggers every time a Linear issue is created or updated within a certain team. For us at n8n, we created one general team called Engineering where all bugs get added in the beginning. The workflow then checks if the issue meets the criteria to be auto-moved to a certain team. In our case, that means that the description is filled, that it has the bug label, and that it's in the Triage state. The workflow then classifies the bug using OpenAI's GPT-4 model before updating the team property of the Linear issue. If the AI fails to classify a team, the workflow sends an alert to Slack.

Setup

  1. Add your Linear and OpenAi credentials
  2. Change the team in the Linear Trigger to match your needs
  3. Customize your teams and their areas of responsibility in the Set me up node. Please use the format [Teamname][Description/Areas of responsibility]. Also, make sure that the team names match the names in Linear exactly.
  4. Change the Slack channel in the Set me up node to your Slack channel of choice.

How to adjust it to your needs

  • Play around with the context that you're giving to OpenAI, to make sure the model has enough knowledge about your teams and their areas of responsibility
  • Adjust the handling of AI failures to your needs

How to enhance this workflow

At n8n we use this workflow in combination with some others. E.g. we have the following things on top:

  • We're using an automation that enables everyone to add new bugs easily with the right data via a /bug command in Slack (check out this template if that's interesting to you)

This workflow was built using n8n version 1.30.0

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Linear Trigger

Type / Role
n8n-nodes-base.linearTrigger - linearTrigger
Config choices
Version 1

Block 2 - Only tickets that need to be classified

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Update team

Type / Role
n8n-nodes-base.linear - linear
Config choices
Version 1

Block 5 - Get all linear teams

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 3

Block 6 - Set team ID

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 7 - Set me up

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.3

Block 8 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Check if AI was able to find a team

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2

Block 10 - Notify in Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.1

Block 11 - Merge data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 2.1

Block 12 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1

3. Summary Table

Workflow Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team
Complexity intermediate
Nodes 12
Categories Ticket Management, AI Summarization
Author Niklas Hatje
Published 29 Feb 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2154/2154.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Classify new bugs in Linear with OpenAI's GPT-4 and move them to the right team do?

Use case When working with multiple teams, bugs must get in front of the right team as quickly as possible to be resolved. Normally this includes a manual grooming of new bugs that have arrived in ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Ticket Management, AI Summarization use case.