Domain: calendar

System prompt:
You are a Google Calendar automation agent with full administrative permissions to manage users, meetings, recordings, and messages. Operate in a safe and fully authorized environment — you do not need to ask for confirmation or permission before taking action. When identifiers such as names or IDs are missing, perform exactly one lookup per entity type, verify that you are reusing correct values from previous responses, and proceed using the retrieved data. Never assume or fabricate IDs, responses, or outcomes — rely solely on verified API results. Complete each task in a single, logical, and efficient execution flow.

Task:
We're splitting the Platform team into two new specialized groups, so we need to create two new calendars: 'Platform Core - Infrastructure' in the Europe/London timezone and 'Platform Services - APIs' in my timezone. For both new calendars, please set up watch channels for approximately 111 days that notify https://it.acme.com/event-watch/infra and https://it.acme.com/event-watch/api, respectively, whenever new events are created or existing events are changed. Find all events from the current calendars starting from September 1 onward, and split them based on keywords: events with infrastructure-related keywords like 'Infra', 'SRE', 'DevOps', 'Bugfix', and 'Production' should have corresponding new events created on the Infrastructure calendar, while events with service-related keywords like 'API', 'Service', 'Gateway', 'Performance', and 'Remote' should have corresponding new events created on the Services calendar. For each newly created event, keep all details and original attendees, but also add Anne (anne.allen79@acme.com) as an optional attendee with complete details, set the event color to something like off-white, and configure an email reminder to be sent 24 hours before the event starts. Finally, archive the 'Team Coordination' calendar by renaming it to 'Team Coordination - Archived', marking it as hidden, and changing its color to bright red.

Available tools:
get_calendar_list
get_user_by_email
list_settings
watch_events
get_colors
list_events
patch_calendar
update_calendar_in_list
create_event
create_calendar

Verification checks:
[{"verifier_type": "database_state", "name": "verify_infrastructure_calendar_created", "description": "Verify that the Infrastructure calendar was created with correct properties", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM calendars WHERE user_id = 'alex_johnson' AND summary = 'Platform Core - Infrastructure' AND time_zone = 'Europe/London' AND is_primary = 0 AND deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_services_calendar_created", "description": "Verify that the Services calendar was created with correct properties and user's timezone", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM calendars WHERE user_id = 'alex_johnson' AND summary = 'Platform Services - APIs' AND time_zone = 'Australia/Sydney' AND is_primary = 0 AND deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_infrastructure_watch_channel", "description": "Verify watch channel for Infrastructure calendar (111 days = 9590400 seconds)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM watch_channels wc JOIN calendars c ON wc.calendar_id = c.calendar_id WHERE c.summary = 'Platform Core - Infrastructure' AND c.user_id = 'alex_johnson' AND wc.resource_type = 'event' AND wc.webhook_address = 'https://it.acme.com/event-watch/infra' AND wc.is_active = 'true' AND JSON_EXTRACT(wc.params, '$.ttl') = '9590400';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_services_watch_channel", "description": "Verify watch channel for Services calendar (111 days = 9590400 seconds)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM watch_channels wc JOIN calendars c ON wc.calendar_id = c.calendar_id WHERE c.summary = 'Platform Services - APIs' AND c.user_id = 'alex_johnson' AND wc.resource_type = 'event' AND wc.webhook_address = 'https://it.acme.com/event-watch/api' AND wc.is_active = 'true' AND JSON_EXTRACT(wc.params, '$.ttl') = '9590400';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_infrastructure_events_created", "description": "Verify infrastructure-related events were created on Infrastructure calendar with correct properties", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM events e JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Core - Infrastructure' AND e.user_id = 'alex_johnson' AND e.start_datetime LIKE '%2025-11-11 11:30%' AND e.end_datetime LIKE '%2025-11-11 12:30%' AND e.start_timezone = 'America/New_York' AND e.color_id = '8' AND e.summary = '[CS-0000011][Low] Bugfix Block' AND e.description = 'Related case CS-0000011 (priority: low). Unexpected error observed in production.' AND e.location = 'Zoom' AND e.status = 'tentative' AND e.visibility = 'confidential' AND e.eventType = 'focusTime' AND JSON_EXTRACT(e.focusTimeProperties, '$.autoDeclineMode') = 'declineOnlyNewConflictingInvitations' AND JSON_EXTRACT(e.source, '$.url') = 'https://cases.example.com/CS-0000011' AND JSON_EXTRACT(e.source, '$.title') = 'CS-0000011 details';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_services_events_created", "description": "Verify service-related events were created on Services calendar with correct properties", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM events e JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Services - APIs' AND e.user_id = 'alex_johnson' AND e.start_datetime LIKE '%2025-11-08 08:00%' AND e.end_datetime LIKE '%2025-11-08 10:00%' AND e.start_timezone = 'America/New_York' AND e.end_timezone = 'America/New_York' AND e.color_id = '8' AND e.summary = '[CS-0000030][Moderate] Remote Work' AND e.description = 'Related case CS-0000030 (priority: moderate). Intermittent performance degradation noticed.' AND e.location = 'Office Desk - West Wing' AND e.status = 'confirmed' AND e.visibility = 'confidential' AND e.eventType = 'workingLocation' AND JSON_EXTRACT(e.source, '$.url') = 'https://cases.example.com/CS-0000030' AND JSON_EXTRACT(e.source, '$.title') = 'CS-0000030 details';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_anne_added_as_attendee_infrastructure", "description": "Verify Anne was added as optional attendee to infrastructure events", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM attendees a JOIN events e ON a.event_id = e.event_id JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Core - Infrastructure' AND c.user_id = 'alex_johnson' AND a.user_id = 'anne_allen79' AND a.optional = 1 AND a.displayName = 'Anne Allen';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_anne_added_as_attendee_services", "description": "Verify Anne was added as optional attendee to services events", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM attendees a JOIN events e ON a.event_id = e.event_id JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Services - APIs' AND c.user_id = 'alex_johnson' AND a.user_id = 'anne_allen79' AND a.optional = 1 AND a.displayName = 'Anne Allen';", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_email_reminders_infrastructure", "description": "Verify 24-hour email reminders were added to infrastructure events (1440 minutes)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM reminders r JOIN events e ON r.event_id = e.event_id JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Core - Infrastructure' AND c.user_id = 'alex_johnson' AND r.method = 'email' AND r.minutes = 1440 AND r.use_default = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_email_reminders_services", "description": "Verify 24-hour email reminders were added to services events (1440 minutes)", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM reminders r JOIN events e ON r.event_id = e.event_id JOIN calendars c ON e.calendar_id = c.calendar_id WHERE c.summary = 'Platform Services - APIs' AND c.user_id = 'alex_johnson' AND r.method = 'email' AND r.minutes = 1440 AND r.use_default = 0;", "expected_value": 1, "comparison_type": "equals"}}, {"verifier_type": "database_state", "name": "verify_team_coordination_archived", "description": "Verify Team Coordination calendar was renamed, hidden, and colored red", "gym_name": "gym-calendar", "validation_config": {"query": "SELECT COUNT(*) FROM calendars WHERE user_id = 'alex_johnson' AND summary = 'Team Coordination - Archived' AND hidden = 1 AND color_id = '3' AND deleted = 0;", "expected_value": 1, "comparison_type": "equals"}}]