anchor.diff:  {: codeblock-file="pipeline.yml"}
   
   See [Build States](#build-states) for possible values for the build state.
  +
  +Slack notifications happen at the following [event](/docs/apis/webhooks#events):
  +
  +* `build finished`
   
   ## Webhooks
   
  
positive.code: ```
  {: codeblock-file="pipeline.yml"}
  
  You can also add conditionals to restrict the events on which notifications are sent:
  
  ```yaml
  notify:
  
negative.code: ```
  {: codeblock-file="pipeline.yml"}
  
  Webhook notifications happen at the following [events](/docs/apis/webhooks#events), unless you restrict it to certain [conditions](/docs/pipelines/notifications#conditional-notifications):
  
  * `build created`
  * `build started`
  * `build blocked`
  * `build finished`
  
  ## Build States
  
  Build state can be one of `scheduled`, `running`, `passed`, `failed`, `blocked`, `canceling`, `canceled`, `skipped`, `not_run`, and `finished`.
  