Notification Configuration

5 min read

Notification Configuration #

Overview

Before you create a channel, create the credential that the channel uses. Each channel needs different details. Some details are entered when you create the credential. Others are entered later, when you map the channel to an event.

Note: Channel creation and notification delivery depend on valid credentials. Incorrect credentials make the notification fail.

1. Create a Credential #

  1. 1

    Click Integration in the left menu.

  2. 2

    Select Credentials Management, and click Add Credential.

  3. 3

    Select Notification as the Credential Type.

  4. 4

    Enter the Credential Name, and select the Notification Type.

  5. 5

    Enter the details of the channel, as listed below.

  6. 6

    Select the User Groups that get View permission, and the User Groups that also get Write permission, and click Save.

Original figure 1 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 1: Add Credential, Notification credential type

After you save, the new credential appears in the list on the Credentials page.

Original figure 2 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 2: The new credential in the Credentials page

2. Details Required for Each Channel #

2.1 When You Create the Credential #

Swipe horizontally to view all columns →
Channel Details
Email Smtp Url, Smtp Port, Login Id, Password, From (the sender email address), Use TLS and Pass Unverified Context.
Slack Bot Token or User Token. It is used to send notifications to the users linked to the event.
Telegram Bot Token.
Microsoft Teams No credentials are needed. You only enter the webhook URL when you map the channel to an event.
Google Chat No credentials are needed. You only enter the webhook URL when you map the channel to an event.

2.2 When You Map the Channel to an Event #

Swipe horizontally to view all columns →
Channel Details Used for
Email DL Name and DL Email ID Group or Distribution List notifications.
Slack Channel Name and Webhook URL Channel notifications.
Microsoft Teams Channel Name and Webhook URL Channel notifications.
Telegram Channel Name and Chat ID (or Group ID) Group or channel notifications.
Google Chat Space Name and Webhook URL Google Chat space notifications.

3. Get the Details from Each Tool #

3.1 Slack Bot Token or User Token #

  1. 1

    Go to https://api.slack.com/apps, and click Create New App.

  2. 2

    Select From scratch, and enter the app name and the workspace.

  3. 3

    Go to OAuth & Permissions, and add the scopes chat:write and users:read.email. Add chat:write.public if the app must post to public channels.

  4. 4

    Click Install App to Workspace.

  5. 5

    Copy the Bot User OAuth Token.

  6. 6

    To post in a channel, invite the bot to it by entering /invite @your-bot-name in the channel.

Note: Without the correct scopes, messages fail. The bot must be a member of the channel to send messages to it.

Original figure 3 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 3: Slack bot token scopes

Original figure 4 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 4: Slack user token scopes

3.2 Slack Channel Name and Webhook URL #

  1. 1

    In Slack, open the channel and copy its name, for example #deploy-alerts.

  2. 2

    Go to https://api.slack.com/apps, and create a new app or choose an existing one.

  3. 3

    Open Incoming Webhooks, and activate them.

  4. 4

    Add the webhook to the workspace, and copy the URL.

3.3 Microsoft Teams Webhook URL #

  1. 1

    In Microsoft Teams, open the team and the channel.

  2. 2

    Click More options (…) on the channel, and select Workflows.

  3. 3

    Go to the Workflow Home, click Build from scratch, and select Template.

  4. 4

    Find the template Send webhook alerts to channel, and add the channel.

  5. 5

    Save the workflow, and copy the generated HTTP POST URL. Use it as the Webhook URL.

Note: The webhook is specific to one channel. The payload must match the workflow schema. Microsoft handles the authentication.

3.4 Telegram Bot Token and Chat ID #

  1. 1

    Open Telegram, search for BotFather, and start a chat.

  2. 2

    Enter /newbot.

  3. 3

    Enter a bot name and a username. The username must end with bot.

  4. 4

    Copy the Bot Token that BotFather returns.

  5. 5

    Add your bot to the group or channel.

  6. 6

    Make the bot an administrator, and give it the Manage Direct Messages permission.

  7. 7

    Send a message in the group or channel.

  8. 8

    Forward that message to the bot @userinfobot.

  9. 9

    Copy the value of id, for example -100XXXXXXXXXX. This is the Chat ID.

Note: Group and channel IDs are usually negative numbers. The bot must be added to the group.

3.5 Google Chat Webhook URL #

Create an incoming webhook in the Google Chat space that receives the notifications. Confirm the following before you begin.

Swipe horizontally to view all columns →
Requirement Details
Google Workspace account Incoming webhooks are not available on personal @gmail.com accounts.
Webhooks enabled Your Workspace administrator has enabled webhooks for Google Chat (Admin console → Apps → Google Workspace → Google Chat). If they are disabled for the organization, the webhook option does not appear.
Space membership You are a member of the space that will receive the notifications. Use a dedicated space, such as buildpiper-alerts.
BuildPiper access You can open the Notifications Centre and have the permission to add a channel.

Note: Use the Google Chat web client (chat.google.com) or the Chat panel in Gmail. The mobile app cannot manage webhooks.

  1. 1

    In the left sidebar of Google Chat, click the space. Click the space name at the top to open its menu.

  2. 2

    Select Apps & integrations, and then Webhooks (Manage webhooks in the older interface). Click Add webhooks.

  3. 3

    Enter a clear name, for example BuildPiper Notifications. Optionally, enter an avatar URL to brand the messages. Click Save.

  4. 4

    Google Chat generates a URL. Click the copy icon and store the URL securely. Use it as the Webhook URL.

Original figure 5 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 5: Google Chat, space menu

Original figure 6 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 6: Google Chat, Apps & integrations

Original figure 7 — BuildPiper_Notification_Center_02_Notification_Configuration

Figure 7: Google Chat, Incoming webhook

Read more: Notification Channels