Customizable Notification Body

Hi :wave:

We have a pipeline that we’re building that I would like to have some more robust notifications in it.

One step in the pipeline will be setting some environment variables based on terraform outputs. We then want to take this output, and notify our current on-call engineer in slack with it, along with the pipeline state.

While it would be possible to set Slack webhooks and directly post messages from a script, I feel like it would be significantly cleaner and readable to have it live within the pipeline itself.

Also, are there considerations to have a notification step, rather than just an attribute? It would be useful to have notifications outside of just a pass/fail.

:+1: for this.

The fairly recent addition of the notify block in a Pipeline’s yaml definition is a great start, but a native “notify” step type would be much better.

There is surprisingly no Slack notification plugin available, and there would be a fair amount of overhead trying to add this to multiple pipelines and handling Slack credentials.

Buildkite already has its notification integrations, so a step that can leverage those and send custom messages would be awesome to have!

1 Like

+1 from me as well!

We really would like to have more control over Slack notification content, but also be able to create notifications on the step level rather than the pipeline level

I’m getting asked to customize a build notification message. Is there any way to add custom content? I’m thinking that if I can set the build message at the end of the pipeline steps that should be enough to address what’s being asked for, but haven’t had any luck doing that.

Hey @johnf! Sorry for the delayed reply, did you end up finding a workaround?

If not, which service are you sending notifications to? And what kind of content are you after? Just text, or more than that? I don’t think any of our current integrations support custom messages right now, but I can look into what’s involved with adding that.

Hi Harriet,

Thanks for responding. When I wrote that I was looking at sending a slack notification for a test report. Someone had requested more info in the notification body (e.g., test run completed successfully, there were 30 passing, 3 failed and two skipped or something like that.) I couldn’t find a workaround. I know Jenkins supports something like this, think through a plugin. I’d definitely find a use for it if it was available but it’s not a high priority thing.



We currently don’t use the notify pipeline feature because we want to customise the message template and there doesn’t seem to be a way to do that.

For example

  • to target the slack notifications for a “build broken” we want to include the slack username of the last person to commit, so that they get an @-mention.
  • we don’t use the email, basecamp options.
  • we want to include contextual information about the failure into the failure, like (say) the last few log lines of the command-step, so it’s more tempting for a person to drive-by fix.

Would it be possible to augment the notify feature with “run this binary to produce a document containing a message template”?