Skip to main content

Slack

Send Slack notifications with optional Block Kit formatting.

Attributes

AttributeTypeDescription
webhook_urlstrSlack webhook URL
messageOptional[str] = Task {task.name} {run.phase}\nRun: {run.name}{project}/{domain}\n< {run.url}
blocksOptional[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

NameTypeDescription
on_phase[ActionPhase](../../models/actionphase.md?sid=flyte_models_actionphase)ActionPhase(s) to trigger notification
webhook_urlstrSlack webhook URL
messageOptional[str] = NoneSimple text message (supports template variables)
blocksOptional[Tuple[Dict[str, Any], ...]] = NoneOptional Slack Block Kit blocks for rich formatting