Notifications, digests, and sequences

How alerts and emails are created, dispatched, and observed. Resend integration, dedupe windows, quiet hours, escalations.

7 min readOperations

InsightBase has two notification channels: in-app (the bell icon in the topbar) and email (Resend, direct REST). No SMS, push, or third-party gateways. Every notification you see in either channel flows through one engine.

The four cron dispatchers

  • process-notifications — every minute. Sweeps notification events, finalises completed ones, cancels orphans.
  • process-notification-deliveries — every minute. Sends pending deliveries via Resend with backoff and DLQ at 5 attempts. Honours quiet-hours preferences.
  • process-sequence-steps — every minute. Advances notification sequences (intro → reminder → final).
  • process-notification-escalations — every 5 min. Escalates unhandled high-severity events.

How an event flows

  1. A trigger fires (segment join, manual emit, or detector). Thesend-notification RPC creates a notification_event + per-recipient notification_deliveries rows.
  2. Within 60 seconds the deliveries dispatcher claims its batch and sends each via Resend. Successes write to email_send_log.
  3. The events sweeper marks the event sent / partially_sent / failed based on delivery outcomes.
  4. Sequences advance to the next step on a configured delay. Each step is its own event + deliveries.

Dedupe and quiet hours

Deduplication uses dedupe_keywith a 60-minute window by default (per-recipient, per-key). The same alert won't be emitted twice in a tight loop.

Quiet hours are user-configurable per-workspace. Low and normal priority emails are deferred during quiet hours; critical and high priority are not. The check is via the is_within_quiet_hours RPC.

Sequences

A sequence is an ordered list of notification steps with delays between them. Use cases:

  • Outreach: intro at day 0, reminder at day 3, final at day 7
  • Internal escalation: pager at 5min, page-and-call at 15min
  • Workspace onboarding: welcome → setup → tips → check-in

Each step honours quiet hours and dedupe independently. A recipient who unsubscribes mid-sequence has remaining steps cancelled.

See also

Ready to use it?

Create an InsightBase account or sign in to open this workflow inside the product.