Skip to content
Last updated

Creating Workflow Notifications

By default, all workflows send an email notification upon failure. These failure notifications are sent to the last person who edited the workflow.

You can also define the following custom notifications for your workflow:

Workflow Failure Custom Notification

To get an email notification when any part of your workflow fails while running on Treasure Data, add the following at the top of your workflow file.

error-notification.dig
_error:
  mail>: body.txt
  subject: this workflow failed
  to: [me@example.com]

Workflow Success Notification

To get an email every time your workflow succeeds, simply can add a final task that sends an email upon success.

success-notification.dig
+success_notification:
  mail>: body.txt
  subject: workflow succeeded!
  to: [me@example.com]

Long Running Workflow Notification

Typically, this is used in coordination with a scheduled time. As such, if your workflow starts at 7am, you may want to get notified if it hasn’t completed by 9am.

By default, the time zone used here will be the same one used for scheduling workflows as well.

To get notified if you workflow does not complete by a specified time of day, add the following at the top of your workflow file.

long-running-notification.dig
sla:
  # triggers this task at 02:00
  time: 09:00
  +notice:
    mail>: ...