キ・ニアン

中級

これはEngineering分野の自動化ワークフローで、11個のノードを含みます。主にIf, Github, Switch, GithubTriggerなどのノードを使用。 コメントコマンドを使用したGitHub issue割り当ての自動化

前提条件
  • GitHub Personal Access Token
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "lPYVaz2xbN5zFDIL",
  "meta": {
    "instanceId": "cbc68f6c587084f6fe53914a07ed22d475640cb7a6f4ade193e6f0c6d7a06ce8",
    "templateCredsSetupCompleted": true
  },
  "name": "temp",
  "tags": [
    {
      "id": "DaQLpYItTEM2y8Gt",
      "name": "Product",
      "createdAt": "2025-06-17T10:48:17.486Z",
      "updatedAt": "2025-06-17T10:48:17.486Z"
    },
    {
      "id": "6X5c5WbCRWtxJbl2",
      "name": "AI",
      "createdAt": "2025-06-17T10:48:17.367Z",
      "updatedAt": "2025-06-17T10:48:17.367Z"
    },
    {
      "id": "ycHNTMiM8vy98zu1",
      "name": "Building blocks",
      "createdAt": "2025-06-17T10:48:17.563Z",
      "updatedAt": "2025-06-17T10:48:17.563Z"
    },
    {
      "id": "UJ6au0mv063gOupq",
      "name": "Finance",
      "createdAt": "2025-06-17T10:48:17.583Z",
      "updatedAt": "2025-06-17T10:48:17.583Z"
    },
    {
      "id": "CaWiGPzJpyfUHdxp",
      "name": "IT Ops",
      "createdAt": "2025-06-17T10:48:17.388Z",
      "updatedAt": "2025-06-17T10:48:17.388Z"
    },
    {
      "id": "6Uolue5XigSZ2IYx",
      "name": "OpenAI",
      "createdAt": "2025-06-17T10:48:17.508Z",
      "updatedAt": "2025-06-17T10:48:17.508Z"
    },
    {
      "id": "nA8GpDM4XoG5aJ0A",
      "name": "Marketing",
      "createdAt": "2025-06-17T10:48:17.532Z",
      "updatedAt": "2025-06-17T10:48:17.532Z"
    },
    {
      "id": "J4gTJX9lSPm3wByF",
      "name": "Support",
      "createdAt": "2025-06-17T10:48:17.464Z",
      "updatedAt": "2025-06-17T10:48:17.464Z"
    },
    {
      "id": "i294x7TPtUQgJkmv",
      "name": "HR",
      "createdAt": "2025-06-17T10:48:17.426Z",
      "updatedAt": "2025-06-17T10:48:17.426Z"
    }
  ],
  "nodes": [
    {
      "id": "b1e09744-5b20-4336-8760-bdd7422e9b77",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1100,
        -121
      ],
      "parameters": {
        "rules": {
          "rules": [
            {
              "value2": "opened"
            },
            {
              "output": 1,
              "value2": "created"
            }
          ]
        },
        "value1": "={{$json[\"body\"][\"action\"]}}",
        "dataType": "string"
      },
      "typeVersion": 1
    },
    {
      "id": "d8358b88-60ce-49c8-b156-6e8d29004ac1",
      "name": "IF 担当者なし?",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        -300
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"assignees\"].length}}",
              "operation": "equal"
            }
          ],
          "string": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"body\"]}}",
              "value2": "/[a,A]ssign[\\w*\\s*]*me/gm",
              "operation": "regex"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2cbdec7e-8724-4016-b7b1-eac573946e7f",
      "name": "IF 作業希望?",
      "type": "n8n-nodes-base.if",
      "position": [
        -880,
        100
      ],
      "parameters": {
        "conditions": {
          "number": [],
          "string": [
            {
              "value1": "={{$json[\"body\"][\"comment\"][\"body\"]}}",
              "value2": "/[a,A]ssign[\\w*\\s*]*me/gm",
              "operation": "regex"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "64d80a69-acfd-4e3c-96f2-01706bf2ed48",
      "name": "IF 未アサイン?",
      "type": "n8n-nodes-base.if",
      "position": [
        -660,
        0
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$json[\"body\"][\"issue\"][\"assignees\"].length}}",
              "operation": "equal"
            }
          ],
          "string": []
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6029b9bd-1616-40c7-ae4b-9d96740151a9",
      "name": "イシュー作成者をアサイン",
      "type": "n8n-nodes-base.github",
      "position": [
        -660,
        -400
      ],
      "webhookId": "6d201c22-4f29-49bd-b0fb-2f78756c5403",
      "parameters": {
        "owner": "={{$node[\"Switch\"].json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "edit",
        "editFields": {
          "labels": [
            {
              "label": "assigned"
            }
          ],
          "assignees": [
            {
              "assignee": "={{$json.body.issue[\"user\"][\"login\"]}}"
            }
          ]
        },
        "repository": "={{$node[\"Switch\"].json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{ $json[\"body\"][\"issue\"][\"number\"] }}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e3460bc4-fe63-47db-8bbb-c288e2f3f842",
      "name": "コメント追加",
      "type": "n8n-nodes-base.github",
      "position": [
        -440,
        100
      ],
      "webhookId": "218f39cf-64fb-41d1-92ba-0849243dee97",
      "parameters": {
        "body": "=Hey @{{$json[\"body\"][\"comment\"][\"user\"][\"login\"]}},\n\nThis issue is already assigned to {{$json[\"body\"][\"issue\"][\"assignee\"][\"login\"]}} 🙂",
        "owner": "={{$json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "createComment",
        "repository": "={{$json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{$json[\"body\"][\"issue\"][\"number\"]}}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d65b9db7-8708-4ba3-b95e-c8d2a5b0c6cb",
      "name": "コメント投稿者をアサイン",
      "type": "n8n-nodes-base.github",
      "position": [
        -440,
        -100
      ],
      "webhookId": "3ef2ace6-afe0-47ee-8bb7-3a0a837ce8b7",
      "parameters": {
        "owner": "={{$json[\"body\"][\"repository\"][\"owner\"][\"login\"]}}",
        "operation": "edit",
        "editFields": {
          "labels": [
            {
              "label": "assigned"
            }
          ],
          "assignees": [
            {
              "assignee": "={{$json[\"body\"][\"comment\"][\"user\"][\"login\"]}}"
            }
          ]
        },
        "repository": "={{$json[\"body\"][\"repository\"][\"name\"]}}",
        "issueNumber": "={{$json[\"body\"][\"issue\"][\"number\"]}}",
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub@Harshil"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "924d54fc-2744-418a-95f2-d71eb3383f1d",
      "name": "Github Trigger1",
      "type": "n8n-nodes-base.githubTrigger",
      "position": [
        -1320,
        -100
      ],
      "webhookId": "52c5fe44-23ef-4903-b6ae-731edd36127e",
      "parameters": {
        "owner": {
          "__rl": true,
          "mode": "name",
          "value": "[username]"
        },
        "events": [
          "issue_comment",
          "issues"
        ],
        "options": {},
        "repository": {
          "__rl": true,
          "mode": "name",
          "value": "[reponame]"
        },
        "authentication": "oAuth2"
      },
      "credentials": {
        "githubOAuth2Api": {
          "id": null,
          "name": "GitHub Personal Credentials"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "96e8e530-34aa-4e55-a3b6-36fa0f94e7f4",
      "name": "操作なし、何もしない",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -660,
        -200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9954a4af-9c03-4761-930d-ee8408b77b8f",
      "name": "操作なし、何もしない1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -660,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4a8907e2-277f-4985-8dad-5799a4a46e26",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2040,
        -480
      ],
      "parameters": {
        "width": 1820,
        "height": 1000,
        "content": "GitHub Auto-Assign Workflow\nTrigger: Listens for new GitHub issues or comments.\nSwitch: Checks if the action is either \"opened\" or \"created\" (i.e. new issue opened or comment added).\nIF no assignee? If it's a new issue, checks if there's no one assigned yet and the issue body includes \"assign me\".\n\n✅ If true → Assign Issue Creator (assigns the issue to the person who opened it + adds \"assigned\" label).\n❌ Else → do nothing.\n\nIF wants to work? If it's a comment, checks if the comment includes \"assign me\".\n\nIf yes → goes to IF not assigned?\nIf the issue still has no assignee:\n\n✅ Assign Commenter (assigns the commenter + label).\n\n\nElse:\n\n💬 Add Comment \"This issue is already assigned to @someone\".\n\n\nElse → do nothing.\n\n🔧 Setup Guide (easy steps):\nClone/import: Paste this JSON into your n8n Editor (use the Import menu).\nConnect GitHub credentials:\n\nSet Github Trigger1 to listen on your owner/repo via OAuth.\nProvide OAuth credentials for the two GitHub nodes.\n\nEnable the workflow (turn it active).\nTest it out:\n\nOpen a new issue with \"assign me\" → you get assigned.\nComment \"assign me\" on unassigned issues → the commenter gets assigned.\nComment \"assign me\" on already assigned issues → auto-comment says someone else is assigned.\n\n📝 Why this is handy:\n\nAutomates GitHub triage: anyone asking gets the issue!\nKeeps things fair: avoids conflicts by checking assignments.\nScales across issues & comments with just one simple workflow.\n\n✅ Optional Tweaks:\n\nAdjust trigger events (e.g. only issues, no comments).\nChange the regex to detect other phrases.\nAdd notifications (e.g., Slack or email alerts when assignment happens)."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "acdd4625-6ad4-4b4d-9e2f-0ed7bed010b4",
  "connections": {
    "b1e09744-5b20-4336-8760-bdd7422e9b77": {
      "main": [
        [
          {
            "node": "d8358b88-60ce-49c8-b156-6e8d29004ac1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "2cbdec7e-8724-4016-b7b1-eac573946e7f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "924d54fc-2744-418a-95f2-d71eb3383f1d": {
      "main": [
        [
          {
            "node": "b1e09744-5b20-4336-8760-bdd7422e9b77",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d8358b88-60ce-49c8-b156-6e8d29004ac1": {
      "main": [
        [
          {
            "node": "6029b9bd-1616-40c7-ae4b-9d96740151a9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "96e8e530-34aa-4e55-a3b6-36fa0f94e7f4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "64d80a69-acfd-4e3c-96f2-01706bf2ed48": {
      "main": [
        [
          {
            "node": "d65b9db7-8708-4ba3-b95e-c8d2a5b0c6cb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "e3460bc4-fe63-47db-8bbb-c288e2f3f842",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2cbdec7e-8724-4016-b7b1-eac573946e7f": {
      "main": [
        [
          {
            "node": "64d80a69-acfd-4e3c-96f2-01706bf2ed48",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "9954a4af-9c03-4761-930d-ee8408b77b8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - エンジニアリング

有料ですか?

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

ワークフロー情報
難易度
中級
ノード数11
カテゴリー1
ノードタイプ6
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34