Calendar & Tasks

Lesson 2 of 4

Connecting Calendar & Tasks

Estimated time: 5 minutes

Connecting Calendar & Tasks

Time to wire up your calendar and task manager to OpenClaw. Once connected, you'll be able to create, query, and modify events from your chat app.

Prerequisites

    Connect your calendar

    Connect Google Calendar with OAuth:

    openclaw connect add \
      --name "My Calendar" \
      --type google-calendar \
      --auth oauth
    

    This opens a browser window to authorize OpenClaw. Grant access to:

    • View and edit events (required)
    • View calendar list (required)

    Multiple calendars

    If you have separate work and personal Google calendars, OpenClaw will see all of them. You can choose which calendar to create events on by name — e.g., "schedule dentist on my personal calendar."

    Verify the connection:

    Test connection
    openclaw connect test 'My Calendar'

    You should see: ✅ Connected. Found 3 calendars, 47 upcoming events.

    Connect your task manager (optional)

    Adding a task manager lets OpenClaw create to-dos alongside calendar events.

    openclaw connect add \
      --name "My Tasks" \
      --type todoist \
      --api-key "YOUR_TODOIST_API_KEY"
    

    Find your API key: Todoist Settings → Integrations → Developer → API token.

    Create the scheduling agent

    Now set up the agent that interprets your natural language commands:

    openclaw agent add \
      --name "Calendar Assistant" \
      --trigger "/cal" \
      --also-trigger "schedule,reschedule,cancel meeting,what's on" \
      --source "My Calendar,My Tasks" \
      --message "You are a calendar and task management assistant. When the user sends a scheduling request:
    
    1. Parse the intent (create, move, cancel, query)
    2. Extract date, time, duration, and attendees
    3. Check the calendar for conflicts
    4. Execute the action
    5. Confirm what you did
    
    RULES:
    - Default event duration: 30 minutes for meetings, 1 hour for appointments
    - Default reminder: 15 minutes before meetings, 1 hour before appointments
    - If a time is ambiguous ('afternoon'), suggest 2-3 specific slots
    - Always confirm before modifying or deleting existing events
    - When creating tasks alongside events, add them with matching due dates
    - Use a friendly, concise tone
    
    The user's request:
    {input}" \
      --announce \
      --channel telegram \
      --to "CHAT_ID"
    

    Test basic scheduling

    Try these commands in your chat:

    Create an event:

    /cal lunch with Sarah Thursday at noon
    

    Expected response:

    ✅ Created: Lunch with Sarah
    📅 Thu Jan 18, 12:00-1:00 PM
    📍 No location set
    ⏰ Reminder: 15 min before
    

    Query your schedule:

    what's on my calendar tomorrow?
    

    Expected response:

    📅 Tomorrow (Fri Jan 19):
    
    9:00-9:30 AM   Team standup
    11:00-12:00 PM Client call — Acme Corp
    12:00-1:00 PM  Lunch with Sarah
    3:00-4:00 PM   Project review
    
    4 events, 3.5 hours scheduled.
    Next free slot: 1:00-3:00 PM (2 hours)
    

    Create an event with a task:

    /cal dentist appointment next Tuesday at 3:30pm,
    and remind me to confirm the appointment on Monday
    

    Expected response:

    ✅ Created: Dentist appointment
    📅 Tue Jan 23, 3:30-4:30 PM
    ⏰ Reminder: 1 hour before
    
    ✅ Task added: Confirm dentist appointment
    📋 Due: Mon Jan 22
    

    Natural Language Examples

    OpenClaw understands a wide range of scheduling phrases. Here are patterns that work:

    You SayOpenClaw Does
    "Schedule dentist next Tuesday afternoon"Finds a free afternoon slot, creates 1-hour event
    "Coffee with Alex Friday 10am at Blue Bottle"Creates event with location
    "Block 2 hours for deep work tomorrow morning"Creates a focus block (no attendees)
    "Move my 3pm to Friday"Reschedules, notifies attendees
    "Cancel the team lunch"Removes event (with confirmation)
    "What's my week look like?"Full week summary with free slots
    "When am I free Thursday?"Lists available time slots
    "Add a task: buy birthday gift by Friday"Creates task in Todoist/Notion

    The more context you give, the better the result:

    • Include duration: "1-hour dentist" vs. just "dentist" (defaults to 1 hour)
    • Specify calendar: "on my work calendar" if you have multiple
    • Add attendees: "with Sarah and Mike" auto-generates invite emails if contacts are linked
    • Set location: "at Blue Bottle on Valencia" adds the location field

    OpenClaw handles relative dates well: "next Tuesday", "this Friday", "in 2 weeks", "tomorrow morning", "end of month".

    When OpenClaw can't determine a specific time, it asks:

    You: schedule dentist next week
    OpenClaw: What day and time? Here are your free slots next week:
      - Mon: 10:00-12:00, 2:00-5:00
      - Tue: 9:00-11:00, 3:00-5:00
      - Wed: 1:00-5:00 (morning full)
      - Thu: All day free
      - Fri: 9:00-12:00
    

    Reply with just the time: "Tuesday at 10" and it creates the event.

    What You Have Now

    Your calendar assistant is live:

    • Create events from chat with natural language
    • Query your schedule without opening the calendar app
    • Optionally create linked tasks in your task manager
    • Smart defaults for duration, reminders, and calendars

    The next lesson adds the real magic: automatic conflict detection and smart rescheduling suggestions.

    Knowledge Check

    Why does the Calendar Assistant default to different reminder times for meetings vs. appointments?