Back to Catalog

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

Rahul JoshiRahul Joshi
36 views
2/3/2026
Official Page

📘 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

Auto-Answer GitHub PR Questions with GPT-4o, Notion & Slack for Dev Teams

This n8n workflow automates the process of answering common questions on GitHub Pull Requests (PRs) using an AI agent, then logs the interaction in Notion and notifies a Slack channel. It helps development teams streamline communication and reduce manual effort in PR reviews.

What it does

This workflow is triggered by an event on GitHub and performs the following steps:

  1. Listens for GitHub Events: It waits for specific events on a configured GitHub repository, likely related to Pull Requests (e.g., new comments, PR opened, etc.).
  2. Filters Events (Implicit): Although not explicitly shown with an "If" node, the subsequent "Code" node suggests that the workflow processes only relevant GitHub events (e.g., comments that are questions).
  3. Extracts & Processes Data with Code: A "Code" node extracts specific information from the GitHub event payload and prepares it for the AI agent. This likely involves identifying the PR, the comment, and the user.
  4. Engages AI Agent (GPT-4o via Azure OpenAI): An "AI Agent" node, powered by an "Azure OpenAI Chat Model" (configured for GPT-4o), processes the extracted GitHub comment. It's designed to understand the question asked in the PR comment and formulate an appropriate response.
  5. Logs Interaction to Google Sheets: The AI's response and potentially other details from the GitHub event are logged into a Google Sheet for record-keeping and analysis.
  6. Logs Interaction to Notion: A Notion database entry is created or updated with the details of the GitHub PR question and the AI's generated answer, providing a centralized knowledge base.
  7. Posts to Slack: A message containing the GitHub PR details and the AI's response is posted to a designated Slack channel, keeping the development team informed about automated PR interactions.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance (cloud or self-hosted).
  • GitHub Account: A GitHub account with access to the repositories you want to monitor.
  • GitHub Credential in n8n: Configured GitHub OAuth or Personal Access Token credential in n8n.
  • Azure OpenAI Account/API Key: Access to Azure OpenAI services, specifically for the GPT-4o model.
  • Azure OpenAI Credential in n8n: Configured Azure OpenAI credential in n8n.
  • Google Sheets Account: A Google account with access to Google Sheets.
  • Google Sheets Credential in n8n: Configured Google Sheets OAuth credential in n8n.
  • Notion Account: A Notion workspace with a database set up to log PR interactions.
  • Notion Credential in n8n: Configured Notion API Key credential in n8n.
  • Slack Account: A Slack workspace with a channel for notifications.
  • Slack Credential in n8n: Configured Slack OAuth or Bot Token credential in n8n.

Setup/Usage

  1. Import the workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • GitHub Trigger: Configure your GitHub credential and select the repository and event types you wish to monitor (e.g., Pull Request events, specifically issue_comment if you only want to respond to comments).
    • Azure OpenAI Chat Model: Configure your Azure OpenAI credential, ensuring it points to your GPT-4o deployment.
    • Google Sheets: Configure your Google Sheets credential and specify the Spreadsheet ID and Sheet Name where you want to log data.
    • Notion: Configure your Notion credential and specify the Database ID where you want to create entries.
    • Slack: Configure your Slack credential and specify the Channel ID where notifications should be posted.
  3. Review and Customize Code Node: The "Code" node (id: 834) will likely contain logic to parse the GitHub event. You may need to adjust this JavaScript code to precisely extract the data points relevant to your use case or to filter specific types of comments.
  4. Customize AI Agent Prompt: The "AI Agent" node (id: 1119) will have a prompt that guides the AI's behavior. Refine this prompt to ensure the AI provides helpful and accurate answers to your PR questions.
  5. Activate the workflow: Once all credentials and configurations are set, activate the workflow.

Now, whenever a configured GitHub event occurs (e.g., a new comment on a Pull Request), the workflow will trigger, process the event with AI, log the details, and notify your team.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution

AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) 🧠 AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative — all powered by AI logic, sir. --- 💡 Key Advantages ⚡ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. 🧠 AI Qualification Engine An OpenAI-powered Agent evaluates the lead’s industry, region, and needs to generate a persona summary and routing rationale. 📊 Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. 💬 Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. 🔁 Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- ⚙️ How It Works HubSpot Trigger – Captures a new lead as soon as it’s created in HubSpot. Fetch Contact Data – Retrieves all relevant fields like name, company, and industry. Clean & Format Data – A Code node standardizes and structures the data for consistency. Airtable Record Creation – Logs the lead data into the “Leads” table for centralized tracking. AI Agent Qualification – The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update – Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification – Sends a real-time message tagging the rep with lead info. Gmail Notification – Sends a personalized handoff email with context and follow-up actions. HubSpot Sync – Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- 🛠️ Setup Steps Trigger Node: HubSpot → Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the “Leads” table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- 🔐 Credentials Required HubSpot OAuth2 API – To fetch and update leads. Airtable Personal Access Token – To store and update lead data. OpenAI API – To power the AI qualification and matching logic. Slack OAuth2 – For sending team notifications. Gmail OAuth2 – For automatic email alerts to assigned reps, sir. --- 👤 Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- 💬 Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular — perfect for scaling across global sales teams, sir.

MANISH KUMARBy MANISH KUMAR
113