FluxyChat

Reference

Daily AI digest

Cron-driven recap of yesterday's chat activity with AI highlights per opted-in user, delivered via in-app notification, web push, and optional email.

Cron-driven recap of yesterday's chat activity — three AI-generated highlights per opted-in user, delivered via in-app notification, web push, and optional email.

Enable in production

  1. Apply migration 0051_daily_digest.sql.
  2. Set Worker env —
    • DAILY_DIGEST_ENABLED=true
    • AI_BASE_URL and AI_API_KEY (same stack as reply suggestions)
    • Optional — AI_DIGEST_MODEL, DIGEST_EMAIL_FROM, RESEND_API_KEY, or Cloudflare Email binding (env.EMAIL.send)
    • PUBLIC_APP_URL for links in email and push
  3. Cron 0 8 * * * is registered in wrangler.toml (daily at 08h00 UTC).
  4. Deploy with wrangler deploy

User opt-in

Users enable digest via —

  • PATCH /digest/preferences with a JSON body (enabled, email, etc.)
  • Dashboard Notifications → Daily AI digest card

Default when no row exists — disabled (explicit opt-in).

Channels

ChannelRequirement
In-appin_app_enabled (default on) → in_app_notifications kind digest
Web pushweb_push_enabled plus active web_push_subscriptions
Emailemail_enabled plus valid email plus RESEND_API_KEY or EMAIL binding

Deliveries are idempotent per (project, user, digest_date, channel) in digest_deliveries.

Manual run (admin)

POST /admin/digest/run
Authorization: Bearer <admin JWT>
Content-Type: application/json

{ "digestDate": "2026-06-07", "maxUsers": 50 }

Bypasses DAILY_DIGEST_ENABLED for staging verification.

On this page