Skip to main content

Set up workflow notifications

Get an email or a Telegram message about the runs of your workflows and tasks. Configure the notification channels first, then add notifications to each workflow or task.

Prerequisites​

  • Access to the Airflow UI of your Orchestration service. To find its URL and how to sign in, see View Orchestration details.
  • For Email, the host, port, username, and password of an SMTP server.
  • For Telegram, a Telegram account to create a bot with.

Open the notification channels​

  1. Sign in to the Airflow UI of your Orchestration service.
  2. In the Airflow UI, select Workflow Engine → Notifications in the left menu.

Notifications page with an email row and a telegram row, each with an edit icon in the Actions column

ColumnDescription
TypeThe type of channel: email or telegram.
NameThe name of the configuration.
DescriptionThe description of the configuration.
Kích hoạtWhether the configuration is on or off. The column header is shown in Vietnamese, even in the English UI.
ActionsThe edit icon (pencil).

Configure email notifications​

  1. Open the notification channels. See Open the notification channels.
  2. In the row whose Type is email, select the edit icon (pencil) in Actions.
  3. In the Email Notification Configuration dialog, fill in the fields, as described in the table below.
  4. Make sure that Enable configuration is turned on.
  5. Select Save, or select Cancel to discard your changes.

Email Notification Configuration dialog with the Name, Description, SMTP Server Host, SMTP Server Port, SMTP Username, and SMTP Password fields and the Cancel and Save buttons

Only Name is required. Fill in the four SMTP fields too, because they are needed to send email notifications.

FieldDescription
NameRequired. The name of the email configuration.
DescriptionOptional. A description of the configuration.
SMTP Server HostThe hostname or the IP address of the SMTP server of your email provider.
SMTP Server PortThe port of the SMTP server, typically 25, 465 (SSL), or 587 (TLS).
SMTP UsernameThe email address or the username for SMTP authentication.
SMTP PasswordThe password for SMTP authentication, or the app password of the email account. Select the eye icon to show or hide it.
Enable configurationTurns the configuration on or off. Default: on.
note

For Gmail, create an app password and use it instead of your regular password. For Office 365, configure SMTP authentication.

Configure Telegram notifications​

To send notifications to Telegram, create a bot, add its token to the telegram channel, then get the chat ID of the Telegram group or channel that receives the notifications. The channel takes only the bot token. You enter the chat ID later, as the Channel of each notification.

Create a bot​

  1. In Telegram, find @BotFather.
  2. Send the command /newbot to create a new bot.
  3. Set the name and the username of the bot.
  4. Copy the bot token that BotFather returns. The token is a number, a colon, then a string of letters and numbers.

Add the bot token​

  1. Open the notification channels. See Open the notification channels.
  2. In the row whose Type is telegram, select the edit icon (pencil) in Actions.
  3. In the Telegram Notification Configuration dialog, enter a Name.
  4. Optional: enter a Description.
  5. Paste the bot token into Telegram Bot Token.
  6. Make sure that Enable configuration is turned on.
  7. Select Save, or select Cancel to discard your changes.

Telegram Notification Configuration dialog with the Name, Description, and masked Telegram Bot Token fields, the Enable configuration switch turned on, and the Cancel and Save buttons

FieldDescription
NameRequired. The name of the Telegram configuration.
DescriptionOptional. A description of the configuration.
Telegram Bot TokenThe token that the bot uses for authentication. It is needed to send Telegram notifications. Select the eye icon to show or hide it.
Enable configurationTurns the configuration on or off. Default: on.

Get the chat ID​

  1. Add the bot to the group or the channel that receives the notifications.
  2. Send any message in the group or the channel.
  3. Open https://api.telegram.org/bot<BOT-TOKEN>/getUpdates, with your bot token in place of <BOT-TOKEN>.
  4. In the JSON response, find chat.id.

Use this chat ID as the Channel when you add Telegram notifications to a workflow or a task.

  • The bot must be in the group or the channel before it can send notifications.
  • In a channel, the bot needs the Post Messages permission.
  • A negative chat ID is a group or a channel. A positive chat ID is a personal chat.

Add notifications to a workflow​

Workflow notifications are sent on the events of the whole workflow. Before you start, set up and enable at least one channel. Type lists only the channels that are set up and enabled, and shows "No options available" otherwise.

  1. Open the workflow. See Open a workflow.
  2. In Notifications, select the edit icon (pencil).
  3. In the Notifications dialog, select Add.
  4. In Type, select the channel: email or Telegram.
  5. In Channel, enter the email address or the Telegram chat ID, then press Enter.
  6. In Event, select one or more statuses that send a notification.
  7. Repeat steps 3 to 6 for each notification that you need.
  8. Select Save, or select Cancel to discard your changes.

Notifications dialog of a workflow with one row of empty Type, Channel, and Event fields, a delete icon, the Add button, and the Cancel and Save buttons

To remove a notification, select the delete icon (trash) at the end of its row.

FieldDescription
TypeThe channel: email or Telegram. It lists only the channels that are set up and enabled.
ChannelThe email address or the Telegram chat ID that receives the notifications. An email address has 5 to 254 characters, in a valid email format.
EventThe statuses that send a notification. You can select more than one.

Add notifications to a task​

A task can have its own notifications, in addition to those of its workflow.

  1. Open the workflow. See Open a workflow.
  2. In the graph, select the task. Its form opens under the graph.
  3. Scroll down to the Notifications section of the form.
  4. Select Add.
  5. Fill in Type, Channel, and Event, as for a workflow. See Add notifications to a workflow.
  6. Repeat steps 4 and 5 for each notification that you need.
  7. Select Save Task.

Task notifications are independent of workflow notifications. If both the workflow and the task have notifications for an event, both are sent.

Next steps​