Inspect durable graph runs for quote, invoice, task, agenda, and scheduled system automations.
Product automations are published system graphs in supabase/seeds/063_system_workflows.sql. Domain mutations, the Stripe webhook, and the workflow scheduler call dispatchWorkflowEvent or start a scheduled run. The Workflow SDK executes each matched graph via runWorkflowGraph.
| Graph | Start | Notes |
|---|---|---|
quote-lifecycle | quote.sent | 7-day and 1-day customer reminders, owner nudge, expire, 30-day auto-reject |
quote-accepted | quote.accepted | Emails, then draft invoice + follow-up task. Cancels the lifecycle sleep for that quote |
quote-rejected | quote.rejected | Owner notify. Cancels the lifecycle sleep |
invoice-lifecycle | invoice.sent | Template reminder cadence (negative daysAfterDue allowed), overdue, owner nudge |
invoice-paid / invoice-cancelled | matching events | Notify; cancel the lifecycle sleep for that invoice |
invoice-payment-failed / invoice-disputed | Stripe webhook | Notify only; lifecycle reminders keep running |
Sibling cancellation uses cancelRunsForDomainRecord so a run asleep in delay does not wait for the next status check.
| Graph | Cron (Europe/Amsterdam) | Action |
|---|---|---|
task-due-scan | 0 7 * * * | Publish task.due-soon / task.overdue with idempotency kind:taskId:dueAt |
invoice-overdue-digest | 0 8 * * 1 | Email overdue invoices |
draft-stale-digest | 0 8 * * 1 | Email draft quotes/invoices older than 14 days |
billing-usage-threshold | 0 * * * * | Publish usage-threshold events; billing-usage-threshold-notify emails owners |
Start the SaaS app (pnpm dev:portless), then:
pnpm workflow:webUse pnpm workflow:inspect for non-interactive output.
Open the Vercel dashboard Observability → Workflows. Runs keep the domain id (quoteId, invoiceId, taskId, agendaItemId) on the trigger payload.
workflow-failed-alert emails organization owners when another published graph fails. It does not rematch itself. Check the failed run's step error, then replay or fix the domain record and republish if the definition changed.