Registry / workflow / dagster-slack

dagster-slack

JSON →
library0.29.20pypypi✓ verified 26d ago

The `dagster-slack` library provides a Slack client resource for integrating Slack notifications and messaging capabilities into Dagster data pipelines. It enables users to send messages to Slack channels from ops, assets, schedules, and sensors, facilitating real-time communication about pipeline status and events. The current version is 0.29.0, and it follows the frequent release cadence of the broader Dagster ecosystem.

pip install dagster-slack
INSTALL
IMPORT
SIG · DAGSTER-SLACK
D
dagster-slack
workflowpythonv0.29.20
Install
13.4s avg
Import
3075ms
Disk
139MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.29.20 · 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 3.214s · 136.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 13.4s · import 2.936s · 133MB
139MB installed
● package 139MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SlackResource
from dagster_slack import SlackResource
make_slack_on_run_failure_sensor
from dagster_slack import make_slack_on_run_failure_sensor
make_slack_on_step_failure_hook
from dagster_slack import make_slack_on_step_failure_hook

This quickstart demonstrates how to define a `SlackResource` with a Slack bot token (loaded from an environment variable) and then use it within a Dagster asset to post a message to a specified Slack channel. A Slack App and bot token are required for this to function.

import os from dagster import Definitions, EnvVar, asset from dagster_slack import SlackResource @asset def send_slack_message(slack: SlackResource): """An asset that sends a message to Slack.""" channel = os.environ.get('SLACK_CHANNEL', '#general') # Ensure channel exists slack.get_client().chat_postMessage(channel=channel, text=":wave: Hello from Dagster!") defs = Definitions( assets=[send_slack_message], resources={ "slack": SlackResource(token=EnvVar("MY_SLACK_TOKEN")) }, )
Debug
Known issues
gotchaWhen interacting with the Slack client directly from the `SlackResource`, use `slack.get_client().chat_postMessage(...)` instead of `slack.chat_postMessage(...)`. The `get_client()` method ensures you are calling the method on the underlying `slack_sdk.WebClient` instance.
fix
Always call `.get_client()` on the `SlackResource` instance before invoking Slack API methods.
affects: All versions
breakingWhen configuring hooks and sensors (e.g., `make_slack_on_run_failure_sensor`), the `dagit_base_url` parameter has been deprecated and replaced with `webserver_base_url` for generating deep links to runs in the UI.
fix
Update `dagit_base_url` parameters to `webserver_base_url` in your sensor and hook definitions.
affects: Dagster core 1.3.x and later, corresponding dagster-slack versions
gotchaTo use `dagster-slack`, you must first create a Slack App in your workspace, configure bot users, install the app to your workspace, and obtain a bot token. This token should be stored securely, ideally as an environment variable (e.g., `MY_SLACK_TOKEN`), and passed to the `SlackResource`.
fix
Follow the official Slack App creation and token generation guide to set up your integration.
affects: All versions
deprecatedIn `make_slack_on_run_failure_sensor`, the `job_selection` and `monitor_all_repositories` parameters are deprecated. Use `monitored_jobs` for specifying jobs to monitor.
fix
Migrate from `job_selection` to `monitored_jobs` in `make_slack_on_run_failure_sensor` definitions.
affects: Dagster core 1.12.14 / dagster-slack 0.28.14 and later (implied)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'dagster_slack'
The `dagster-slack` library is not installed in the Python environment where Dagster is running.
fix
Run `pip install dagster-slack` to install the library.
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://www.slack.com/api/chat.postMessage) The server responded with: {'ok': False, 'error': 'invalid_auth'}
The Slack token provided to `SlackResource` is invalid, revoked, or lacks the necessary permissions to authenticate with the Slack API.
fix
Ensure your Slack bot token (starts with `xoxb-`) is correct, has the `chat:write` scope (and `chat:write.public` if posting to public channels), and is passed correctly to the `SlackResource` (e.g., via `EnvVar`).
The server responded with: {'ok': False, 'error': 'not_in_channel'}
The Slack bot associated with the provided token has not been invited to the target Slack channel.
fix
Invite your Slack bot to the desired channel by typing `/invite @your-bot-name` in the Slack channel, or add it via the channel's integration settings.
dagster.core.errors.DagsterInvalidConfigError: Missing required config entry 'token' at path root:resources:slack:config
The `SlackResource` requires a `token` configuration, which was not provided when defining the resource.
fix
Provide the Slack token (e.g., via an environment variable) when defining your `SlackResource` in your Dagster definitions. For example: `SlackResource(token=EnvVar('SLACK_BOT_TOKEN'))`.
Upgrade
Version history
0.29.20latest on PyPI · released Aug 27, 2026
Audit
Dependencies
dagsterrequiredCore dependency for Dagster integrations and resources.
Agent activity
29 hits · last 30 days
node
26
OpenAI (training)
1
Resources
dagster-slack — pip install dagster-slack · libregistry