Can I receive Slack notifications for timed out or cancelled builds?
Last updated: October 7, 2026
Context
Some users want to receive Slack notifications when a build is cancelled or times out, in the same way they receive notifications for other build states.
Answer
Codemagic does not currently support built-in Slack notifications for cancelled or timed out builds. This is because these states terminate the build before it reaches the publishing and post-publishing stages, which is when Slack notifications are sent.
As a workaround, you can set up a small external monitoring script using the Codemagic REST API. Here is how it works:
Set up a scheduled job (e.g. a cron job, GitHub Action, or similar) that runs every few minutes.
Have it call the Codemagic Builds API to check recent build statuses.
If it finds a build marked as cancelled or timed out, send a message to the appropriate Slack channel using an incoming webhook.
Keep track of build IDs that have already triggered an alert to avoid duplicate notifications.
Because this solution runs entirely outside of Codemagic, it is not affected by the build machine being terminated before the publishing stage.
Note that if you have multiple projects sending notifications to different Slack channels, you will need to account for that routing logic within your external script.