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 Triggered on PR creation Extracts code diffs from the PR Formats and feeds them into an OpenAI prompt Enriches the prompt using a Google Sheet of Swift best practices Posts an AI-generated review as a comment on the PR 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.
Tags
Related workflows
See all AI Automation→AI: Summarize podcast episode and enhance using Wikipedia
The workflow automates the process of creating a summarized and enriched podcast digest, which is then sent via email. Note that to use this template, you need to be on n8n version 1.19.4 or later.
Route WhatsApp support requests with Claude, Supabase, HubSpot and Slack
Quick overview This workflow turns incoming WhatsApp messages (text, audio, images, and documents) into actionable support interactions by extracting content, detecting sentiment, and using an AI agent with a Supabase knowledge base to route requests to Google Calendar, HubSpot, Slack, Gmail, and back to WhatsApp. How it works Receives incoming WhatsApp messages via a WhatsApp webhook trigger. Routes the message by type and converts it into text using OpenAI Whisper for audio, OpenAI GPT-4o Vision for images, or a PDF extractor for documents (or passes text messages through). Loads the sender’s session context from Supabase and runs sentiment/language detection on the extracted text. Uses a LangChain AI agent (Claude) with Supabase vector search (with OpenAI embeddings and Cohere reranking) plus tool access (Google Calendar, HubSpot, Slack, and Gmail) to produce a structured intent, response, and metadata. Logs conversation analytics (intent, sentiment, message type, and response length) to an n8n Data Table. Routes by intent to either create a Google Calendar event, create/update a HubSpot contact, email a document via Gmail (and upload it to Google Drive), create a HubSpot ticket
Create TikTok carousel posts with Upload Post, Google Sheets, Gemini, GPT-4.1
Quick overview This workflow runs daily to pull TikTok post and profile analytics from Upload Post, updates a Google Sheets performance log, uses Google Gemini and OpenAI to generate a new carousel concept and caption, creates four images via fal.ai, publishes to TikTok, and updates a persistent “Agent Skill” sheet. How it works Runs on a daily schedule (or manually) and loads product, Upload Post, and Google Sheets configuration values. Reads the Google Sheets “Performance Log,” selects posts missing stats or posted recently, fetches TikTok post analytics from the Upload Post API, and writes updated metrics back to the sheet. Aggregates the refreshed history, fetches TikTok profile analytics from Upload Post, reads the “Agent Skill” sheet, and compiles a single context summary. Uses Google Gemini (via a structured JSON output) to generate a TikTok carousel plan including caption, strategy notes, four slide prompts, hashtags, and an engagement question. Sends the four prompts to fal.ai to generate four 9:16 PNG carousel images and collects their hosted image URLs. Uses OpenAI (GPT-4.1) to write a short TikTok photo-post description, publishes the carousel to TikTok via Upload Post