In this example, use a job to regularly add a comment to all build plans that are currently failing. For example, check for builds that have been in a failing state for more than one day.
Then, configure Bamboo build plan notifications so that when the comment is added, a notification is then sent to Slack.
Adding the Job
Navigate to the Jobs page.
Select Add New Item and then Build SLA Reminder.
Fill in the details as shown:
Make sure to use whichever user you plan to run this job as, rather than Admin. The Cron Expression in this case means "Run at half past midnight every day".
Once the job has been saved, you should start to see comments like the following screenshot start appearing on failing build plans.
Configuring the Bamboo Notifications
Now that the job is monitoring the failing builds and commenting on those that have not been fixed within a specified amount of time (one day in this example), the relevant build plan notification settings can be configured.
Enter Event as Comment Added.
Enter Recipient Type as Slack.
Obatin the Slack Webhook URL from your Slack administrator.
Enter the Room Name as the name or ID of the Slack channel you wish the notifications to appear in.
The Comment Added notification type is only available at the project plan level. Configure this notification for each of the project plans you are interested in.
Once the above Slack notification is configured, you should now start receiving Slack notifications like the following:
The Slack notification: