Design the notification system that powers Notion's in-app inbox, email digests, and push notifications when users are mentioned, comments are replied to, or pages they follow are updated.
Triggers that produce notifications:
Mention — a user is @-mentioned in a block or comment.
Comment reply — someone replies in a thread the user is part of.
Page update — a page the user is "following" is edited (debounced).
Workspace invite — a user is invited to a new workspace.
Permission change — a user is granted or revoked access on a page.
Delivery channels:
In-app inbox — always populated (the bell icon in the nav).
Email — sent immediately for invites/permission, batched/digested for mentions and replies, suppressed if the user has seen the in-app notification within N minutes.
Push (mobile/web) — sent for mentions/replies only if the user has push enabled AND is not currently active on web (presence-aware).
Slack/Teams integrations — for workspaces that have wired up an integration.
Design the end-to-end pipeline: how events are produced from the editor/comments service, fanned out to recipients, deduplicated, persisted, scheduled, and delivered across channels with the right preferences honoured.