Notifications
The Notifications build feature is responsible for sending notifications about build statuses and events to external services. Currently, the feature provides Email Notifier and Slack Notifier.
This feature adds to the functionality of user-level notifications that can be assigned to a particular user or user group, but it allows configuring notifications per build configuration. This approach does not require referencing a specific TeamCity user and works better for group notifications.
tip
To set up similar notifications for several build configurations, use a build configuration template.
To configure email notifications for a build configuration:
Add the Notifications build feature to your build configuration and switch its Notifier selector to "Email Notifier".
Enter a recipient email address. If you need to specify multiple addresses, enter each following address on a new line.
Configure a branch filter. If it is not configured, you will receive notifications about the default branch only.
Select events to watch.
tip
To customize the notification texts, you can modify notification templates.
Note that TeamCity Email Notifier relies on the SMTP server settings configured in Administration | Email Notifier.
tip
Starting with version 2023.05, you can also utilize Service Messages to send custom email messages from inside build steps.
The Slack Notifier feature relies on a Slack connection that should be preconfigured in the parent project's settings.
After configuring the connection, do the following:
Add the Notifications build feature to your build configuration and switch its Notifier selector to "Slack Notifier".
Choose the created connection.
Enter the ID of a channel or user who will be receiving notifications.
tip
Start typing the user ID, and TeamCity will autocomplete it. Alternatively, you can copy this ID from your Slack user profile options (Profile | More | Copy member ID).
Select the message format. Slack Notifier does not currently support custom notification templates. You can select the verbose format to choose what information to display in notifications, or utilize Service Messages to send completely custom strings.
Configure a branch filter. If it is not configured, you will receive notifications about the default branch only.
Select events to watch.
tip
Watch our video tutorial on how to integrate TeamCity with Slack.
Thanks for your feedback!