コードコメントをFAQへ同期 (GitHub)
上級
これはEngineering, AI Chatbot分野の自動化ワークフローで、18個のノードを含みます。主にIf, Code, Slack, Notion, GoogleSheetsなどのノードを使用。 GPT-4o、Notion、Slackを使って開発チームのGitHub PRへの自動回答
前提条件
- •Slack Bot Token または Webhook URL
- •Notion API Key
- •Google Sheets API認証情報
- •GitHub Personal Access Token
- •OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"id": "ZtkkWwiBICaiGc4g",
"meta": {
"instanceId": "8443f10082278c46aa5cf3acf8ff0f70061a2c58bce76efac814b16290845177",
"templateCredsSetupCompleted": true
},
"name": "Code Comment-to-FAQ Sync (GitHub)",
"tags": [],
"nodes": [
{
"id": "5b60a73e-3918-4730-b195-ac429b2f5acf",
"name": "GPT-4oモデル設定",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
144,
144
],
"parameters": {
"model": "gpt-4o",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"id": "C3WzT18XqF8OdVM6",
"name": "Azure Open AI account"
}
},
"typeVersion": 1
},
{
"id": "2b63fa67-e389-43a5-ab07-0a54a890dd57",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-944,
-400
],
"parameters": {
"height": 448,
"content": "## Node Name: GitHub PR Comment Trigger\n**Action**: Starts the workflow when a pull-request comment event occurs in GitHub.\n**Description**:\nThis node listens for the `pull_request_review_comment` webhook from a specified repository (`weather-app`) and user. \nWhenever a developer comments on a PR, this node captures the event payload — including comment text, file path, PR number, and author — to start the automation chain.\n"
},
"typeVersion": 1
},
{
"id": "49031929-9cdb-4a5e-97e4-cfbcaa93fd1f",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
144
],
"parameters": {
"height": 368,
"content": "## Node Name: Validate GitHub Webhook Payload\n**Action**: Checks if the incoming PR comment data is valid and complete.\n**Description**:\nBefore processing, this node verifies that the GitHub payload includes a valid comment URL. \nIf the webhook is malformed or missing fields, the workflow routes execution to the error-logging path to prevent failed AI or Notion operations.\n"
},
"typeVersion": 1
},
{
"id": "7df85bda-9810-4dc0-97c6-4280bffcf513",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-192,
448
],
"parameters": {
"height": 384,
"content": "## Node Name: Log Errors in Google Sheets\n**Action**: Records any webhook or processing errors in a shared Google Sheet.\n**Description**:\nIf validation fails or data parsing encounters issues, this node logs the error details (error ID + message) in the “error log sheet.” \nThis ensures complete visibility into failed webhook events and AI generation errors for future troubleshooting.\n"
},
"typeVersion": 1
},
{
"id": "9eae3668-e27a-46ec-925b-e187ebb38d39",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-528
],
"parameters": {
"height": 432,
"content": "## Node Name: Generate AI Response for Developer Question\n**Action**: Uses GPT-4o to draft a clear, concise reply to the developer’s PR comment.\n**Description**:\nThis agent node sends the extracted GitHub comment text and PR context to GPT-4o. \nThe AI analyzes the query and returns a brief (2–3 line) technical answer that can later be stored or displayed for review.\n"
},
"typeVersion": 1
},
{
"id": "7298a7db-60d9-4891-99d4-17ab86e2eb26",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
464,
-512
],
"parameters": {
"height": 416,
"content": "## Node Name: Extract GitHub Comment Metadata\n**Action**: Parses and structures key GitHub comment details into a clean JSON object.\n**Description**:\nUsing a JavaScript Code node, this step extracts repository name, comment content, author username, file path, and PR number from the original webhook payload. \nIt standardizes the data so it can be easily stored in Notion.\n"
},
"typeVersion": 1
},
{
"id": "b149f1f2-65a2-4a0b-8736-e556a6caf632",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
704,
160
],
"parameters": {
"height": 432,
"content": "## Node Name: Save Comment Insight to Notion Database\n**Action**: Appends the processed comment data and AI response into a Notion database.\n**Description**:\nThis node creates a new page entry in a Notion database (“test db”) capturing details like repository, username, comment body, file path, and PR number. \nIt serves as a living documentation hub for tracking developer queries and AI answers from GitHub PRs.\n"
},
"typeVersion": 1
},
{
"id": "5d286fc7-9919-4102-8afc-c6f12933c510",
"name": "付箋6",
"type": "n8n-nodes-base.stickyNote",
"position": [
224,
272
],
"parameters": {
"height": 352,
"content": "## Node Name: Configure GPT-4o Model\n**Action**: Establishes the Azure OpenAI GPT-4o model connection for AI processing.\n**Description**:\nThis node defines and connects to the GPT-4o model hosted on Azure OpenAI. \nIt serves as the language engine for generating short, precise, and context-aware technical responses to developer comments.\n"
},
"typeVersion": 1
},
{
"id": "f035aa9a-2f76-4de6-a451-84a00dbb690e",
"name": "付箋7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-176,
-464
],
"parameters": {
"height": 400,
"content": "## Node Name: Detect Developer Question in PR Comment\n**Action**: Evaluates whether a PR comment contains a question like “how do I…” or “how to…”.\n**Description**:\nThis conditional node scans the text of the GitHub comment for help-related keywords. \nIf the comment is a technical query, it routes the flow to the AI assistant for generating a concise answer. Otherwise, the workflow ends silently.\n"
},
"typeVersion": 1
},
{
"id": "c6e89357-de32-4be6-bbe0-f486751ead92",
"name": "GitHub PRコメントトリガー",
"type": "n8n-nodes-base.githubTrigger",
"position": [
-672,
-32
],
"webhookId": "1114ba07-d98e-4751-80f2-119a9394f666",
"parameters": {
"owner": {
"__rl": true,
"mode": "name",
"value": "saurabhg97"
},
"events": [
"pull_request_review_comment"
],
"options": {},
"repository": {
"__rl": true,
"mode": "name",
"value": "weather-app"
},
"authentication": "oAuth2"
},
"credentials": {
"githubOAuth2Api": {
"id": "rnLgyYy9XPnp6GZ9",
"name": "saurabh github"
}
},
"typeVersion": 1
},
{
"id": "c4f82baa-ca82-4858-8d2f-2e9dd7febe3c",
"name": "GitHub Webhookペイロード検証",
"type": "n8n-nodes-base.if",
"position": [
-400,
-32
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "e2adb005-2b3c-4d1e-8445-442df1fe925a",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.body.comment.url }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a739f228-5357-4ab7-bee6-62b7929d08df",
"name": "PRコメント内の開発者質問検出",
"type": "n8n-nodes-base.if",
"position": [
-112,
-48
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "2ad8bc15-beaa-4606-9a8d-ecfd38e446cb",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ \n (\n $json[\"body\"][\"comment\"][\"body\"].toLowerCase().includes(\"how do i\") ||\n $json[\"body\"][\"comment\"][\"body\"].toLowerCase().includes(\"how to\")\n ).toString()\n}}\n",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "5b0d7c5e-cc2d-44fd-9cf2-b6edfc5e08bc",
"name": "開発者質問へのAI回答生成",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
192,
-64
],
"parameters": {
"text": "={{ \n`Question: ${$json[\"body\"][\"comment\"][\"body\"]}\n\nContext: PR Link - ${$json[\"body\"][\"comment\"][\"html_url\"]}\nRepository: ${$json[\"body\"][\"repository\"][\"full_name\"]}\n` \n}}\n",
"options": {
"systemMessage": "=You are a helpful developer assistant. \nProvide short, clear, and technically correct answers (2–3 lines max) to developer questions found in GitHub PR comments.\n"
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "433930c9-f10d-4db5-b419-9ed8a1adb5d0",
"name": "GitHubコメントメタデータ抽出",
"type": "n8n-nodes-base.code",
"position": [
544,
-64
],
"parameters": {
"jsCode": "// Access the original webhook data\nconst webhookData = $(' GitHub PR Comment Trigger').first().json;\n\nreturn [\n {\n json: {\n repository: webhookData.body.repository.full_name,\n comment: webhookData.body.comment.body,\n username: webhookData.body.comment.user.login,\n file_path: webhookData.body.comment.path,\n pr_number: webhookData.body.pull_request.number\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "3c1ef780-1b15-4932-9aa9-99cb89f4195b",
"name": "コメント分析をNotionデータベースに保存",
"type": "n8n-nodes-base.notion",
"position": [
784,
-64
],
"parameters": {
"title": "={{ $json.repository }}",
"simple": false,
"options": {},
"resource": "databasePage",
"databaseId": {
"__rl": true,
"mode": "list",
"value": "265802b9-1fa0-806f-a52a-e6d71d9ff2e0",
"cachedResultUrl": "https://www.notion.so/265802b91fa0806fa52ae6d71d9ff2e0",
"cachedResultName": "test db"
},
"propertiesUi": {
"propertyValues": [
{
"key": "Name|title",
"title": "={{ $json.comment }}"
},
{
"key": "Name|title",
"title": "={{ $json.username }}"
},
{
"key": "Name|title",
"title": "={{ $now }}"
},
{
"key": "Name|title",
"title": "={{ $json.file_path }}"
},
{
"key": "Name|title",
"title": "={{ String($json.pr_number) }}\n"
}
]
}
},
"credentials": {
"notionApi": {
"id": "iDjtgSTYG9ECVBtT",
"name": "Notion account 2"
}
},
"typeVersion": 2.2
},
{
"id": "828abb32-ab14-4a13-aaf8-2d0723df639d",
"name": "エラーをGoogleシートに記録",
"type": "n8n-nodes-base.googleSheets",
"position": [
-128,
256
],
"parameters": {
"columns": {
"value": {},
"schema": [
{
"id": "error_id",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "error_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "error",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "error",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"error_id"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": 1338537721,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y/edit#gid=1338537721",
"cachedResultName": "error log sheet"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1Uldk_4BxWbdZTDZxFUeohIfeBmGHHqVEl9Ogb0l6R8Y/edit?usp=drivesdk",
"cachedResultName": "Interviewer Brief Pack "
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "kpPEOLCGn963qpoh",
"name": "automations@techdome.ai"
}
},
"typeVersion": 4.6
},
{
"id": "5f0bdf64-2400-416f-a2b0-5b8a19bba710",
"name": "付箋8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1024,
160
],
"parameters": {
"height": 576,
"content": "## Node Name: Post AI Answer & PR Link to Slack\n**Action**: Sends the generated AI response and the GitHub PR comment link to a Slack channel or user.\n**Description**:\nThis node posts the AI-generated technical answer (from “Generate AI Response for Developer Question”) directly to Slack, followed by the original GitHub PR comment link for quick context. \nIt ensures that the internal team (or reviewer) is instantly notified whenever a developer’s query is processed by the AI system — allowing faster review and collaboration inside Slack. \nTypically used to streamline developer feedback loops and keep AI-assisted responses visible to the engineering team in real time.\n"
},
"typeVersion": 1
},
{
"id": "945e97e6-b51a-4771-931b-02ab81ef902b",
"name": "AI回答とPRリンクをSlackに投稿",
"type": "n8n-nodes-base.slack",
"position": [
1056,
-64
],
"webhookId": "ddaa7632-9e35-4bd3-82d6-572d5cae84cc",
"parameters": {
"text": "={{ $('Generate AI Response for Developer Question').item.json.output }}{{ $('Detect Developer Question in PR Comment').item.json.body.comment.url }}",
"user": {
"__rl": true,
"mode": "list",
"value": "U09HMPVD466",
"cachedResultName": "newscctv22"
},
"select": "user",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "rNqvWj9TfChPVRYY",
"name": "Slack account vivek"
}
},
"typeVersion": 2.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "9f9ae9c5-9555-4e6d-94e6-2891348064ae",
"connections": {
"5b60a73e-3918-4730-b195-ac429b2f5acf": {
"ai_languageModel": [
[
{
"node": "5b0d7c5e-cc2d-44fd-9cf2-b6edfc5e08bc",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"c6e89357-de32-4be6-bbe0-f486751ead92": {
"main": [
[
{
"node": "c4f82baa-ca82-4858-8d2f-2e9dd7febe3c",
"type": "main",
"index": 0
}
]
]
},
"433930c9-f10d-4db5-b419-9ed8a1adb5d0": {
"main": [
[
{
"node": "3c1ef780-1b15-4932-9aa9-99cb89f4195b",
"type": "main",
"index": 0
}
]
]
},
"c4f82baa-ca82-4858-8d2f-2e9dd7febe3c": {
"main": [
[
{
"node": "a739f228-5357-4ab7-bee6-62b7929d08df",
"type": "main",
"index": 0
}
],
[
{
"node": "828abb32-ab14-4a13-aaf8-2d0723df639d",
"type": "main",
"index": 0
}
]
]
},
"a739f228-5357-4ab7-bee6-62b7929d08df": {
"main": [
[
{
"node": "5b0d7c5e-cc2d-44fd-9cf2-b6edfc5e08bc",
"type": "main",
"index": 0
}
]
]
},
"3c1ef780-1b15-4932-9aa9-99cb89f4195b": {
"main": [
[
{
"node": "945e97e6-b51a-4771-931b-02ab81ef902b",
"type": "main",
"index": 0
}
]
]
},
"5b0d7c5e-cc2d-44fd-9cf2-b6edfc5e08bc": {
"main": [
[
{
"node": "433930c9-f10d-4db5-b419-9ed8a1adb5d0",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - エンジニアリング, AIチャットボット
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
リリースノートをよくある質問用に変換(Jira/ClickUp)
GPT-4oによるClickUpからの自動記事作成とNotion及びSlackへの配信
If
Code
Gmail
+
If
Code
Gmail
20 ノードRahul Joshi
エンジニアリング
新規開発者の入社業務の自動化
GPT-4oを使用した従業員採用業務の自動化:Jira、Notion、Gmailの統合
If
Set
Code
+
If
Set
Code
21 ノードRahul Joshi
人事
営業担当パフォーマンストラッカー
HighLevel CRM、GPT-4o、Notion、そしてSlackを使った自動化のな営業ランキング
If
Code
Slack
+
If
Code
Slack
21 ノードRahul Joshi
顧客管理
API速率制限と認証に関するFAQテスト
GPT-4o-mini、Googleスプレッドシート、Slackアラートを使用したAPIよくある質問品質テストの自動化
If
Set
Code
+
If
Set
Code
19 ノードRahul Joshi
文書抽出
AI ベースの API エラーディレクトリの構築:GitHub から Airtable、Notion、Slack へ
GPT-4o を使用して GitHub API のバグを自動のに検出し、Airtable、Notion、Slack に分類します
If
Set
Code
+
If
Set
Code
30 ノードRahul Joshi
チケット管理
開発者チャットQAキャプチャ(Slack)
Slack から GPT-4o を使って開発者の質問を Notion と Airtable に分類
If
Code
Notion
+
If
Code
Notion
20 ノードRahul Joshi
内部Wiki
ワークフロー情報
難易度
上級
ノード数18
カテゴリー2
ノードタイプ9
作成者
Rahul Joshi
@rahul08Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.
外部リンク
n8n.ioで表示 →
このワークフローを共有