AutomationMart
Home/Browse/Automated PR code reviews with GitHub, GPT-4, and Google Sheets best practices
n8n

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

n8nn8n8 modulesv1.0
Google SheetsOpenAIGitHub

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 an AI agent to generate a code review based on your internal code best practices (fed from a Google Sheet). It ends by posting the review as a comment on the PR and tagging it with a visual label like βœ… Reviewed by AI. πŸ”§ What It Does 1. T

At a glance

Automated PR code reviews with GitHub, GPT-4, and Google Sheets best practices is a ready-made n8n workflow you import as a workflow JSON file β€” no build required. It connects Google Sheets, OpenAI, GitHub. It's free to download. Follow the 5-step import below to go live in minutes.

Platform
n8n
Connects
Google Sheets, OpenAI, GitHub
Modules
8
Price
Free
Version
v1.0
Automated PR code reviews with GitHub, GPT-4, and Google Sheets best practices workflow diagram

About this workflow

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 an AI agent to generate a code review based on your internal code best practices (fed from a Google Sheet). It ends by posting the review as a comment on the PR and tagging it with a visual label like βœ… Reviewed by AI. πŸ”§ What It Does 1. Triggered on PR creation 3. Extracts code diffs from the PR 5. Formats and feeds them into an OpenAI prompt 7. Enriches the prompt using a Google Sheet of Swift best practices 9. Posts an AI-generated review as a comment on the PR 11. Applies a PR label to visually mark reviewed PRs βœ… Prerequisites Before deploying this workflow, ensure you have the following: - n8n Instance (Self-hosted or Cloud) - GitHub Repository with PR activity - OpenAI API Key for GPT-4o, GPT-4-turbo, or GPT-3.5 - GitHub OAuth App (or PAT) connected to n8n to post comments and access PR diffs - (Optional) Google Sheets API credentials if using the code best practices lookup node. βš™οΈ Setup Instructions 1. Import the Workflow in n8n, click on Workflows β†’ Import from file or JSON Paste or upload the JSON code of this template 2. Configure Triggers and Connections πŸ” GitHub Trigger - Node: PR Trigger - Repository: Select the GitHub repo(s) to monitor - Events: Set to pullrequest - Auth: Use GitHub OAuth2 credentials πŸ“₯ HTTP Request Node: Get file's Diffs from PR No authentication needed; it uses dynamic path from trigger 🧠 OpenAI Model - Node: OpenAI Chat Model - Model: Select gpt-4o, gpt-4-turbo, or gpt-3.5-turbo - Credential: Provide your OpenAI API Key πŸ§‘β€πŸ’» Code Review Agent Node : Code Review Agent Connected to OpenAI and optionally to tools like Google Sheets πŸ’¬ GitHub Comment Poster Uses GitHub API to post review comments back on PR Node: GitHub Robot Credential: Use the agent Github account (OAuth or PAT) Repo : Pick your owen Github Repository 🏷️ PR Labeler (optional) Adds label ReviewedByAI after successful comment Node: Add Label to PR Label : you ca customize the label text of your owen tag. πŸ“Š Google Sheet Best Practices config (optional) Connects to a Google Sheet for coding guideline lookups, we can replace Google sheet by another tool or data base - First prepare your best practices list with the clear description and the code bad/good examples - Add al the best practices in your Google Sheet - Configure the Code Best Practices node in the template : Credential : Use your Google Sheet account by OAuth2 URL : Add your Google Sheet document URL Sheet : Add the name of the best practices sheet

n8n

How to import this n8n workflow

  1. 1

    Download the workflow JSON file after purchase.

  2. 2

    Open n8n β†’ click the menu β†’ Import from File.

  3. 3

    Select the downloaded JSON and import.

  4. 4

    Set up credentials for each node that requires them.

  5. 5

    Click Execute Workflow to test, then activate.

Setup guide

Setup guide included

Purchase to unlock the full step-by-step guide

Related N8n workflows

Generate contextual YouTube comments automatically with GPT-4o

Workflow Overview This cutting-edge n8n workflow is a powerful automation tool designed to revolutionize how content creators and marketers engage with YouTube channels. By leveraging AI and the YouTube Data API, this workflow automatically: 1. Discovers New Content: - Monitors a specific YouTube channel - Retrieves the latest video in real-time - Checks for new uploads at regular intervals 2. Generates Intelligent Comments: - Uses advanced AI (OpenAI's GPT models) to analyze video metadata

Free

Reddit API Hub: Manage posts, comments & subreddits via server-sent events

Reddit Content Operations via MCP Server πŸ§‘β€πŸ’Ό Who is this for? This workflow is built for content creators, marketers, Reddit automation enthusiasts, and AI agent developers who want structured, programmable access to Reddit content. If you're researching niche communities, tracking trends, or automating Reddit engagement β€” this is for you. πŸ’‘ What problem is this workflow solving? Reddit has valuable content scattered across subreddits, but manual analysis or engagement is inefficient. This workf

Free

Generate videos with AI, ElevenLabs,PIAPI Shotstack/Creatomate & post to Youtube

Auto-Generate Long Videos with AI, ElevenLabs,PIAPI,Shotstack/Creatomate & Post to Youtube Overview This n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform integrations (Airtable, Google Sheets, YouTube) to streamline the process. Target Audience - Content creators, video producers, and YouTubers seeking to auto

Free

Track portfolio performance and risk using Google Sheets and Alpha Vantage

Description This workflow helps users track and understand the performance of their stock portfolio in an automated and structured way. It reads portfolio holdings from Google Sheets, fetches the latest market prices, calculates key performance metrics, and updates the results back into the same sheet. In addition to standard return calculations, the workflow also classifies each holding based on overall performance and risk, making the output more actionable and easier to interpret. The workflo

Free

Automate daily AI news with Perplexity Sonar Pro (via Telegram)

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. 🧠 Perplexity-Powered Daily AI News Digest (via Telegram) This ready-to-deploy n8n workflow automates the entire process of collecting, filtering, formatting, and distributing daily AI industry news summaries directly to your Telegram group or channel. Powered by Perplexity and OpenAI, it fetches only high-signal AI updates from trusted sources (e.g. OpenAI, DeepMind, HuggingFace, MIT Tech

Free

Send Go4Clients personalized SMS to new Google Sheet Spreadsheet rows

When a new row is added to Google Sheets Spreadsheet, Go4Clients will send a personalized SMS to the recipient. The template uses [this](https://docs.google.com/spreadsheets/d/1y0wCp8jhPwAxxwEsD8KF6Tzxy6s7-mQdIQ5VoXrQl40/edit?usp=sharing) example spreadsheet.

Free

Get AI insights from Databox in Slack using OpenAI

Stop switching between Slack and your analytics dashboards. Mention the bot in any Slack channel, ask a business question, and get an AI-powered answer from Databox in seconds - without leaving Slack. Who's it for - Marketing and growth teams who want instant data answers during standups - Managers who need quick metric checks without logging into dashboards - Anyone using Slack who wants to query Databox data conversationally How it works 1. @mention the bot in Slack with a business question 2.

Free

Create AI-driven social media posts and publish to all major platforms

This n8n template is a complete, two-part social media engine: it automates competitor/inspiration research, uses AI to recreate viral formats for your niche, and handles multi-platform distribution with auto-generated visuals. Instead of staring at a blank page, this workflow scrapes top-performing content, breaks down the psychological hooks, rewrites it for your specific audience, and drafts a custom text graphic. Once you approve the draft, n8n handles the heavy lifting of posting it ever

Free

Reviews

No reviews yet

Be the first to buy and share your experience.

Leave a review

Sign in to share your experience with this workflow.

Log in to review
Free
No ratings yet

Create a free account to purchase workflows.

  • JSON blueprint β€” instant download
  • Setup guide PDF included
  • 5 downloads Β· valid 30 days
  • Works with n8n

Need help setting this up?

Book a 3-hour live setup session with an Agility consultant.

β‚Ή2,499/ session
3 hrs Β· video call
  • Configure live on Google Meet / Zoom
  • Free follow-up if workflow has defects
  • Platform expert assigned to you
Book installation session
Free