Linear バグ自動ルーティング

上級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、17個のノードを含みます。主にIf, Linear, Switch, LinearTrigger, Agentなどのノードを使用。 GPT-4-miniによる分類を使用してLinearの Issue を自動のにルーティングする

前提条件
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "Linear Bug Auto-Routing",
  "nodes": [
    {
      "id": "8de2b34a-a4ff-4cdb-a028-3a5cf4583e63",
      "name": "📋 新規課題のみフィルター",
      "type": "n8n-nodes-base.if",
      "position": [
        -2384,
        736
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "condition-1",
              "operator": {
                "type": "string",
                "operation": "exists"
              },
              "leftValue": "={{ $json.data.title }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ddc917d1-0513-49e0-a522-178210751b71",
      "name": "🔔 Linearトリガー",
      "type": "n8n-nodes-base.linearTrigger",
      "position": [
        -2608,
        736
      ],
      "parameters": {
        "teamId": "YOUR_LINEAR_TEAM_ID",
        "resources": [
          "issue"
        ]
      },
      "credentials": {
        "linearApi": "linear_api_credentials"
      },
      "typeVersion": 1
    },
    {
      "id": "07c6b417-86b4-43a6-b8f5-0db4685b073a",
      "name": "⚖️ 条件分岐(作成または更新)",
      "type": "n8n-nodes-base.if",
      "position": [
        -2160,
        736
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "a395310f-475c-4726-b2ef-7db876471a36",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.action }}",
              "rightValue": "create"
            },
            {
              "id": "92ece19c-6765-4ed0-a5dc-4fd1ef190cb6",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.action }}",
              "rightValue": "update"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "aab37c69-54c9-4a53-ae6a-780091c1915f",
      "name": "🤖 AIエージェント(バグ分類器)",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1936,
        736
      ],
      "parameters": {
        "text": "=You are a bug classification expert. Based on the bug title and description, classify it into exactly one of these teams: Engineering, Product, Design, QA, DevOps, Support.\n\nRules:\n- If it belongs to Engineering, respond with: ENGINEERING_TEAM_ID\n- If it belongs to Product, respond with: PRODUCT_TEAM_ID\n- If it belongs to Design, respond with: DESIGN_TEAM_ID\n- If it belongs to Nothing(Default), respond with: DEFAULT_TEAM_ID\n\n\nRespond with ONLY the correct team ID as specified above. Do not include explanations, text, or formatting.\n\nTitle: {{ $json.data.title }}\nDescription: {{ $json.data.description }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "af0aef84-bb2a-4a6e-a35a-ce1002fb7907",
      "name": "🔀 エンジニアリングルーター",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1584,
        448
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "cedcaf8e-894e-4598-9d82-8e6ad125449c",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "ENGINEERING_TEAM_ID"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "8fd08de3-dc30-495d-9ac4-1939d60d5bee",
      "name": "🔀 プロダクトルーター",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1584,
        640
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "1d753992-3f8f-4899-a6db-1394ad513af8",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "PRODUCT_TEAM_ID"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "4ebcd42e-7a0b-4a6a-acf0-decf9b60c7ca",
      "name": "🔀 デザインルーター",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1584,
        832
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "85fcf1da-00b7-4392-9421-23dd52c18258",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "DESIGN_TEAM_ID"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "11e315a7-50e2-4789-ad38-4c9a33569ede",
      "name": "🔀 デフォルトルーター",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1584,
        1024
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 1,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "85fcf1da-00b7-4392-9421-23dd52c18258",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output }}",
                    "rightValue": "DEFAULT_TEAM_ID"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "37ef1f41-1cb2-40d0-99d2-f10603253e8f",
      "name": "🛠️ エンジニアリングにアサイン",
      "type": "n8n-nodes-base.linear",
      "position": [
        -1360,
        448
      ],
      "parameters": {
        "issueId": "={{ $('⚖️ If (Create or Update)').item.json.data.id }}",
        "operation": "update",
        "updateFields": {
          "teamId": "={{ $json.output }}"
        }
      },
      "credentials": {
        "linearApi": "linear_api_credentials"
      },
      "typeVersion": 1.1
    },
    {
      "id": "1ff305f6-6ad4-496e-8380-22e26f637c55",
      "name": "📦 プロダクトにアサイン",
      "type": "n8n-nodes-base.linear",
      "position": [
        -1360,
        640
      ],
      "parameters": {
        "issueId": "={{ $('⚖️ If (Create or Update)').item.json.data.id }}",
        "operation": "update",
        "updateFields": {
          "teamId": "={{ $json.output }}"
        }
      },
      "credentials": {
        "linearApi": "linear_api_credentials"
      },
      "typeVersion": 1.1
    },
    {
      "id": "5fb7fd8b-521e-4bf2-8e25-319e4a4bd961",
      "name": "🎨 デザインにアサイン",
      "type": "n8n-nodes-base.linear",
      "position": [
        -1360,
        832
      ],
      "parameters": {
        "issueId": "={{ $('⚖️ If (Create or Update)').item.json.data.id }}",
        "operation": "update",
        "updateFields": {
          "teamId": "={{ $json.output }}"
        }
      },
      "credentials": {
        "linearApi": "linear_api_credentials"
      },
      "typeVersion": 1.1
    },
    {
      "id": "998b5ad7-72b0-49d0-9e87-57bca44b5976",
      "name": "📂 デフォルトにアサイン",
      "type": "n8n-nodes-base.linear",
      "position": [
        -1360,
        1024
      ],
      "parameters": {
        "issueId": "={{ $('⚖️ If (Create or Update)').item.json.data.id }}",
        "operation": "update",
        "updateFields": {
          "teamId": "={{ $json.output }}"
        }
      },
      "credentials": {
        "linearApi": "linear_api_credentials"
      },
      "typeVersion": 1.1
    },
    {
      "id": "c8beeaf3-ca48-4d22-8889-5b0bac314700",
      "name": "🧠 OpenAIチャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1872,
        960
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": "openai_api_credentials"
      },
      "typeVersion": 1.2
    },
    {
      "id": "e5ea3681-7a84-4582-b473-147ce69fb941",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2656,
        144
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 1040,
        "content": "## 🔔 Trigger & Filtering\n\n*🔔 Linear Trigger — This node acts as the entry point of the workflow. It continuously monitors Linear for any new activity and immediately triggers the automation whenever an issue is created or updated. By doing so, it ensures that the workflow reacts in real time without requiring any manual intervention.\n\n📋 Filter New Issues Only — Once triggered, the workflow passes through a validation step. This filter checks whether the issue has a valid title before allowing it to move further down the pipeline. This prevents incomplete or irrelevant records (such as empty or placeholder issues) from being unnecessarily processed, keeping the workflow clean and efficient.\n\n⚖️ If (Create or Update) — After validation, the workflow runs a conditional check to determine the type of action that occurred in Linear. Specifically, it verifies whether the incoming item is the result of a create or an update event. Only if the condition is met does the issue proceed to the next stage, ensuring the workflow remains focused on meaningful changes rather than every possible event.*"
      },
      "typeVersion": 1
    },
    {
      "id": "ad3eda57-3289-46f9-bb1a-7cacb0632206",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2000,
        144
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 1040,
        "content": "## 🤖 AI Classification\n\n*🧠 OpenAI Chat Model — This node serves as the backbone of the intelligent classification process. It leverages the power of an advanced large language model (LLM), specifically GPT-4-mini, to analyze text with accuracy and efficiency. By integrating directly into the workflow, it enables natural language understanding, which is essential for interpreting bug reports in a human-like manner. This ensures that every issue is examined contextually rather than just through static keyword checks.\n\n🤖 AI Agent (Bug Classifier) — Built on top of the OpenAI Chat Model, this specialized agent is designed to automatically interpret the bug title and description provided in Linear. Its role is to classify each issue into exactly one of the predefined categories: Engineering, Product, Design, or Default. By doing so, it removes the need for manual triaging, speeds up the bug management process, and ensures that issues are instantly directed to the right team with minimal human oversight.*"
      },
      "typeVersion": 1
    },
    {
      "id": "45ab34c6-9464-4d11-be27-297efa530029",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        144
      ],
      "parameters": {
        "height": 1040,
        "content": "## 🗂️ Assignment Actions\n\n*Assign to Engineering, Assign to Product, Assign to Design, and Assign to Default update the Linear issue with the correct team ID.\n\nThese ensure the issue gets routed into the right backlog automatically.*"
      },
      "typeVersion": 1
    },
    {
      "id": "9f3b5383-c215-4e33-ac47-93698cf186a4",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1664,
        144
      ],
      "parameters": {
        "color": 3,
        "height": 1040,
        "content": "## 🔀 Routing Logic\n\n*Engineering Router, Product Router, Design Router, and Default Router each check the classifier's output against the correct team ID.\n\nThis guarantees that only one path is chosen, based on the assigned team.*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "4ebcd42e-7a0b-4a6a-acf0-decf9b60c7ca": {
      "main": [
        [
          {
            "node": "5fb7fd8b-521e-4bf2-8e25-319e4a4bd961",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "11e315a7-50e2-4789-ad38-4c9a33569ede": {
      "main": [
        [
          {
            "node": "998b5ad7-72b0-49d0-9e87-57bca44b5976",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8fd08de3-dc30-495d-9ac4-1939d60d5bee": {
      "main": [
        [
          {
            "node": "1ff305f6-6ad4-496e-8380-22e26f637c55",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ddc917d1-0513-49e0-a522-178210751b71": {
      "main": [
        [
          {
            "node": "8de2b34a-a4ff-4cdb-a028-3a5cf4583e63",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8beeaf3-ca48-4d22-8889-5b0bac314700": {
      "ai_languageModel": [
        [
          {
            "node": "aab37c69-54c9-4a53-ae6a-780091c1915f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "af0aef84-bb2a-4a6e-a35a-ce1002fb7907": {
      "main": [
        [
          {
            "node": "37ef1f41-1cb2-40d0-99d2-f10603253e8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8de2b34a-a4ff-4cdb-a028-3a5cf4583e63": {
      "main": [
        [
          {
            "node": "07c6b417-86b4-43a6-b8f5-0db4685b073a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "07c6b417-86b4-43a6-b8f5-0db4685b073a": {
      "main": [
        [
          {
            "node": "aab37c69-54c9-4a53-ae6a-780091c1915f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aab37c69-54c9-4a53-ae6a-780091c1915f": {
      "main": [
        [
          {
            "node": "af0aef84-bb2a-4a6e-a35a-ce1002fb7907",
            "type": "main",
            "index": 0
          },
          {
            "node": "8fd08de3-dc30-495d-9ac4-1939d60d5bee",
            "type": "main",
            "index": 0
          },
          {
            "node": "4ebcd42e-7a0b-4a6a-acf0-decf9b60c7ca",
            "type": "main",
            "index": 0
          },
          {
            "node": "11e315a7-50e2-4789-ad38-4c9a33569ede",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - コンテンツ作成, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数17
カテゴリー2
ノードタイプ7
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Avkash Kakdiya

Avkash Kakdiya

@itechnotion

🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34