{"id":1329,"library":"apache-airflow-providers-slack","title":"Apache Airflow Slack Provider","description":"The Apache Airflow Slack provider package enables interaction with Slack, offering operators and hooks to send messages, upload files, and integrate with Slack workflows. It includes `SlackOperator` for the Slack API and `SlackWebhookOperator` for incoming webhooks. The current version is 9.9.0, and provider packages typically release independently of core Airflow, often aligning with Airflow's major releases or critical bug fixes.","status":"active","version":"9.9.0","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/slack","tags":["airflow","provider","slack","messaging","notifications"],"install":[{"cmd":"pip install apache-airflow-providers-slack","lang":"bash","label":"Install provider"}],"dependencies":[{"reason":"This is an Airflow provider package and requires Apache Airflow to run.","package":"apache-airflow","optional":false}],"imports":[{"note":"Import path for Slack API operator changed from airflow.contrib in Airflow 1.x to airflow.providers in Airflow 2.0+","wrong":"from airflow.contrib.operators.slack_operator import SlackOperator","symbol":"SlackOperator","correct":"from airflow.providers.slack.operators.slack_operator import SlackOperator"},{"note":"Import path for Slack Webhook operator changed from airflow.contrib in Airflow 1.x to airflow.providers in Airflow 2.0+","wrong":"from airflow.contrib.operators.slack_webhook_operator import SlackWebhookOperator","symbol":"SlackWebhookOperator","correct":"from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator"},{"symbol":"SlackHook","correct":"from airflow.providers.slack.hooks.slack import SlackHook"},{"symbol":"SlackWebhookHook","correct":"from airflow.providers.slack.hooks.slack_webhook import SlackWebhookHook"}],"quickstart":{"code":"from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator\nfrom airflow.models.dag import DAG\nfrom datetime import datetime\n\n# IMPORTANT: For this DAG to send messages, an Airflow Connection named 'slack_webhook_default'\n# must be configured. It should be an 'HTTP' connection type, with your Slack Incoming Webhook URL\n# placed in the 'Host' field (e.g., https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX).\n# For local testing without sending actual messages, you can create a dummy HTTP connection.\n\nwith DAG(\n    dag_id='slack_webhook_quickstart',\n    start_date=datetime(2023, 1, 1),\n    schedule=None, # This DAG runs manually\n    catchup=False,\n    tags=['slack', 'example'],\n) as dag:\n    send_message_to_slack = SlackWebhookOperator(\n        task_id='send_message_to_slack',\n        slack_webhook_conn_id='slack_webhook_default',\n        message=\"Hello from Airflow! This is a test message from the quickstart DAG. :airflow:\",\n        channel=\"#general\" # Specify the Slack channel (optional, overrides default webhook channel)\n    )","lang":"python","description":"This quickstart demonstrates how to use the `SlackWebhookOperator` to send a message to a Slack channel. You need to configure an Airflow Connection named `slack_webhook_default` of type `HTTP` with your Slack Incoming Webhook URL in the 'Host' field."},"warnings":[{"fix":"Update all import statements to use the new provider path: `from airflow.providers.slack...`.","message":"Prior to Airflow 2.0, Slack operators and hooks were part of `airflow.contrib`. With the introduction of provider packages, all Slack-related components were moved to `airflow.providers.slack`. Importing from `airflow.contrib.operators.slack_operator` or `airflow.contrib.hooks.slack_hook` will lead to `ModuleNotFoundError` in Airflow 2.0+.","severity":"breaking","affected_versions":"Airflow 2.0+ and `apache-airflow-providers-slack` versions 1.0+"},{"fix":"For `SlackWebhookOperator`, create an `HTTP` connection and place the full webhook URL in the 'Host' field. For `SlackOperator`, create a `Slack` connection and place the Slack API token (e.g., `xoxb-YOUR_TOKEN`) in the 'Password' field.","message":"Operators like `SlackWebhookOperator` and `SlackOperator` rely on correctly configured Airflow Connections. A common mistake is using the wrong connection type (e.g., `Generic` instead of `HTTP` for webhooks, or `Generic` instead of `Slack` for the Slack API) or placing the token/URL in the wrong field (e.g., `Host` for a webhook URL, `Password` for a Slack token).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Slack App's bot token has the necessary OAuth scopes. For example, `chat:write` for sending messages, `files:write` for uploading files, or specific channel read/write scopes, and install the app to the relevant workspace/channels.","message":"When using `SlackOperator` (which interacts with the Slack API directly), insufficient bot token scopes (permissions) are a frequent cause of `slack_sdk.errors.SlackApiError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If advanced Slack API features are needed, switch to `SlackOperator` or interact with `SlackHook` directly. `SlackWebhookOperator` is best suited for simple message posting.","message":"`SlackWebhookOperator` uses Slack's incoming webhooks, which are simpler but have limitations compared to the full Slack API. It does not support features like uploading files, advanced user/channel lookups, or directly interacting with Slack APIs requiring OAuth. For these advanced use cases, `SlackOperator` (or `SlackHook` directly) should be used.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install the `aiohttp` package: `pip install aiohttp`. If installing `apache-airflow` with extras, ensure `pip install \"apache-airflow[slack]\"` is used, as it should include `aiohttp` as a dependency.","message":"The `apache-airflow-providers-slack` package, through its dependency on `slack_sdk`, uses `aiohttp` for asynchronous operations. A `ModuleNotFoundError` for `aiohttp` indicates this dependency is missing from the environment.","severity":"breaking","affected_versions":"All versions of `apache-airflow-providers-slack` when `aiohttp` is not installed and the async client is used."}],"env_vars":null,"last_verified":"2026-05-20T04:39:14.214Z","next_check":"2026-07-08T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed by running 'pip install apache-airflow-providers-slack'.","cause":"The 'apache-airflow-providers-slack' package is not installed or not accessible in the environment.","error":"ModuleNotFoundError: No module named 'airflow.providers.slack'"},{"fix":"Implement retry logic with exponential backoff to handle rate limits, and ensure the application adheres to Slack's rate limiting guidelines.","cause":"The Slack API rate limit has been exceeded due to too many requests in a short period.","error":"slack_sdk.errors.SlackApiError: The request to the Slack API failed. The server responded with: {'ok': False, 'error': 'ratelimited'}"},{"fix":"Update the import statement to 'from airflow.providers.slack.operators.slack_api import SlackAPIPostOperator' or use the updated class name as per the latest documentation.","cause":"The 'SlackAPIPostOperator' has been deprecated or removed in the current version of the 'apache-airflow-providers-slack' package.","error":"ImportError: cannot import name 'SlackAPIPostOperator' from 'airflow.providers.slack.operators.slack'"},{"fix":"Update the import statement to 'from airflow.providers.slack.hooks.slack_api import SlackHook' to reflect the new module structure.","cause":"The 'SlackHook' class has been moved or renamed in the 'apache-airflow-providers-slack' package.","error":"AttributeError: module 'airflow.providers.slack.hooks.slack' has no attribute 'SlackHook'"},{"fix":"Remove the 'token' argument from the 'SlackHook' initialization and configure the Slack API token through Airflow's connection settings.","cause":"The 'token' parameter is not accepted in the constructor of the 'SlackHook' class.","error":"TypeError: __init__() got an unexpected keyword argument 'token'"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":null,"quickstart_tag":null,"pypi_latest":"9.10.0","cli_name":"airflow","cli_version":"","type":"library","homepage":"https://airflow.apache.org","github":"https://github.com/apache/airflow","docs":"https://airflow.apache.org/docs/apache-airflow-providers-slack/9.10.0","changelog":"https://airflow.apache.org/docs/apache-airflow-providers-slack/9.10.0/changelog.html","pypi":"https://pypi.org/project/apache-airflow-providers-slack/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","communication","devops","data"],"install_checks":{"last_tested":"2026-05-20","tag":"stale","tag_description":"widespread failures or data too old to trust","installed_version":"9.1.1","pypi_latest":"9.10.0","is_stale":true,"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"248.3M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":24.6,"import_time_s":null,"mem_mb":null,"disk_size":"246M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"269.0M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":23.4,"import_time_s":null,"mem_mb":null,"disk_size":"267M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"258.8M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":18.4,"import_time_s":null,"mem_mb":null,"disk_size":"258M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"260.7M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":18.6,"import_time_s":null,"mem_mb":null,"disk_size":"260M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"215.1M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":28.9,"import_time_s":null,"mem_mb":null,"disk_size":"210M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"apache-airflow-providers-slack","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":null,"tag_description":null,"results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":0},{"runtime":"python:3.9-slim","exit_code":0}]},"_links":{"self":"https://checklist.day/api/registry/apache-airflow-providers-slack","v1":"https://checklist.day/v1/registry/apache-airflow-providers-slack","v1_install":"https://checklist.day/v1/registry/apache-airflow-providers-slack/install","v1_imports":"https://checklist.day/v1/registry/apache-airflow-providers-slack/imports","v1_compatibility":"https://checklist.day/v1/registry/apache-airflow-providers-slack/compatibility","v1_quickstart":"https://checklist.day/v1/registry/apache-airflow-providers-slack/quickstart","docs":"https://checklist.day/docs"}}