feat: add trigger.dev task for Google Calendar backfill on quota issues #27236
+552
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds a new trigger.dev task to backfill Google Calendar events when quota issues occur. This converts a manual script into an automated task that can be triggered via trigger.dev.
The task handles two scenarios:
Files added/modified:
backfill-google-calendar-events.ts- New trigger.dev task definitionGoogleCalendarBackfillService.ts- Core backfill logic serviceschema.ts- Added payload schema for the new tasktypes.ts- Added type definitions for the new taskCalendarsTaskService.ts- Added method to invoke the backfill serviceMandatory Tasks (DO NOT REMOVE)
How should this be tested?
{ "startTime": "2026-01-15T16:04:00Z", "endTime": "2026-01-15T16:06:00Z" }uidin BookingReference get synced to Google Calendaruidget deleted from Google CalendarEnvironment variables required:
GOOGLE_API_CREDENTIALSmust be configured in trigger.devChecklist for Human Review
as unknown as BookingReferenceForBackfill[]) is safe and matches the Prisma selectsendUpdates: "all"is acceptable (sends email notifications to attendees during backfill)https://app.cal.com/booking/may not work for self-hosted instancesLink to Devin run: https://app.devin.ai/sessions/ed3400b7f0a0451d980ad1683f850376
Requested by: @ThyMinimalDev