- Add CalendarConfig to schema with OAuth2 credentials support - Implement CalendarTool with list_events, create_event, and check_availability actions - Add email parser utility for extracting meeting information from emails - Register calendar tool in agent loop (auto-loaded when enabled) - Add calendar skill documentation - Update AGENTS.md with calendar integration instructions - Add CALENDAR_SETUP.md with complete setup guide - Add Google Calendar API dependencies to pyproject.toml - Support time parsing for 'today', 'tomorrow', and various time formats (12/24-hour, am/pm) - Ensure timezone-aware datetime handling for Google Calendar API compatibility
1.6 KiB
1.6 KiB
name, description
| name | description |
|---|---|
| calendar | Interact with Google Calendar. Create events, list upcoming events, and check availability. |
Calendar Skill
Use the calendar tool to interact with Google Calendar.
Setup
- Enable Google Calendar API in Google Cloud Console
- Create OAuth2 credentials (Desktop app)
- Download credentials JSON file
- Configure in nanobot:
export NANOBOT_TOOLS__CALENDAR__ENABLED=true export NANOBOT_TOOLS__CALENDAR__CREDENTIALS_FILE=/path/to/credentials.json
On first run, you'll be prompted to authorize access via OAuth flow.
Actions
List Events
List upcoming calendar events:
calendar(action="list_events", max_results=10)
Create Event
Create a new calendar event:
calendar(
action="create_event",
title="Team Meeting",
start_time="2024-01-15T14:00:00",
end_time="2024-01-15T15:00:00",
description="Discuss project progress",
location="Conference Room A",
attendees=["colleague@example.com"]
)
Time formats:
- ISO format:
"2024-01-15T14:00:00" - Relative:
"tomorrow 2pm","in 1 hour","in 2 days"
Check Availability
Check if a time slot is available:
calendar(
action="check_availability",
start_time="2024-01-15T14:00:00",
end_time="2024-01-15T15:00:00"
)
Email Integration
When an email mentions a meeting (e.g., "meeting tomorrow at 2pm"), the agent can automatically:
- Parse the email to extract meeting details
- Create a calendar event using
create_event - Confirm the event was created
Enable automatic scheduling:
export NANOBOT_TOOLS__CALENDAR__AUTO_SCHEDULE_FROM_EMAIL=true