| title | impact | impactDescription | tags |
|---|---|---|---|
Workflow Trigger Implementation |
MEDIUM |
Consistent workflow patterns ensure reliable automation |
workflows, triggers, automation |
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:
- Filters workflows by trigger type
- Processes each workflow step
Key locations where this is used:
- Booking handlers
- Confirmation processes
- Other booking-related events
- Check
packages/prisma/schema.prismafor existing webhooks and workflow trigger enums as reference - Add the same enums to workflows (only when asked specifically)
- Add enums to
packages/features/ee/workflows/lib/constants.tsfor UI display - Add translations to
en/locale.jsonusing 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:
- Workflow constants:
packages/features/ee/workflows/lib/constants.ts - NOT in the webhooks directory
When working on workflow triggers, do not reference or use webhook trigger implementations - they are distinct systems.