← All N8N workflows
AI & researchAgentCodeGitlab TriggerGmailHTTP Request

GitLab MR Auto-Review & Risk Assessment

Configured with Agent, Gitlab Trigger, Gmail, HTTP Request, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Web / APIExtract DiffHTTP RequestCodeDistribution ListGeneratorCodeRoutingIf Some ChangeIfTransformMergeMergeAI & modelsAI AgentAgentTransformAuto-fixing OutputParserOutput Parser AutofixingTransformStructured OutputParserOutput Parser StructuredAI & modelsAnthropic Chat ModelAnthropic Chat ModelAI & modelsAnthropic Chat Model1Anthropic Chat ModelWeb / APIComment Back on MRHTTP RequestTriggerGitLab TriggerGitlab TriggerMessagingSend to DL ( EmailNotification)GmailTriggerGitLab Trigger1Gitlab TriggerTriggerGitLab Trigger2Gitlab Trigger

Node categories in this workflow

  • Web / API
  • Code
  • Routing
  • Transform
  • AI & models
  • Trigger
  • Messaging

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Extract DiffWeb / APIHTTP RequestSee node parameters
Distribution List GeneratorCodeCodeSee node parameters
If Some ChangeRoutingIfSee node parameters
MergeTransformMergeSee node parameters
AI AgentAI & modelsAgentSee node parameters
Auto-fixing Output ParserTransformOutput Parser AutofixingSee node parameters
Structured Output ParserTransformOutput Parser StructuredSee node parameters
Anthropic Chat ModelAI & modelsAnthropic Chat ModelSee node parameters
Anthropic Chat Model1AI & modelsAnthropic Chat ModelSee node parameters
Comment Back on MRWeb / APIHTTP RequestPOST
GitLab TriggerTriggerGitlab TriggerSee node parameters
Send to DL ( Email Notification)MessagingGmailSee node parameters
GitLab Trigger1TriggerGitlab TriggerSee node parameters
GitLab Trigger2TriggerGitlab TriggerSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • anthropicApi
  • gitlabApi
  • gmailOAuth2

Workflow notes

Sticky Note1
  • Triggers workflow when a merge request (MR) is created or updated.

  • Add GitLab credentials. Select merge_requests event.

Sticky Note2
  • Fetches code changes (diffs) from GitLab using API.

  • Replace Authorization token with your GitLab API key.

Sticky Note3
  • Ensures that MR contains changes before proceeding.

  • No setup required.

Sticky Note4
  • Calls Claude AI to analyze the diff and generate: Risk Level, Issues, Recommendations, Test Cases.

  • Add Anthropic API Key (Claude AI).

Sticky Note5
  • Cleans and refines AI output for structured reporting.
  • No setup required.
Sticky Note7
  • Creates a list of developers & QA testers for email notifications.

  • Update email mappings for your team.

Sticky Note8
  • Sends an HTML-formatted MR Report to developers & QA teams.

  • Add Gmail credentials.

Sticky Note9
  • Posts AI-generated review report as a GitLab MR comment.
  • Replace Authorization token with your GitLab API key.
GitLab MR Auto-Review & Risk Assessment

GitLab MR Auto-Review & Risk Assessment

Purpose and structure

This folder contains the GitLab MR Auto-Review & Risk Assessment workflow. Its executable nodes use agent, code, gitlabTrigger, gmail, httpRequest, if, lmChatAnthropic, merge, outputParserAutofixing, outputParserStructured. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

GitLab Trigger, GitLab Trigger1, GitLab Trigger2

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Gitlab/1895_Gitlab_Code_Automation_Webhook.json MIT; preserve source notices.

More in AI & research