Skip to Content
DocumentationFeatureNotification Management

Notification Management

Background

Notifications are a relatively high-touch feature. Unlike low-visibility backend tasks such as model runs and training, notifications are more about interaction between users. Different users also have different expectations for notification frequency.

So I separated notifications from the overall core logic to avoid excessive notifications causing disruption for some users.

Now you can integrate notifications into your system with simple configuration in the settings page.

The core flow has two steps:

  1. Configure notification sources and notification targets
  2. Configure notification tasks

Notification Source Management

The following notification sources are currently supported.

Email

This source requires configuration. Set host and port based on your email provider, and fill in your email account and credentials for username and password.

ParameterDescription
hostSMTP server address
portSMTP server port
usernameEmail account
passwordEmail password credential

Note: the password here is not your mailbox login password. It is the SMTP authorization code. Please refer to your email provider’s documentation for how to obtain it.

For example, in 163 Mail, you can get the SMTP authorization code this way: after enabling SMTP service, a popup appears, and the displayed string is the SMTP authorization code. To use this source, SMTP service must be enabled.

Feishu

This source requires app_id and app_secret.

ParameterDescription
app_idapp id of your Feishu custom app
app_secretapp secret of your custom Feishu app

Because Feishu does not support directly linking external files and images in notifications, you need to configure a bot that can upload files/images to Feishu. Also, using a bot from a custom app makes it easier to extend capabilities later.

Feishu setup steps:

  1. Go to the Feishu Developer Console , create an enterprise custom app, then open the app details page. Copy app id and app secret into the configuration.
  2. Enable image upload permissions for the custom app.

DingTalk

This source does not require configuration parameters for now.

Apple APNS

Configuration for this source is relatively complex. See Apple docs for details: https://developer.apple.com/documentation/usernotifications/sending-notification-requests-to-apns 

ParameterDescription
team_idTeam ID of your Apple Developer account
key_idKey ID of your APNS key
private_keyPrivate Key from the downloaded .p8 file
apns_topicAPNS topic, which is your app Bundle ID
  1. Go to the Apple Developer website  and sign in with your Apple Developer account.
  2. Find Membership details to get your Team ID.
  3. Open the Certificates, Identifiers & Profiles page, create a key, and configure it. Make sure APNS is enabled and the environment is set (Production/Sandbox).
  4. On the key details page, you can see Key ID.
  5. Click Download to download the key file. The file content is your Private Key.
  6. apns_topic is the Bundle ID of the app you want to push notifications to.

Apple APNS (SandBox)

Same as above, but your Key must be for the sandbox environment.

Telegram

This source requires bot_token.

ParameterDescription
bot_tokenToken of your Telegram bot
  1. Open Telegram and search @BotFather.
  2. Click Start (skip if you already did).
  3. Enter /newbot.
  4. Follow prompts to set the bot display name.
  5. Follow prompts to set the bot id. It must be globally unique in Telegram and end with bot.
  6. After creation, BotFather returns a message containing the bot token. Copy it into the configuration.

Notification Target Management

To prevent notification abuse, you must verify that the notification target belongs to you.

The following notification targets are currently supported.

Email

This target requires configuration parameters.

ParameterDescription
emailEmail address you want to send to

Feishu

This notification target requires configuration parameters.

ParameterDescription
webhook_urlFeishu webhook URL
signFeishu webhook signature
  1. Create a custom webhook bot in a Feishu group.
  2. Open bot configuration details and enable signature.
  3. Copy Webhook URL and signature into the configuration.

DingTalk

Same as Feishu above.

Apple APNS

This notification target must be used with the Revornix iOS/iPad app. Bind the device by scanning with the scan button in the top-right corner of the “Me” page in the mobile app. If you have not installed it yet, please download from the App Store. (The mobile app has not been officially released yet. Please wait a bit.)

Apple APNS (SandBox)

Same as above.

Telegram

ParameterDescription
chat_idID of the Telegram group chat
  1. Create a new Telegram group.
  2. Invite your Telegram bot into that group.
  3. Send any message starting with / in the group.
  4. Open https://api.telegram.org/bot[your bot_token]/getUpdates (replace [your bot_token] with your bot token), then search for the message you just sent.
  5. Find the id in the response, copy it, and fill it in the configuration.

Notification Task Management

Note: Notification sources and notification targets must match, otherwise notifications cannot be sent. The supported mappings are shown below:

Notification SourceNotification Target
EmailEmail
FeishuFeishu
DingTalkDingTalk
Apple APNSApple APNS
Apple APNS (SandBox)Apple APNS (SandBox)
TelegramTelegram

Both time triggers and event triggers are supported. You can choose based on your actual needs.

Event triggers currently support only:

  • RemovedFromSection: You are removed from a section
  • SectionCommented: A section you created/participated in is commented
  • SectionSubscribed: A section you created/participated in is subscribed
  • SectionUpdated: A section you participated in/subscribed to is updated

Both custom notification content and template notification content are supported. If you need real-time dynamic messages, you must use template content, because custom content is fixed at configuration time and cannot be changed dynamically.

Currently available templates:

  • Daily Summary Template: Daily summary template
  • Removed From Section Template: Notification template for being removed from a section
  • Section Commented Template: Notification template for section comments
  • Section Subscribed Template: Notification template for section subscriptions
  • Section Updated Template: Notification template for section updates
Last updated on