{"id":9399,"date":"2025-09-17T17:41:49","date_gmt":"2025-09-17T12:11:49","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=9399"},"modified":"2025-09-17T17:42:43","modified_gmt":"2025-09-17T12:12:43","slug":"how-to-configure-a-webhook-to-get-gitlab-alerts-in-mattermost","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-configure-a-webhook-to-get-gitlab-alerts-in-mattermost\/","title":{"rendered":"How to Configure a Webhook to Get GitLab Alerts in Mattermost"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Introduction<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When working in teams, it\u2019s important to know instantly when something changes in the codebase. Whether it\u2019s a new commit, a merge request, or a pipeline status, getting alerts in team chat helps everyone stay updated. <br>In this guide, we\u2019ll walk through how to connect GitLab with Mattermost using webhooks so that GitLab alerts automatically show up in your Mattermost channel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Prerequisites<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A GitLab project or group where you want to send alerts from.<\/li>\n\n\n\n<li>Access to a Mattermost server with permission to create integrations.<\/li>\n\n\n\n<li>A Mattermost channel where notifications should be posted.<\/li>\n\n\n\n<li>Basic understanding of GitLab project\/group settings<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Implementation<\/strong><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Create an Incoming Webhook in Mattermost<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your Mattermost server.<\/li>\n\n\n\n<li>Go to Main Menu \u2192 Integrations \u2192 Incoming Webhooks.<\/li>\n\n\n\n<li>Click Add Incoming Webhook.<\/li>\n\n\n\n<li>Choose the channel where you want GitLab alerts to appear (or select \u201cany channel\u201d if you want to specify later).<\/li>\n\n\n\n<li>Give the webhook a descriptive name, for example: GitLab-alerts.<\/li>\n\n\n\n<li>(Optional) Add a Profile Picture URL to show a GitLab logo as the bot avatar.<\/li>\n\n\n\n<li>Save the webhook. Copy the Webhook URL \u2014 you\u2019ll need it in GitLab.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"605\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-1024x605.png\" alt=\"\" class=\"wp-image-9400\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-1024x605.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-300x177.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-768x454.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-1536x908.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-2048x1211.png 2048w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.36.41-PM-508x300.png 508w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Configure GitLab to Send Notifications<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to your GitLab project (or group if you want to apply it to multiple projects).<\/li>\n\n\n\n<li>Navigate to Settings \u2192 Integrations (or Webhooks).<\/li>\n\n\n\n<li>In the Webhook URL field, paste the Mattermost webhook URL you copied earlier.<\/li>\n\n\n\n<li>Select the events you want to be notified about, for example:\n<ul class=\"wp-block-list\">\n<li>Push events (commits)<\/li>\n\n\n\n<li>Merge request events<\/li>\n\n\n\n<li>Pipeline events (success\/failure)<\/li>\n\n\n\n<li>Tag events<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click Add webhook or Save changes.<\/li>\n\n\n\n<li>Use the Test button to send a test notification to Mattermost and confirm it works.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM.png\"><img decoding=\"async\" width=\"1024\" height=\"470\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-1024x470.png\" alt=\"\" class=\"wp-image-9401\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-1024x470.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-300x138.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-768x352.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-1536x705.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM-654x300.png 654w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.28-PM.png 1922w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM.png\"><img decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-1024x566.png\" alt=\"\" class=\"wp-image-9402\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-1024x566.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-300x166.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-768x425.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-1536x850.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM-542x300.png 542w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2025\/09\/Screenshot-2025-09-16-at-5.55.38-PM.png 1714w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Verify Notifications in Mattermost<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Mattermost channel you linked the webhook to.<\/li>\n\n\n\n<li>You should see a test message from GitLab.<\/li>\n\n\n\n<li>Now, whenever you push a commit, create a merge request, or trigger a pipeline, GitLab will send a notification to the Mattermost channel.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By setting up a webhook between GitLab and Mattermost, the team can stay up-to-date with project changes in real-time. This simple integration ensures that no commit, merge request, or pipeline failure goes unnoticed, making collaboration smoother and response times faster.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction When working in teams, it\u2019s important to know instantly when something changes in the codebase. Whether it\u2019s a new [&hellip;]<\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[397],"class_list":["post-9399","post","type-post","status-publish","format-standard","hentry","category-containers-kubernetes","tag-gitlab","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-2rB","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9399","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=9399"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9399\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=9399"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=9399"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=9399"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}