brain/wiki/eventing-webhooks/flow-failure-alerts.md
Email notifications when a flow run fails. On the first failure of a flow version within a 24-hour window, the system emails all configured receivers for the project; later failures in the same window are suppressed via a Redis counter to avoid spam. Cloud/EE only (edition check is in service logic, no plan flag).
LOWER(receiver)). AlertChannel is currently only EMAIL.alerts-service.ts: sendAlertOnRunFinish, add, list, delete. Email via email-service.ts sendIssueCreatedNotification.(projectId, LOWER(receiver)).sendAlertOnRunFinish({ issueToAlert, flowRunId, failedStep }) runs after a failed production run. It increments Redis flow_fail_count:<flowVersionId> (expires 86400s); only when the count is 1 does it email.failedStep.name is always findable and failedStepNumber is present.WRITE_ALERT + WRITE_PROJECT./v1/alerts: GET (READ_ALERT), POST (WRITE_ALERT), DELETE /:id. Project post-create hooks auto-subscribe the owner (personal) or the alertReceiverEmail (team).VALIDATION).projects/<id>/runs/<runId>. The old checkIssuesEnabled/isIssue/"View Issue" plumbing was removed.[<project>] Flow has an issue "<flow>" ⚠️. Platform admins can bulk subscribe/unsubscribe across projects (max 5 concurrent via p-limit).Entry point: alertsService, called from packages/server/api/src/app/flows/flow-run/flow-run-hooks.ts when a run finishes.
packages/server/api/src/app/ee/alerts/ — controller, service, entity, module registrationpackages/server/api/src/app/ee/helper/email/ — sendIssueCreatedNotification and the SMTP sender that builds the subject linepackages/server/api/src/assets/emails/issue-created.html — Mustache template for the failure emailpackages/server/api/src/app/ee/projects/ — EE post-create hooks plus the platform project controller and service that carry alertReceiverEmailpackages/server/api/src/app/project/ — CE project hooks and service that plumb the post-create contextpackages/core/shared/src/lib/ee/alerts/ — Alert type, AlertChannel, and the list/create request schemaspackages/core/shared/src/lib/management/project/project-requests.ts — CreatePlatformProjectRequest.alertReceiverEmailpackages/web/src/features/alerts/ — frontend API client and React Query hookspackages/web/src/app/components/project-settings/alerts/ — personal switch UI, team receiver list, add-receiver formpackages/web/src/features/projects/components/ — platform admin bulk subscribe actions and the new-project dialog fieldPaths verified 2026-07-17.