AI-Powered Knowledge Assistant using Google Sheets, OpenAI, and Supabase Vector Search
AI-Powered GitHub Commit Reviewer
Overview
Workflow Name: AI-Powered GitHub Commit Reviewer
Author: Akhil
Purpose: This n8n workflow triggers on a GitHub push event, fetches commit diffs, formats them into HTML, runs an AI-powered code review using Groq LLM, and sends a detailed review via email.
How It Works (Step-by-Step)
-
GitHub Trigger Node Type**: n8n-nodes-base.githubTrigger Purpose**: Initiates the workflow on GitHub push events. Repo**: akhilv77/relevance Output**: JSON with commit and repo details.
-
Parser Node Type**: n8n-nodes-base.set Purpose**: Extracts key info (repo ID, name, commit SHA, file changes).
-
HTTP Request Node Type**: n8n-nodes-base.httpRequest Purpose**: Fetches commit diff details using GitHub API. Auth**: GitHub OAuth2 API.
-
Code (HTML Formatter) Node Type**: n8n-nodes-base.code Purpose**: Formats commit info and diffs into styled HTML. Output**: HTML report of commit details.
-
Groq Chat Model Node Type**: @n8n/n8n-nodes-langchain.lmChatGroq Purpose**: Provides the AI model (llama-3.1-8b-instant).
-
Simple Memory Node Type**: @n8n/n8n-nodes-langchain.memoryBufferWindow Purpose**: Maintains memory context for AI agent.
-
AI Agent Node Type**: @n8n/n8n-nodes-langchain.agent Purpose**: Executes AI-based code review. Prompt**: Reviews for bugs, style, grammar, and security. Outputs styled HTML.
-
Output Parser Node Type**: n8n-nodes-base.code Purpose**: Combines commit HTML with AI review into one HTML block.
-
Gmail Node Type**: n8n-nodes-base.gmail Purpose**: Sends review report via email. Recipient**: akhilgadiraju@gmail.com
-
End Workflow Node Type**: n8n-nodes-base.noOp Purpose**: Marks the end.
Customization Tips
GitHub Trigger**: Change repo/owner or trigger events. HTTP Request**: Modify endpoint to get specific data. AI Agent**: Update the prompt to focus on different review aspects. Groq Model**: Swap for other supported LLMs if needed. Memory**: Use dynamic session key for per-commit reviews. Email**: Change recipient or email styling.
Error Handling
Use Error Trigger nodes to handle failures in: GitHub API requests LLM generation Email delivery
Use Cases
Instant AI-powered feedback on code pushes. Pre-human review suggestions. Security and standards enforcement. Developer onboarding assistance.
Required Credentials
| Credential | Used By | Notes | |-----------|---------|-------| | GitHub API (ID PSygiwMjdjFDImYb) | GitHub Trigger | PAT with repo and admin:repo_hook | | GitHub OAuth2 API | HTTP Request | OAuth2 token with repo scope | | Groq - Akhil (ID HJl5cdJzjhf727zW) | Groq Chat Model | API Key from GroqCloud | | Gmail OAuth2 - Akhil (ID wqFUFuFpF5eRAp4E) | Gmail | Gmail OAuth2 for sending email |
Final Note
Made with ❤️ using n8n by Akhil.
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
📸 Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments