Skip to content

Google Calendar Integration ​

Iris integrates with Google Calendar to give you conversational control over your schedule. Ask about upcoming events, create meetings, reschedule appointments, and manage your calendar through natural conversation.

Features ​

  • View Events: See upcoming events and ask about your schedule
  • Create Events: Schedule meetings with natural language
  • Update Events: Modify times, titles, locations, and descriptions
  • Delete Events: Cancel events when plans change
  • Multi-Calendar Support: Work with multiple calendars

Setup ​

1. Create Google Cloud Credentials ​

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Calendar API
  4. Go to Credentials and create an OAuth 2.0 Client ID
  5. Set the application type to Web application
  6. Add your callback URL: http://localhost:8000/settings/google/callback

2. Configure Environment ​

bash
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=your-client-secret
GOOGLE_REDIRECT_URI="${APP_URL}/settings/google/callback"

GOOGLE_REDIRECT_URI must match the callback URL you added in the Cloud Console exactly. .env.example builds it from APP_URL.

3. Connect Your Account ​

  1. Open Iris and go to Settings > Connected Services
  2. Click Connect next to Google Calendar and authorize access
  3. You land on Settings > Google Calendar with your primary calendar selected. Tick any other calendars Iris should see, pick the default calendar for new events, and click Save Settings

The Connected Services and Google Calendar settings pages need a verified email address. If email verification is on and you haven't verified yet, Iris sends you to the verification notice instead (see Access Settings).

Context Injection ​

When connected, Iris automatically receives your calendar events in every conversation — both upcoming events and recent past events. This gives Iris awareness of what you've had going on, not only what's ahead.

By default, Iris includes 3 days of past events and 7 days of future events. Both windows are configurable (see Configuration).

You: "Can we meet tomorrow?"

Iris: "I see you have a dentist appointment at 10am and a team standup at 2pm tomorrow. Would 11:30am or 4pm work better?"

You: "What did I have yesterday?"

Iris: "Yesterday you had a 1:1 with Alex at 10am and a sprint review at 3pm."

Available Tools ​

ToolPurpose
list_calendar_eventsFetch upcoming events (1-30 days ahead)
create_calendar_eventCreate new events with title, time, location
update_calendar_eventModify existing events
delete_calendar_eventRemove events

Example Conversations ​

You: "What do I have this week?"

Iris: "Here's your week: Monday 10am Team standup, Tuesday 2pm Client call, Wednesday 9am Dentist..."

You: "Schedule a meeting with Sarah Tuesday at 3pm about the roadmap"

Iris: "Created: Project Roadmap Discussion with Sarah, Tuesday at 3:00 PM."

You: "Move my dentist appointment to Thursday"

Iris: "Done - moved from Wednesday 9am to Thursday 9am."

Configuration ​

SettingDefaultDescription
calendar.cache_ttl15Minutes cached events count as fresh
calendar.stale_ttl60Minutes a stale copy can still be served while it refreshes in the background
calendar.event_horizon7Days ahead to include in context
calendar.event_lookback3Days in the past to include in context. Set to 0 to disable.

Caching ​

The events Iris sees in context are cached per user with stale-while-revalidate: for cache_ttl minutes the cached copy is used as is, and until stale_ttl it's still served while a fresh copy is fetched in the background. Upcoming events (the event_horizon window) and recent past events (the event_lookback window) are cached separately.

A list_calendar_events call for a different number of days than event_horizon always fetches from Google and isn't cached, so a quick "what's on today?" lookup never replaces the calendar Iris sees in context. Creating, updating, or deleting an event through Iris clears both cached windows, so the next message sees the change. Changing your selected calendars, reconnecting your Google account, and disconnecting it clear both windows too, as does deleting your account. That way events from a calendar you've removed or an account you've left don't linger in context.

Security Considerations ​

Token Storage ​

Google OAuth tokens are stored encrypted in the database (google_token and google_refresh_token fields on the User model). Laravel's encryption uses your APP_KEY, so keep that secure.

Permissions Scope ​

Iris requests the https://www.googleapis.com/auth/calendar scope, which grants read/write access to every calendar on the Google account. Iris only reads events from the calendars you select on the Google Calendar settings page. The create, update, and delete tools aren't limited to that selection: they act on whichever calendar ID they're given, and new events go to your default calendar when none is given.

Token Refresh ​

Access tokens expire after 1 hour. Iris automatically refreshes them using the refresh token before making API calls. If the refresh token becomes invalid (user revokes access, token expires after 6 months of inactivity), the user needs to reconnect.

Troubleshooting ​

Calendar not connected: Disconnect and reconnect in Settings, ensure all permissions are granted.

Events not showing: Check that the calendar is selected in Settings and events fall within the configured look-back (3 days past) or event horizon (7 days ahead). Events added directly in Google can take up to calendar.cache_ttl minutes (15) to appear, because Iris serves the cached copy until then.

Can't create events: Verify you have write access to the target calendar.

"Token has been expired or revoked": The refresh token is invalid. Disconnect and reconnect in Settings.

Events appearing in wrong timezone: Iris uses ISO 8601 timestamps with timezone info. Check that your timezone is set correctly in Settings > Profile. The system default can also be configured in config/iris.php under temporal.timezone.