In the Notification Service section of the Create alert policy window, select the Slack option.
In the field that displays, enter the name of the Slack channel you added the @Dagster+ bot user to.
Note: One channel is allowed per alert policy. To post alerts to multiple channels, first invite the @Dagster+ bot and then create a new alert policy that posts to that channel.
To define a Slack alert policy in code, use the following keys to configure the alert:
notification_service.slack.slack_workspace_name - The name of the Slack workspace connected to Dagster+
notification_service.slack.slack_channel_name - The name of the Slack channel the @Dagster+ user is a member of
# alert_policies.yamlalert_policies:-name:"slack-alert-policy"description:"An alert policy to send a Slack notification to sales on job failure or success."tags:-key:"team"value:"sales"event_types:-"JOB_SUCCESS"-"JOB_FAILURE"notification_service:slack:slack_workspace_name:"hooli"slack_channel_name:"sales-notifications"
Then, use the dagster-cloud CLI to set the alert policies for the deployment:
dagster-cloud deployment alert-policies sync -a /path/to/alert_policies.yaml