Skip to content

Calendar Tool

The Calendar tool provides a unified view of all time-based data across the platform — meetings from Google Calendar, leave requests, public holidays, team events, and task deadlines.

  • Unified view — Aggregates meetings, leave, holidays, events, and tasks into one calendar
  • Multiple views — Month, week, and day views
  • Meeting management — View synced Google Calendar meetings with attendee details
  • RSVP — Yes / Maybe / No buttons on the event detail Sheet for events you’ve been invited to. Optimistically updates the chip and persists to Google with sendUpdates=all so the organiser sees your response
  • Status-aware chips — A meeting’s chip styling reflects your own RSVP at a glance (see Status legend)
  • Invite alerts — A meeting_invited notification fires from the bell when a new invite arrives. Driven by a */5 cron that scans the next 14 days; deduped via calendar_invite_seen so an invite only alerts once until the response status changes
  • Attendee picker — Searchable picker on create/edit pulls from internal team, CRM contacts, and accepts manual email entry for external guests
  • Entity matching — Meetings auto-matched to companies/contacts by attendee email
  • Places (desk booking) — Reserve desks and meeting rooms
  • Calendar settings — Configure working hours, default view, and sync preferences
  • Transcript integration — View meeting transcripts and extracted action items

EventChip renders four visually-distinct states based on your own attendee responseStatus. Synthetic events (birthdays, leave, holidays, etc.) keep their type-keyed colours and are unaffected.

StatusStyleMeaning
accepted (or you’re the organiser)Solid fillYou’ve said yes
tentativeDotted outline + softer fillYou said maybe
needsActionDashed outline + faded fillYou haven’t responded yet
declinedStrikethrough + 50% opacityYou said no
Access LevelViewUpdateManage
ExecutiveYesYesYes
HeadYesYesNo
ManagerYesYesNo
LeadYesYesNo
EmployeeYesYesNo
SourceColourDescription
MeetingsBlueSynced from Google Calendar
LeaveOrangeApproved leave requests
HolidaysGreenPublic holidays for configured state
EventsPurpleTeam events (from Events tool)
TasksRedTasks with due dates

The calendar uses a domain-wide delegated service account. If users hit “insufficient permissions” when creating or editing events, the workspace admin needs to authorise the right scopes:

In Google Workspace Admin → Security → Access and data control → API controls → Domain-wide delegation, locate the Nucleus service account’s client ID and ensure both of these scopes are listed (comma-separated):

  • https://www.googleapis.com/auth/calendar
  • https://www.googleapis.com/auth/calendar.events

The read-only variants (*.readonly) on their own will let listing succeed but block POST/PATCH/DELETE — which is exactly the failure mode that surfaces as “insufficient permissions” on save.

The frontend now surfaces Google’s detail message in the toast (see apiFetch and ApiError in src/lib/api.ts) so the next failure should include the underlying reason — read the toast first before assuming the problem is in our code.

FilePurpose
src/routes/calendar.tsxRoute definition
src/components/calendar/Calendar components (month/week/day views, event cards, RSVP buttons, attendee picker)
src/components/calendar/rsvp-buttons.tsxYes / Maybe / No segmented control
src/components/calendar/attendee-picker.tsxGuest picker (Team / CRM contacts / external email)
src/hooks/use-calendar.tsTanStack Query hooks (incl. useRespondToEvent)
worker/routes/calendar.tsAPI endpoints
worker/lib/calendar-invites.tsCron-driven scanner that fires meeting_invited notifications