Kernlift

Send notifications to Slack, Discord or Feishu

Operations alerts from your product arrive in a team chat channel, with every attempt recorded in a delivery log.

Operations notifications are sent to your team's chat. They are not sent to users. The console ships three channels: Slack, Discord and Feishu. Each channel posts to an incoming webhook URL that you save in the admin console.

Before you begin

  • A Slack workspace, Discord server or Feishu group where you can add an incoming webhook or bot.
  • An admin account with config.read and config.write.

Create a webhook with the chat provider

ProviderChoose it for
SlackSend to a workspace channel
DiscordSend to a server text channel
FeishuSend to a group bot

Save the webhook URL

Create the incoming webhook

Create a Slack app with incoming webhooks enabled, a webhook under a Discord channel's Integrations settings, or a custom bot in a Feishu group. Copy the URL.

Paste it on Email Config

Go to Settings → Email Config (/admin/config/email). Under Notification webhooks, paste the URL into Slack webhook URL, Discord webhook URL or Feishu webhook URL. The fields show saved URLs. Clearing one removes that webhook.

Save

Click Save provider. The same button saves the selected email card, so if you are on the active email provider's card, keep Set as active email provider ticked, or email is turned off.

The URL is the credential

Each notification is a JSON POST with no signature header. Keep the webhook URL private, and do not turn on signature verification on the receiving bot, or its requests will be rejected.

Send a test notification

Open Notifications

Go to Settings → Notifications (/admin/notifications).

Fill in the test

Under Test notification, choose a Channel, keep or change the Event key and Message, and click Send notification. The form reports Notification delivery recorded: and the result.

Send notifications from your code

The template does not send operations notifications by itself. Call the service where your product needs an alert. Name the channel by its key: slack-alerts, discord-alerts or feishu-alerts.

src/server/services/example.service.ts
import { sendNotificationTest } from "@/server/services/email-notifications.service";

await sendNotificationTest({
  channelKey: "slack-alerts",
  eventKey: "billing.refund.requested",
  message: "Refund requested for order ord_123",
  metadata: { orderId: "ord_123" },
});

The call returns the delivery log row with status sent, failed, not_configured or disabled. It throws only when the channel key does not exist.

Categories

Prop

Type

Every delivery attempt, successful or failed, is recorded alongside an audit entry, so a failed notification appears in the delivery log.

Verify

  • The message arrives in the chat channel.
  • Deliveries (/admin/notifications/deliveries) lists the attempt as sent, or shows the Error from the chat service.
  • /admin/notifications/channels shows each channel's status, taken from the URLs saved on Email Config.

pnpm validate:email checks the notification log and the admin routes.

Troubleshooting

Deliveries show not_configured

The channel's webhook URL is empty. Save it on Email Config and send another test.

Deliveries show failed

The chat service rejected the request, and Error holds its response. Check that the URL is complete and still active, and that the Feishu bot has no signature verification turned on.

Deliveries show disabled

The channel is switched off in the database, so nothing is sent even with a URL saved.

Email stopped after saving a webhook

The webhook was saved from the active email provider's card with Set as active email provider unticked. Open that card, tick the box and click Save provider.

Reference

Next steps