Use this powerful n8n workflow to automatically trigger AI code reviews on GitHub push events using Groq's LLM, parse diffs with an n8n node, and send detailed HTML reports via Gmail.
Download this n8n workflow template and start using it instantly.
Manual code review can be time-consuming, especially for minor commits. This automation solves that by transforming a standard GitHub push into a comprehensive, AI-reviewed report. This robust n8n workflow leverages the Github Trigger to initiate the process, extracts code changes, and utilizes an AI Agent configured with Groq (an effective alternative to OpenAI) to analyze the code diffs for functional, style, and security issues. The final output is a highly readable, color-coded HTML report delivered directly via Gmail. This type of advanced n8n workflow showcases the power of combining platform-specific n8n node types with advanced large language models for critical development tasks.
This automated n8n workflow follows a seven-step process:
Github Trigger n8n node initiates the workflow upon a push event to a configured GitHub repository.Parser (Set n8n node) extracts essential metadata like repository name, owner, and the specific commit ID from the GitHub payload.HTTP Request n8n node calls the GitHub API using the commit ID to retrieve the full commit object, including the necessary file diffs (patch).Code n8n node processes the raw data. It runs custom JavaScript to generate a rich HTML snippet containing commit information and color-coded file patches (diffs). This formatted input is crucial for the AI.Groq Chat Model n8n node is configured as the LLM provider, and a Simple Memory n8n node provides conversational context (though often minimal for single-shot review). The AI Agent n8n node is then activated, using a highly specific system prompt defining it as a professional code reviewer and enforcing a strict HTML output format based on review results.Code n8n node (Output Parser) combines the initial formatted HTML (commit details and diffs) with the AI-generated review summary HTML block, creating the final email body.Gmail n8n node uses the compiled HTML to send a final, comprehensive code review email to the designated recipient, concluding this powerful n8n workflow.To deploy this n8n template, follow these steps:
Github Trigger n8n node and the HTTP Request n8n node (which uses githubOAuth2Api).Github Trigger n8n node, select the target repository and ensure the webhook is active and listening for push events.Groq Chat Model n8n node credentials. Note that you can easily swap this component for an OpenAI Chat Model n8n node if preferred.Gmail n8n node.Gmail n8n node to your desired review notification address. Github Trigger (n8n trigger): The starting point of the n8n workflow. It is configured to listen specifically for push events on a selected GitHub repository, ensuring the automation runs only when code changes are committed.
HTTP Request (n8n node): Fetches the detailed commit information from the GitHub API using the commit ID extracted by the Parser. Key configuration uses predefined GitHub credentials for authentication.
Code (n8n node - Formatter): Contains complex JavaScript logic (formatPatch and renderResponse functions) to transform the raw commit diff into a visually appealing, color-coded HTML structure. This output is essential context for the downstream AI Agent.
Groq Chat Model (n8n node): Serves as the high-speed LLM provider for the AI component, utilizing models like llama-3.1-8b-instant for rapid analysis within the n8n workflow.
AI Agent (n8n node): The core intelligence of the n8n workflow. It receives the formatted HTML and uses a system prompt to execute a professional code review, checking for functional errors, style, security, and returning a result formatted in a specific HTML summary block.
Output Parser (Code n8n node): Combines the commit details HTML and the AI review summary HTML into a single payload, ensuring the final email is complete.
Automate your accounts receivable with this sophisticated n8n workflow. It uses a scheduled n8n trigger, PostgreSQL data, and OpenAI integration to generate and send personalized, urgent payment reminders and automatically log payments.

Use this powerful n8n workflow to automate invoice data extraction from PDFs sent via Telegram. It leverages OpenAI's GPT-4o and logs structured data into Airtable. Explore more n8n templates.

Automate accounts payable using this sophisticated n8n workflow. Extract structured PDF invoice data using GPT-4o, match vendors against an Airtable database, and manage the entry process automatically. Leverage the power of n8n templates for finance automation.

Use this comprehensive n8n workflow to automate code reviews. Triggered by GitHub push events, this n8n template utilizes the Groq AI model to analyze code diffs and instantly email a structured review summary via Gmail.

Deploy a comprehensive AI-powered tutor using n8n and OpenAI. This advanced n8n workflow manages scheduled daily lessons and real-time chat support via Telegram and Airtable.

Automate lead qualification and response using this powerful n8n workflow. It leverages the n8n node for IMAP to trigger on new emails, uses GPT-4o for classification, and sends personalized replies instantly via Gmail.









































