AcademyWorkflowsDevelopment

Automate GitLab merge requests via API

Development and DevOps teams that want merges to happen only after the agreed checks have passed.

  • Recommendedour rating
  • 4,436views on n8n
Open on n8n.io ↗

Paste it straight onto an n8n canvas with Ctrl+V or Cmd+V.

automate-gitlab-merge-requests-using-apis-with-n8n.json

Loading the file...

AI automation

Want this workflow running in your company?

A template is the start. We adapt automations like this to your tools, handle the exceptions, and test and monitor them so they hold up under real load.

  • Free 20-minute call to look at your process
  • Connected to the tools you already use
  • Tested, monitored and documented

What it does

An n8n workflow that reads a GitLab merge request through the API and checks predefined conditions, such as approvals and passing pipelines. If every condition is met, it asks GitLab to merge the branch. A webhook, a schedule or a GitLab event can start the workflow.

Use cases

  1. 01Merging a branch once its approvals are in
  2. 02Waiting for pipelines to pass before a merge
  3. 03Running the merge check on a fixed daily schedule

Connects

HTTP Request

Questions about
Automate GitLab merge requests via API.

What is Automate GitLab merge requests via API used for?

Development and DevOps teams that want merges to happen only after the agreed checks have passed. An n8n workflow that reads a GitLab merge request through the API and checks predefined conditions, such as approvals and passing pipelines. If every condition is met, it asks GitLab to merge the branch. A webhook, a schedule or a GitLab event can start the workflow.

How do I import Automate GitLab merge requests via API into n8n?

Copy the workflow JSON from this page and paste it onto the n8n canvas with Ctrl+V or Cmd+V. Then connect your credentials in each node.

Is Automate GitLab merge requests via API safe to use?

It passed our automatic scan for credential theft, hidden instructions and risky install commands. Third party open source software. Sabemos AI does not maintain it. Check the code and permissions before you connect it to company data.