Read Calendar Events
Determine the date range from the user's request: - 'today' → today's date in user's timezone - 'tomorrow' → tomorrow's date - 'this week' → Monday through Sunday of current week - 'next week' → Following Monday through Sunday - Specific dates → Use as provided (YYYY-MM-DD format)
Check Connection Profiles for the user's timezone. Use it to interpret relative dates correctly.
Present the events in a readable format, grouped by day.
For each day: - List events in chronological order - Show time (or 'All day') and title - For meetings with attendees, mention who's attending - Apply classification: skip obvious non-meetings (OOO blocks, focus time) unless specifically asked
If the user asked about a specific person: - Filter to events where that person is an attendee - Check collaborators in profile for name matching
For long lists, summarize first: 'You have 12 events this week. The busiest day is Tuesday with 5 meetings. Want the full list?'
Clean up: delete Calendar Events after presenting.
To run this task you must have the following required information:
> Date range (today, tomorrow, this week, specific dates), optional person filter
If you don't have all of this information, exit here and respond asking for any extra information you require, and instructions to run this task again with ALL required information.
---
You MUST use a todo list to complete these steps in order. Never move on to one step if you haven't completed the previous step. If you have multiple read steps in a row, read them all at once (in parallel).
Add all steps to your todo list now and begin executing.
## Steps
1. Determine the date range from the user's request: - 'today' → today's date in user's timezone - 'tomorrow' → tomorrow's date - 'this week' → Monday through Sunday of current week - 'next week' → Following Monday through Sunday - Specific dates → Use as provided (YYYY-MM-DD format)
Check `./documents/connections/[service-name].md` for the user's timezone. Use it to interpret relative dates correctly.
2. [Gather Arguments: Fetch Calendar Events] The next step has the following requirements for arguments, do not proceed until you have all the required information:
- `startDate`: Start date in YYYY-MM-DD format
- `endDate`: End date in YYYY-MM-DD format
- `outputPath`: ./documents/tmp/calendar-events.json
3. [Run Code: Fetch Calendar Events]: Call `run_script` with:
```json
{
"file": {
"path": https://sk.ills.app/code/calendar.google.events/preview,
"args": [
"startDate",
"endDate",
"outputPath"
]
},
"packages": null
}
```
4. [Read Calendar Agent Rules]: Read the documentation in: `./skills/sauna/[skill_id]/references/calendar.google.rule.md` (Event classification rules)
5. Present the events in a readable format, grouped by day.
For each day: - List events in chronological order - Show time (or 'All day') and title - For meetings with attendees, mention who's attending - Apply classification: skip obvious non-meetings (OOO blocks, focus time) unless specifically asked
If the user asked about a specific person: - Filter to events where that person is an attendee - Check collaborators in profile for name matching
For long lists, summarize first: 'You have 12 events this week. The busiest day is Tuesday with 5 meetings. Want the full list?'
Clean up: delete `./documents/tmp/calendar-events.json` after presenting.