Notification Settings: Email, Slack & Discord Webhooks
Notification Settings: Email, Slack & Discord Webhooks
The SaaS Factory platform can dispatch real-time alerts to your team whenever important operational events occur. Notification delivery is fully configurable — you choose which channels receive alerts and which event types trigger them.
Supported Channels
Slack
Provide an incoming webhook URL for a Slack channel. The platform will POST a structured message to that channel whenever a subscribed event fires.
Discord
Provide a Discord channel webhook URL. The platform will POST a message in Discord format to that channel.
Provide one or more email addresses. The platform will send alert emails directly when a subscribed event fires.
Configuring Notification Settings
Notification preferences are stored in the notificationSettings table in the database. Each row holds:
- Per-channel webhook URLs — one URL field per supported channel (Slack, Discord, Email)
- Per-event boolean toggles — individually enable or disable each event type
Leaving a channel's webhook URL blank effectively disables that channel without affecting other channels.
Supported Event Types
| Event Flag | Trigger Condition |
|---|---|
onRevenueDrop | Revenue falls below a monitored threshold |
onChurnSpike | Churn rate spikes beyond a monitored threshold |
| (+ 5 additional events) | Other key product and operational signals |
Each event type is an independent boolean. You can, for example, send onChurnSpike alerts to Slack while routing onRevenueDrop alerts to both Slack and Discord, with email disabled entirely.
Architecture
- Schema:
src/db/schema.ts—notificationSettingstable defines webhook URL columns and event-type boolean columns - Dispatch logic:
src/lib/notifications.ts— ~18 KB implementation that reads settings, selects active channels, and delivers payloads to each configured webhook endpoint
Database Migration
After deploying v1.0.69, run your migration command to create the notificationSettings table:
# Example — adjust for your migration tooling
npx drizzle-kit push
Notes
- Webhook delivery to Slack and Discord depends on the validity and permissions of the provided webhook URLs. Verify your webhook URLs are active and scoped to the correct channel before enabling notifications in production.
- All notification dispatch is handled server-side by the platform; no client-side credentials are required.