Registry /
workflow / apache-airflow-providers-discord
Install & Compatibility
Where this runs
tested against v3.12.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 5.612s · 259.4MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 26.2s · import 5.156s · 259MB
261MB installed
● package 261MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DiscordWebhookHook
✓ from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook
✗ from airflow.contrib.hooks.discord_hook import DiscordWebhookHook
Old Airflow 1.x path; deprecated since Airflow 2.0.
Sends a Discord message via webhook operator. Requires a connection with ID 'discord_webhook' containing the webhook URL.
from airflow import DAG
from airflow.providers.discord.operators.discord_webhook import DiscordWebhookOperator
from datetime import datetime, timedelta
import os
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
}
with DAG(
'discord_webhook_example',
default_args=default_args,
description='A simple DAG to send Discord message',
schedule_interval=timedelta(days=1),
start_date=datetime(2021, 1, 1),
catchup=False,
tags=['example'],
) as dag:
discord_task = DiscordWebhookOperator(
task_id='send_discord_notification',
http_conn_id='discord_webhook',
message='Hello from Airflow!',
username='AirflowBot',
avatar_url='',
tts=False,
proxy=None,
dag=dag,
)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'airflow.providers.discord'
The provider package is not installed or the Airflow version is too old (pre-2.0).
fixInstall via pip: pip install apache-airflow-providers-discord. Ensure Airflow 2.0+ is installed.
AttributeError: module 'airflow.hooks.base_hook' has no attribute 'BaseHook'
Using deprecated import paths from Airflow 1.x.
fixUse current import: from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook
Upgrade
Version history
3.12.3latest on PyPI · released May 11, 2026
Audit
Dependencies
apache-airflowrequiredCore dependency required for all Airflow providers.