Integrating Jenkins with Slack and Email Notification
Continuous Integration is a process in which all development work is integrated as early as possible, with the resulting artefacts automatically built and tested. This blog walks through integrating Jenkins with Slack and email notifications, so your team is notified of every build on a Slack channel, and you get an email whenever a build fails.
![]() |
| Jenkins CI with Slack and Email Notification |
The below topics are covered in this blog -
1) Introduction to Jenkins continuous integration
2) Creating a Slack account and incoming webhook
3) Configuring the Slack Notification plugin in Jenkins
4) Configuring email notification in Jenkins
5) Testing the setup
1. Introduction
Jenkins is an open-source continuous integration tool written in Java, used for building, testing, and reporting on isolated changes in a larger codebase in real time. It lets developers find defects and fix them rapidly through automated testing.
2. Create a Slack Account and Incoming Webhook
Slack is a chat platform that provides incoming webhooks, which let external systems post messages into a channel. We will use one so Jenkins can send build notifications into your Slack channel.
If you haven't created your Slack account yet, sign up first, then visit:
https://slack.com/signin?redir=/apps/manage
Or: Channel Administrator -> Manage Apps -> Create Incoming Webhooks
Once you have an account, go to Slack → Administration → Manage Apps.
![]() |
| Slack Manage Apps |
Search for Incoming WebHooks:
![]() |
| Search for Incoming WebHooks |
You will get the screen below:
![]() |
| Incoming WebHooks |
Click Add to Slack and select the channel you want build notifications posted to:
![]() |
| Select Channel Name |
Click Add Incoming WebHook Integration. You will get a Slack webhook URL that looks like this:
https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
Treat this URL as a secret. Anyone who has it can post messages into your channel. Never commit it to a repository, paste it in a screenshot, or publish it.
You can test it with a curl command:
curl -X POST --data-urlencode \
'payload={"channel": "#codeztech-jenkins", "username": "webhookbot",
"text": "This is posted to #codeztech-jenkins from a bot named webhookbot.",
"icon_emoji": ":ghost:"}' \
https://hooks.slack.com/services/TXXXXXXXX/BXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX
![]() |
| Slack Webhook URL |
3. Configure the Slack Notification Plugin in Jenkins
Make sure the Slack Notification plugin is installed from Manage Jenkins → Manage Plugins. You can download it directly from:
https://updates.jenkins.io/download/plugins/slack/
Then go to Manage Jenkins → Upload Plugin and restart Jenkins. I have made a full video on this, linked at the bottom of this post. Feel free to comment on my YouTube channel or here if you run into any issue.
Once restarted, go to Manage Jenkins → Configure System and scroll to the Slack section.
Base URL https://hooks.slack.com/services/
Team Subdomain your Slack workspace subdomain
Credential the webhook token, stored as a Jenkins secret
Channel #your-channel-name
You can find the team subdomain in your Slack URL path:
![]() |
| Slack - Incoming WebHook Team Subdomain |
Add the credential and enter your channel name prefixed with # — the channel where you want all build notifications sent. Click Test Connection to confirm the setup works.
![]() |
| Configure Slack on Jenkins |
4. Configure Email Notification in Jenkins
To configure email notification in Jenkins, go to Manage Jenkins → Configure System → E-mail Notification and use the following settings:
SMTP Server smtp.gmail.com
Default user e-mail your-address@gmail.com
SMTP Authentication checked
Username your-address@gmail.com
Password your app password (see below)
Use SSL checked
SMTP Port 465
Reply-To Address an alternate address
Do not use your normal Gmail password — Google will reject it. Generate an app password instead:
Step 1 — Sign in to Gmail and go to Manage your Google Account
Step 2 — Open the Security tab and find the sign-in section
Step 3 — Click App passwords and select the device or app
Step 4 — Generate the password and copy it
Paste that app password into the Jenkins password field, then click Test configuration to send a test email.
![]() |
| Configure Email Notification on Jenkins |

























