Send slack message only on failed build

How do I set a slack set up to only send the message when a build fails?

1 Like

Hi @bryce-ifit,

You can run any step on build failure using a run_if expression in YML mode. Related docs:

E.g. for Slack step:

    - slack:
        is_always_run: true
        run_if: .IsBuildFailed

with this configuration this Slack step will only run if .IsBuildFailed is true, which is only true in case if a previous step failed.

If you have any questions just let us know! :wink:

P.S.: in case of the Slack step is_always_run: true is optional as that’s the default value for the Slack step ( For other steps this is usually required. For more info see the linked DevCenter guide (


Great, thank you!

1 Like

Any time :wink: