{
  "name": "GitLab merge request review & risk analysis with Claude/GPT AI",
  "nodes": [
    {
      "id": "a82f2b02-538b-4531-921c-d25f1edb97ef",
      "name": "Extract Diff",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        320
      ]
    },
    {
      "id": "cd028c77-23e7-46d6-964d-af5afe468176",
      "name": "Distribution List Generator",
      "type": "n8n-nodes-base.code",
      "position": [
        2040,
        160
      ]
    },
    {
      "id": "922c9f5f-2db2-4034-8491-33208f04e580",
      "name": "If Some Change",
      "type": "n8n-nodes-base.if",
      "position": [
        1100,
        320
      ]
    },
    {
      "id": "e41fc6b0-ccc7-46c9-9667-79b199aaefc8",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        600,
        320
      ]
    },
    {
      "id": "1bf7f593-a7d9-48f5-be20-d73e97b030bb",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1400,
        300
      ]
    },
    {
      "id": "f888ea7c-04d4-4192-aa72-10c341da80c8",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        1540,
        600
      ]
    },
    {
      "id": "e52227f3-e606-4ec9-b338-c36fe7ca4b6d",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1760,
        940
      ]
    },
    {
      "id": "360985e5-1195-4411-ab5e-daf182f3be9b",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1560,
        940
      ]
    },
    {
      "id": "e912886a-2a4c-4f82-b14b-71db3ee2b616",
      "name": "Anthropic Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1400,
        940
      ]
    },
    {
      "id": "320b0fa4-f864-4a3c-8d25-f2cac2512fbf",
      "name": "Comment Back on MR",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2040,
        480
      ]
    },
    {
      "id": "0f8237ca-f3fb-46cc-b173-d42ea4cd447e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        140
      ],
      "parameters": {
        "width": 220,
        "height": 360,
        "content": "- Triggers workflow when a merge request (MR) is created or updated.  \n\n- Add GitLab credentials. Select merge_requests event."
      }
    },
    {
      "id": "2ddc9aa2-3673-4b64-8ffb-ba7428b67dbe",
      "name": "GitLab Trigger",
      "type": "n8n-nodes-base.gitlabTrigger",
      "position": [
        0,
        300
      ]
    },
    {
      "id": "f751cca3-781e-4eaa-bd90-da329ed53a7f",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        160
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "- Fetches code changes (diffs) from GitLab using API.  \n\n- Replace Authorization token with your GitLab API key."
      }
    },
    {
      "id": "ade683bb-8608-44bb-8047-f6c1b7de8f00",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1060,
        160
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "- Ensures that MR contains changes before proceeding.\n\n- No setup required."
      }
    },
    {
      "id": "281db918-d9a9-43bc-ae51-c3631e2ac494",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1320,
        160
      ],
      "parameters": {
        "width": 380,
        "height": 320,
        "content": "- Calls Claude AI to analyze the diff and generate: Risk Level, Issues, Recommendations, Test Cases.\n\n- Add Anthropic API Key (Claude AI)."
      }
    },
    {
      "id": "a7a1e7f4-1504-49be-8199-f929fc83f65e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        500
      ],
      "parameters": {
        "width": 360,
        "height": 220,
        "content": "- Cleans and refines AI output for structured reporting.\n- No setup required."
      }
    },
    {
      "id": "fdbc74ea-a9cd-4811-b5b4-4eeadff28dff",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        900
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n- Cleans and refines AI output for structured reporting.\n- No setup required."
      }
    },
    {
      "id": "e402a3ff-daac-4bae-bbb6-f9696c9adab5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        0
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "- Creates a list of developers & QA testers for email notifications.\n\n- Update email mappings for your team."
      }
    },
    {
      "id": "21818092-87db-42c6-af12-cbe1632c79ab",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2220,
        0
      ],
      "parameters": {
        "width": 220,
        "height": 320,
        "content": "- Sends an HTML-formatted MR Report to developers & QA teams.\n\n- Add Gmail credentials."
      }
    },
    {
      "id": "13e5b3fa-c3a0-4399-baf7-84b99865907c",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1980,
        340
      ],
      "parameters": {
        "width": 220,
        "height": 300,
        "content": "- Posts AI-generated review report as a GitLab MR comment.\n- Replace Authorization token with your GitLab API key."
      }
    },
    {
      "id": "REPLACE_WITH_GMAIL_OAUTH_ID",
      "name": "Send to DL ( Email Notification)",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2280,
        140
      ]
    },
    {
      "id": "REPLACE_WITH_GITLAB_CRED_ID",
      "name": "GitLab Trigger1",
      "type": "n8n-nodes-base.gitlabTrigger",
      "position": [
        0,
        540
      ]
    },
    {
      "id": "REPLACE_WITH_GITLAB_CRED_ID",
      "name": "GitLab Trigger2",
      "type": "n8n-nodes-base.gitlabTrigger",
      "position": [
        0,
        -20
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Extract Diff",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Distribution List Generator",
            "type": "main",
            "index": 0
          },
          {
            "node": "Comment Back on MR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Diff": {
      "main": [
        [
          {
            "node": "If Some Change",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitLab Trigger": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Some Change": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitLab Trigger1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GitLab Trigger2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Distribution List Generator": {
      "main": [
        [
          {
            "node": "Send to DL ( Email Notification)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}