Registry / workflow / apache-airflow-providers-discord

apache-airflow-providers-discord

JSON →
library3.12.3pypypi✓ verified 84d ago

An Apache Airflow provider package that integrates Discord messaging via webhooks. Version 3.12.2 supports Airflow 2.9+ and Python ≥3.10. Released on a monthly cadence alongside other providers.

pip install apache-airflow-providers-discord
INSTALL
IMPORT
SIG · APACHE-AIRFLOW-PRO
A
apache-airflow-providers-discord
workflowpythonv3.12.3
Install
26.2s avg
Import
5384ms
Disk
261MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 5.612s · 259.4MB
glibc
py 3.103.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, )
Debug
Known issues
breakingDefault hook/operator classes now require 'http_conn_id' to be explicitly set. In older versions (pre-3.0), the webhook URL was read from variable 'discord_webhook_url'.
fix
Always provide 'http_conn_id' when instantiating DiscordWebhookHook or DiscordWebhookOperator. Create a Connection with 'discord_webhook' as conn_id and the webhook URL in the 'host' field.
affects: >=3.0.0
gotchaThe webhook URL is stored in the 'host' field of the Airflow connection, not in the 'password' or 'login' fields. Many users mistakenly put it in the password field.
fix
In Airflow UI, create a Connection: Conn Id = discord_webhook, Conn Type = HTTP, Host = https://discord.com/api/webhooks/... (the full webhook URL).
affects: all
gotchaThe operator sends the message as a POST request to the webhook URL. If the webhook URL is invalid or Discord returns an error, the task fails with a generic HTTP error. No additional error details are logged.
fix
Verify the webhook URL manually by sending a test curl command. Ensure the webhook is active and has proper permissions.
affects: all
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).
fix
Install 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.
fix
Use 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.
Agent activity
41 hits · last 30 days
node
36
OpenAI (training)
1
Resources
apache-airflow-providers-discord — pip install apache-airflow-providers-discord · libregistry