Slack job type for Workflows

Stanisław ChmielaStanisław Chmiela
Slack job for Workflows

The Slack job sends a message during a workflow run to your Slack workspace. Since this is an API call to Slack's servers, we have configured our Slack job to skip spinning up a VM and instead send the API call immediately when this job runs. This means your Slack messages will be sent nearly instantaneously.

Using the Slack job

To send a message to a Slack channel, add a job with `type: slack` to your workflow:

The webhook URL can be obtained from your Slack workspace's app settings.

Examples

Below are a couple of examples on how you might sequence the Slack job with other jobs in your workflows.

You can send a message to a channel conditionally when a build fails:

You can also compose rich Slack messages. This is great for if your team coordinates testing or releases from a shared Slack channel that gets various types of messages:

Learn more about the Slack job type in our pre-packaged jobs documentation.