The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
2.1.9
Slack
Package: flyte.notify
Send Slack notifications with optional Block Kit formatting.
Example:
```python
Slack(
on_phase=ActionPhase.FAILED,
webhook_url="https://hooks.slack.com/services/YOUR/WEBHOOK/URL",
message="🚨 Task {task.name} failed: {run.error}
{run.url}", ) ```
Args:
on_phase:ActionPhase(s) to trigger notification
webhook_url: Slack webhook URL
message: Simple text message (supports template variables)
blocks: Optional Slack Block Kit blocks for rich formatting
(if provided, message is ignored). See: https://api.slack.com/block-kit
Parameters
class Slack(
on_phase: typing.Union[flyte.models.ActionPhase, typing.Tuple[flyte.models.ActionPhase, ...]],
webhook_url: str,
message: typing.Optional[str],
blocks: typing.Optional[typing.Tuple[typing.Dict[str, typing.Any], ...]],
)| Parameter | Type | Description |
|---|---|---|
on_phase |
typing.Union[flyte.models.ActionPhase, typing.Tuple[flyte.models.ActionPhase, ...]] |
|
webhook_url |
str |
|
message |
typing.Optional[str] |
|
blocks |
typing.Optional[typing.Tuple[typing.Dict[str, typing.Any], ...]] |