Slack job type for Workflows

Dec 10, 2025 by

Stanisław Chmiela

Stanisł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:

Code
name: Send message
jobs:
send_slack_message:
name: Send Slack message
type: slack
params:
webhook_url: {{ env.SLACK_WEBHOOK_URL }}
message: "Hello Slack! 🎉"

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:

Code
name: Build Notification
jobs:
build_ios:
name: Build iOS
type: build
params:
platform: ios
profile: production
notify_build:
name: Notify Build Status
needs: [build_ios]
type: slack
params:
webhook_url: {{ env.SLACK_WEBHOOK_URL }}
message: 'Build completed for app ${{ after.build_ios.outputs.app_identifier }} (version ${{ after.build_ios.outputs.app_version }})'

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:

Code
name: Rich Build Notification
jobs:
build_android:
name: Build Android
type: build
params:
platform: android
profile: production
notify_build:
name: Notify Build Status
needs: [build_android]
type: slack
params:
webhook_url: {{ env.SLACK_WEBHOOK_URL }}
payload:
blocks:
- type: header
text:
type: plain_text
text: 'Build Completed'
- type: section
fields:
- type: mrkdwn
text: "*App:*\n${{ needs.build_android.outputs.app_identifier }}"
- type: mrkdwn
text: "*Version:*\n${{ needs.build_android.outputs.app_version }}"
- type: section
fields:
- type: mrkdwn
text: "*Build ID:*\n${{ needs.build_android.outputs.build_id }}"
- type: mrkdwn
text: "*Platform:*\n${{ needs.build_android.outputs.platform }}"
- type: section
text:
type: mrkdwn
text: 'Distribution: ${{ needs.build_android.outputs.distribution }}'

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