Skip to main content

airflow-slack-alerts

Zero-dependency Slack failure alerts for Apache Airflow. One import, one Airflow Variable, and every task failure lands in your Slack channel with a sane, ready-made message — DAG, task, try number, truncated exception, log link.

from airflow_slack_alerts import slack_failure

default_args = {"on_failure_callback": slack_failure}

That's the whole integration.

Why this instead of the official SlackWebhookNotifier?

The official notifier (in apache-airflow-providers-slack) is a fine transport — but it ships no message, requires an Airflow Connection, and pulls in slack_sdk.

airflow-slack-alerts provider SlackWebhookNotifier
Dependencies none (stdlib urllib) apache-airflow-providers-slack + slack_sdk
Failure message included (customizable) bring your own Jinja template
Configuration Airflow Variable or env var Airflow Connection
Unconfigured behavior logged warning, no-op exception
Alerting can crash the task flow never (never-raise by design) possible
Blocks/attachments/proxy support no (text only, by design) yes

If you need Slack blocks, dynamic channel routing via a bot token, or attachments — use the provider. If you need "tell me in Slack when a task dies" — this.

Setup (2 minutes)

  1. Create a Slack Incoming Webhook — Slack app config → Incoming Webhooks → Add webhook → pick the channel. The URL is permanently bound to that channel.
  2. Store it in the Airflow Variable slack_webhook_url (Admin → Variables), or in the environment variable SLACK_WEBHOOK_URL.
  3. Wire the callback (DAG level via default_args, or per task):
from airflow_slack_alerts import slack_failure

with DAG(..., default_args={"on_failure_callback": slack_failure}):
    ...

Multiple channels

A webhook posts to exactly one channel, so channels = webhooks = Variables:

from airflow_slack_alerts import failure_alert

default_args = {"on_failure_callback": failure_alert(var="slack_webhook_url_data_team")}

critical = SomeOperator(
    ...,
    on_failure_callback=failure_alert(var="slack_webhook_url_oncall", mention="<!here>"),
)

Ad-hoc messages

from airflow_slack_alerts import notify

notify(f"Backfill finished: {rows:,} rows across {months} months")

Customizing the message

Prefix, mentions, truncation length, or a fully custom formatter — see docs/configuration.md.

Design principles

  • Never raise. Alerting must not mask the original task failure; any internal error is logged and swallowed.
  • Degrade gracefully. Missing webhook → one warning in the task log, no crash. A half-configured deployment stays a deployment.
  • Zero dependencies. The package imports Airflow lazily and only for Variable.get; core logic is testable without Airflow installed.

License

MIT

Metadata

Release files for airflow-slack-alerts 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for airflow-slack-alerts 0.1.0
File Size Uploaded Provenance Actions
airflow_slack_alerts-0.1.0.tar.gz 8.0 kB With provenance Details for airflow_slack_alerts-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for airflow-slack-alerts 0.1.0
File Interpreter ABI Platform Actions
airflow_slack_alerts-0.1.0-py3-none-any.whl Python 3 none any Details for airflow_slack_alerts-0.1.0-py3-none-any.whl

Total release size: 15.7 kB

Release files / airflow_slack_alerts-0.1.0.tar.gz

Download URL airflow_slack_alerts-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2672636e00b99eb3634ed7b5961bd8a934c2a5bea7210722ad159fb9afad2174
BLAKE2b-256 checksum
How to use checksums
74aa3a7e2a72775de7cd87e5fbb72d3a8afebddb5408e9a5e096d62b05934556
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / airflow_slack_alerts-0.1.0-py3-none-any.whl

Download URL airflow_slack_alerts-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0132c11771226d0259a2f587d7ba95271c6e3988fe1d74f1a6f3ef75d28d9482
BLAKE2b-256 checksum
How to use checksums
4054ce4e3243739761987bf425f273ab3e70ec53cd130fefe0ef161e714ddd49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for airflow-slack-alerts 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for airflow_slack_alerts-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page