Skip to content

@storyshelf/notify-chat

View as Markdown

@storyshelf/notify-chat sends formatted build and admin alerts to chat over Slack and Microsoft Teams incoming webhooks, plus a log provider for tests and local development. It has no runtime dependencies: every send goes through @storyshelf/core/utils (httpText), which adds a timeout and retries with Retry-After.

Terminal window
npm i @storyshelf/notify-chat
import { createShelfApp } from "@storyshelf/app";
import { chatNotifiers } from "@storyshelf/notify-chat";
const app = createShelfApp({ database, storage, notifications: { notifiers: chatNotifiers } });

Each provider is importable on its own (root aggregates all three):

import { slackWebhookNotifier } from "@storyshelf/notify-chat/slack";
import { teamsWorkflowNotifier } from "@storyshelf/notify-chat/teams";
import { logNotifier } from "@storyshelf/notify-chat/log";
Provider kindPosts toUse for
slack-webhookA Slack incoming webhook URLBuild and admin alerts in a Slack channel
teams-workflowA Teams workflow (webhook) URLThe same, in Microsoft Teams
logThe server logTests and local development

Providers only make a kind available. Project admins then add channels of that kind — in Settings → Notifications or via the API — each with an event filter and display toggles. A webhook URL is a channel secret: it is encrypted at rest (AES-256-GCM) and decrypted in memory only when a message is sent.

See Notifications for channels, subscriptions, and the events you can subscribe to.