Skip to content

LastVet marketing newsletter (Cloudflare Pages Functions)

Public confirm and unsubscribe links for the shared marketing_* platform (product = lastvet).

Routes (production last.vet):

  • GET /api/newsletter/confirm?token=...
  • GET /api/newsletter/unsubscribe?token=...
  • POST /api/newsletter/unsubscribe-one-click?token=...

Cloudflare Pages secrets (project last-vet-web)

Set in Workers & Pages → last-vet-web → Settings → Environment variables (Production):

Variable Value
SUPABASE_URL Onset prod Supabase URL (emxrmjysvxeboavhatry)
SUPABASE_SERVICE_ROLE_KEY Matching service role key
MARKETING_UNSUB_SECRET Optional. Must match last1-admin if set there

Admin sends and sequence dispatch use the same Supabase project and marketing_subscribers.product = lastvet.

Sequence dispatch

Queue jobs for product=lastvet are drained by the onset-web marketing dispatch cron (same Supabase project as Onset). Set LASTVET_* env vars on the onset-web Cloudflare Pages project so sequence and broadcast mail uses LastVet branding and updates@last.vet.

Until a default welcome sequence exists in admin, confirm will not enqueue sequence steps.