Skip to main content

Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams

Workflow preview

Workflow preview
100%
Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Description: This workflow automates developer Q&A handling by connecting GitHub, GPT 4o (Azure OpenAI), Notion, Google Sheets, and Slack. Whenever a developer comments on a pull request with a ...

Best for

  • Engineering automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.lmchatazureopenai, n8n-nodes-base.stickynote, n8n-nodes-base.githubtrigger, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, n8n-nodes-base.notion, n8n-nodes-base.googlesheets

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams
Workflow name
Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams

📘 Description:

This workflow automates developer Q&A handling by connecting GitHub, GPT-4o (Azure OpenAI), Notion, Google Sheets, and Slack. Whenever a developer comments on a pull request with a “how do I…” or “how to…” question, the workflow automatically detects the query, uses GPT-4o to generate a concise technical response, stores it in Notion for documentation, and instantly shares it on Slack for visibility. It reduces repetitive manual answering, boosts engineering knowledge sharing, and keeps teams informed with AI-powered insights.

⚙️ What This Workflow Does (Step-by-Step)

🟢 GitHub PR Comment Trigger — Starts the automation when a pull request comment is posted in a specified repository. Action: Listens for pull_request_review_comment events. Description: Captures comment text, author, PR number, and repository name as the trigger payload.

🔍 Validate GitHub Webhook Payload (IF Node) — Ensures the webhook data includes a valid comment URL. ✅ True Path: Continues to question detection. ❌ False Path: Sends invalid or missing data to Google Sheets for error logging.

❓ Detect Developer Question in PR Comment — Checks whether the comment includes question patterns such as “how do I…” or “how to…”. If a valid question is found, the workflow proceeds to the AI assistant; otherwise, it ends silently.

🧠 Configure GPT-4o Model (Azure OpenAI) — Connects to the GPT-4o model for intelligent language generation. Acts as the central AI engine to craft short, precise technical answers.

🤖 Generate AI Response for Developer Question — Sends the developer’s comment and PR context to GPT-4o. GPT analyzes the question and produces a short (2–3 line) helpful answer, maintaining professional and technical tone.

🧩 Extract GitHub Comment Metadata — Uses a JavaScript code node to structure key details (repo, user, comment, file path, PR number) into a clean JSON format. Prepares standardized data for storage and further use.

🧾 Save Comment Insight to Notion Database — Appends the GitHub comment, AI response, and metadata into a Notion database (“test db”). Acts as a centralized knowledge base for tracking and reusing AI-generated technical answers.

💬 Post AI Answer & PR Link to Slack — Sends the generated response and GitHub PR comment link to a Slack channel or user. Helps reviewers or teammates instantly view AI-generated suggestions and maintain active discussion threads.

🚨 Log Errors in Google Sheets (Error Handling) — Logs webhook validation or AI-processing errors into a shared Google Sheet (“error log sheet”). Ensures full visibility into workflow issues for future debugging.

🧩 Prerequisites

  • GitHub OAuth credentials with webhook access
  • Azure OpenAI (GPT-4o) account
  • Notion API integration for the documentation database
  • Slack API connection for notifications
  • Google Sheets API access for error tracking

💡 Key Benefits

✅ Automated detection of developer questions in GitHub comments ✅ AI-generated instant answers with context awareness ✅ Centralized documentation in Notion for knowledge reuse ✅ Real-time Slack notifications for visibility and collaboration ✅ Continuous error logging for transparent troubleshooting

👥 Perfect For

  • Developer teams using GitHub for code reviews
  • Engineering leads wanting AI-assisted PR support
  • Companies aiming to build self-learning documentation
  • Teams using Notion and Slack for workflow visibility

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 - Configure GPT-4o Model

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

Block 2 - Sticky Note

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

Block 3 - Sticky Note1

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

Block 4 - Sticky Note2

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

Block 5 - Sticky Note3

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

Block 6 - Sticky Note4

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

Block 7 - Sticky Note5

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

Block 8 - Sticky Note6

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

Block 9 - Sticky Note7

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

Block 10 - GitHub PR Comment Trigger

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

Block 11 - Validate GitHub Webhook Payload

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

Block 12 - Detect Developer Question in PR Comment

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

Block 13 - Generate AI Response for Developer Question

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 14 - Extract GitHub Comment Metadata

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

Block 15 - Save Comment Insight to Notion Database

Type / Role
n8n-nodes-base.notion - notion
Config choices
Version 2.2

Block 16 - Log Errors in Google Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 17 - Sticky Note8

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

Block 18 - Post AI Answer & PR Link to Slack

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

3. Summary Table

Workflow Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams
Complexity advanced
Nodes 18
Categories Engineering, AI Chatbot
Author Rahul Joshi
Published 30 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10331/10331.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 Auto-answer GitHub PR questions with GPT-4o, Notion & Slack for dev teams do?

Description: This workflow automates developer Q&A handling by connecting GitHub, GPT 4o (Azure OpenAI), Notion, Google Sheets, and Slack. Whenever a developer comments on a pull request with a ...

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 Engineering, AI Chatbot use case.