agents/rules/patterns-workflow-triggers.md
To trigger workflows in Cal.com, use the scheduleWorkflowReminders function. This is the standard approach used throughout the codebase.
Before implementing new workflow triggers, examine existing implementations in the codebase to understand the pattern. The function:
Key locations where this is used:
packages/prisma/schema.prisma for existing webhooks and workflow trigger enums as referencepackages/features/ee/workflows/lib/constants.ts for UI displayen/locale.json using the format {enum}_trigger (all lowercase)Webhook triggers serve as the reference implementation pattern for workflow triggers.
Workflows and webhooks are two completely separate features in Cal.com with different implementations and file structures:
packages/features/ee/workflows/lib/constants.tsWhen working on workflow triggers, do not reference or use webhook trigger implementations - they are distinct systems.