Prerequisites
- Google OAuth credentials configured (see Google OAuth setup)
- Completed the initial OAuth consent flow — the
calendar.eventsscope is included by default
Setup
No additional setup is required beyond the shared Google OAuth flow. Thehttps://www.googleapis.com/auth/calendar.events scope is part of the default scope
list in google/auth.py. Once you’ve completed the
Google integration setup, Calendar is ready to use.
Usage
- CLI
- Agent
The Shows events for the current day. Each line displays the event ID, date, time range,
and title:Shows events for the next 7 days by default. Use
Displays detailed information including title, time, location, description,
link, attendees (by email), status, and event ID.
Naive datetimes (without timezone) are treated as the configured timezone (At least one of Permanently deletes the event from your primary calendar.
ollim-bot cal subcommand provides six operations.List today’s events
List upcoming events
--days to change the window:| Argument | Required | Default | Description |
|---|---|---|---|
--days | No | 7 | Number of days to look ahead |
Show event details
Add an event
| Argument | Required | Description |
|---|---|---|
summary (positional) | Yes | Event title |
--start | Yes | Start time in YYYY-MM-DDTHH:MM format |
--end | Yes | End time in YYYY-MM-DDTHH:MM format |
--description | No | Event description |
OLLIM_TIMEZONE).Update an event
--summary, --start, --end, or --description must be provided.Delete an event
All operations use your primary calendar (
calendarId: "primary"). ollim-bot does
not support secondary calendars or calendar selection.API helpers
One function is exported fromgoogle/calendar.py for use by the Discord button
handler in views.py:
| Function | Signature | Returns |
|---|---|---|
delete_event | delete_event(event_id: str) -> str | Event summary |
asyncio.to_thread in the button handler to avoid
blocking the Discord event loop.
Troubleshooting
Calendar commands return an auth error
Calendar commands return an auth error
Your OAuth token may have expired or been revoked. Delete
~/.ollim-bot/state/token.json and run any calendar command to trigger
re-authentication.How do I find an event ID?
How do I find an event ID?
Event IDs are displayed as the first column in
ollim-bot cal today and
ollim-bot cal upcoming output. When using embed buttons, the agent
encodes the ID into the button action automatically.Times show in the wrong timezone
Times show in the wrong timezone
All datetimes are handled in the configured timezone (
OLLIM_TIMEZONE,
defaults to system local). Naive datetime inputs are assumed to be in this
timezone. The Google Calendar API stores and returns timezone-aware values.