Templates / Automated PR code reviews with GitHub, GPT-4, and Google Sheets best practices

Automated PR code reviews with GitHub, GPT-4, and Google Sheets best practices

Needs changes

by Jihene · 14,647 views · created 2025-04-30 · DevOps, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 8 nodes and runs on Github events (pull request). Along the way it connects OpenAI Chat Model, GitHub and Google Sheets.

How it runs

Trigger: On Github events (pull request).

  1. Get file's Diffs from PR (HTTP Request): calls an HTTP API
  2. Create target Prompt from PR Diffs (Code): runs custom JavaScript code
  3. Code Review Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (Code Best Practices)
  4. GitHub: work with review
  5. Add Label to PR (GitHub): edit

Services it uses

OpenAI Chat ModelGitHubGoogle Sheets

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in Code Review Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
Code Review Agent (v1.9)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (7)

From the author

AI-Agent Code Review for GitHub Pull Requests Description: This n8n workflow automates the process of reviewing code changes in GitHub pull requests using an OpenAI-powered agent. It connects your GitHub repo, extracts modified files, analyzes diffs, and uses…

Excerpt from Jihene's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.