Slack
Send Slack notifications with optional Block Kit formatting.
Attributes
| Attribute | Type | Description |
|---|---|---|
| webhook_url | str | Slack webhook URL |
| message | Optional[str] = Task {task.name} {run.phase}\nRun: {run.name} | {project}/{domain}\n< {run.url} |
| blocks | Optional[Tuple[Dict[str, Any], ...]] | Optional Slack Block Kit blocks for rich formatting (if provided, message is ignored). |
Constructor
Signature
def Slack(
on_phase: [ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase),
webhook_url: str,
message: Optional[str] = None,
blocks: Optional[Tuple[Dict[str, Any], ...]] = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| on_phase | [ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase) | ActionPhase(s) to trigger notification |
| webhook_url | str | Slack webhook URL |
| message | Optional[str] = None | Simple text message (supports template variables) |
| blocks | Optional[Tuple[Dict[str, Any], ...]] = None | Optional Slack Block Kit blocks for rich formatting |