ChatGPT Automatic Code Review in Gitlab MR
n8n template #2167Summary
Use templateWho this template is for This template is for every engineer who wants to automate their code reviews or just get a 2nd opinion on their PR. How it works This workflow will automatically review your changes in a Gitlab PR using the power of AI. It will trigger whenever you comment with +0 to a Gitlab PR, get the code changes, analyze them with GPT, and reply to the PR discussion. Set up Steps Set up webhook of noteevents in Gitlab repository (see here on how to do it) Configure ChatGPT credentials Note "+0" in MergeRequest to trigger automatic review by ChatGPT
How to set it up
- Open template #2167 on n8n.io and click Use for free, or copy the template JSON and paste it onto an empty canvas in n8n.
- Create a credential under Credentials → Add credential: OpenAI Chat Model. Then open each of those nodes and pick the credential.
- Check the model in the OpenAI Chat Model node. The template may point at a model your account can't use; swap it for one you have access to.
- Click Execute workflow and step through each node's output to confirm the data looks right.
- Toggle the workflow to Active so its trigger runs on its own.
Hand off to your agent
Prompt
Help me set up the n8n workflow "ChatGPT Automatic Code Review in Gitlab MR" (https://n8n.io/workflows/2167). It uses: HTTP Request, Code, Basic LLM Chain, OpenAI Chat Model. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Questions
Yes. assert published it free on n8n.io, and it has 29K views. It runs on n8n Cloud or a self-hosted n8n instance.
OpenAI Chat Model. The other 3 nodes are built into n8n.
Similar workflows
NameViews
- Host Your Own AI Deep Research Agent with n8n, Apify and OpenAI o348K
- AI-Powered Information Monitoring with OpenAI, Google Sheets, Jina AI and Slack18K
- Extract data from resume and create PDF with Gotenberg15K
- Automated Invoice Processing with Telegram, GPT-4o, OCR and SAP Integration13K
- Narrating over a Video using Multimodal AI8,840
- Automate SEO blog content creation with GPT-4, Perplexity AI and WordPress6,949
- Scale Deal Flow with a Pitch Deck AI Vision, Chatbot and QDrant Vector Store6,822
- Auto-Tag Blog Posts in WordPress with AI6,278