How to Build a Google Calendar Scheduling Agent with OpenClaw
OpenClaw's heartbeat system turns a Google Calendar connection into a scheduling agent that checks your day, creates events from chat, and flags conflicts before they happen. This guide covers Google Cloud setup, OAuth scoping, and the agent workflows that separate a calendar bot from a calendar agent.
The Gap Between Calendar Apps and Calendar Agents
Only 32% of organizations use an AI tool to schedule meetings, according to Zoho's 2026 appointment scheduling survey. At the same time, 40% of organizations still spend more than an hour coordinating a single appointment over email. The disconnect points to a specific failure: most "smart" calendar tools stop at suggesting open slots. They don't check your schedule proactively, create events from a chat message, or warn you about conflicts before your morning coffee.
An OpenClaw scheduling agent closes that gap. It connects to Google Calendar via OAuth, reads your events, and acts on what it finds. When someone messages "set up a call with Ana Thursday afternoon," the agent checks availability, picks a slot, and creates the event. When you wake up, it has already prepared a summary of your day.
The difference between a calendar integration and a calendar agent comes down to three capabilities. First, proactive scheduling through OpenClaw's heartbeat system, which wakes the agent on a timer instead of waiting for input. Second, natural language event creation with clarification loops that catch ambiguous dates before committing. Third, availability checking that returns candidate slots for you to pick from, not a binary yes-or-no answer.
Building this requires about 10 minutes of Google Cloud configuration and a few decisions about OAuth scopes. The rest of this guide walks through each step, from project creation to your first automated morning briefing.
How to Configure Google Cloud OAuth for OpenClaw
Before OpenClaw can read or write your calendar, you need a Google Cloud project with the Calendar API enabled and OAuth credentials configured.
Create a Google Cloud project
Open the Google Cloud Console and create a new project dedicated to your OpenClaw integrations. A separate project makes it straightforward to audit what has access and revoke it later if needed.
Enable the Calendar API
Navigate to APIs & Services, search for "Google Calendar API," and enable it. This unlocks the REST endpoints your agent will use to read events, create meetings, and check free/busy status.
Configure OAuth credentials
You have two client types to choose from:
- Desktop app: Best for CLI-based setups where OpenClaw runs on a VPS or local machine. The OAuth flow opens a browser window for consent, then stores tokens locally.
- Web application: Best for server-hosted deployments with callback URLs. Requires a redirect URI configuration.
For most single-agent setups, the desktop client is simpler.
Set minimal Calendar API scopes
Request only the permissions your agent needs. Google Calendar offers three scopes relevant to scheduling agents:
calendar.readonly: Read-only access to calendars and events. Start here.calendar.events: Read and write access to events. Required for creating meetings.calendar.events.readonly: Read-only access to events specifically.
Start with read-only access. A scheduling agent with only read permissions still handles morning briefings, availability checks, and conflict detection. Add write access later if you actually need event creation.
Complete the OAuth handshake
Follow the authentication flow described in your chosen integration guide. The LumaDock tutorial and the Expanso integration guide both walk through the consent screen step by step.
OAuth tokens are stored locally and never sent to OpenClaw or any AI model. Treat them like passwords: restrict filesystem permissions and keep them out of version control.
Morning Briefings, Availability Checks, and Event Creation
With OAuth configured, you can build the three core workflows that make a scheduling agent worth the setup time.
Morning briefing
A morning briefing queries today's events and delivers a compact summary. The agent should surface your first meeting time, any gaps longer than 60 minutes, and off-site locations that require travel time. The goal is a quick scan before your day starts, not a wall of text.
Filtering matters more than formatting. A briefing that lists all 12 events on your calendar is noise. One that highlights "you have a client call in 40 minutes at a different office, and a three-hour open block after lunch" is useful. The SFAILabs guide walks through delivery options including messaging gateways like Telegram and WhatsApp.
Availability checking
Availability checks are where agents diverge from simple calendar bots. Instead of returning a binary "you're free" or "you're busy," a well-built agent returns several candidate time slots and asks you to pick one. This two-step approach prevents accidental bookings and keeps you in control of which slot gets used.
You ask "when can I meet with the design team this week?" The agent queries free/busy data, filters for reasonable meeting hours, and presents options. Only after you confirm a specific slot does the agent create the event.
Clarification loops
Natural language date parsing is tricky. "Next Thursday" could mean this Thursday or the following one. "Tomorrow morning" means different things depending on time zones and personal schedules. A good scheduling agent asks follow-up questions before committing to a date.
This is the "clarification loop" pattern: the agent parses your request, identifies ambiguity, and asks for confirmation. "You said Thursday. Did you mean May 29 or June 5?" This prevents the most common scheduling error, putting an event on the wrong day.
Event creation from natural language
Once the agent has a confirmed date, time, and attendee list, it creates the event through the Calendar API. The Expanso integration guide describes a pipeline pattern where the agent structures natural language into the required fields: title, start time, end time, timezone, and attendees.
For read-only setups, you can skip event creation entirely and still get a useful agent. Briefings and availability checks work with just the calendar.readonly scope, so you can test the full workflow before granting write access.
The OpenClaw Heartbeat for Proactive Scheduling
The heartbeat is what turns a calendar chatbot into a calendar agent. Instead of waiting for you to ask about your schedule, the agent wakes up on a regular cycle and checks for things that need attention.
OpenClaw's heartbeat fires every 30 minutes by default. On each cycle, the agent reads a HEARTBEAT.md file in its workspace. This file acts as a checklist of proactive tasks. If something needs attention, the agent takes action and sends you a message. If nothing is happening, it responds with HEARTBEAT_OK, which the gateway suppresses so you're not spammed with "all clear" updates every half hour.
For a calendar agent, your HEARTBEAT.md might include tasks like these:
- Check if any meeting starts within 45 minutes and send a prep reminder with attendee context
- Detect overlapping or back-to-back meetings and flag scheduling conflicts
- Find unscheduled gaps longer than 90 minutes and suggest focus time blocks
- After a meeting ends, prompt for follow-up action items or notes
The heartbeat cadence matters for both responsiveness and token usage. A 30-minute cycle is the recommended default. For calendar-heavy roles with 6 or more meetings per day, you could drop to 15 minutes. For lighter schedules, 45 minutes works fine and saves on API calls.
One detail worth noting: the heartbeat runs periodic agent turns in the main session, not in a separate background process. This means the agent has full access to conversation context, memory files, and any tools you've configured. It can reference earlier conversations about a meeting when preparing your next briefing.
Keep your scheduling agent's state between sessions
Fastio gives your OpenClaw agent 50GB of free persistent storage with MCP access, no credit card required. Write calendar summaries, meeting prep docs, and availability reports to a shared workspace your team can see.
Persisting Calendar Agent State Across Sessions
A scheduling agent is only useful if it remembers what happened yesterday. When OpenClaw restarts or a session expires, state disappears unless you've configured persistent storage.
You have several options for solving this. Local disk works for single-machine setups but breaks when you switch devices or rebuild the server. S3 or Google Cloud Storage handles durability but adds configuration overhead and doesn't give your team visibility into what the agent stored. Google Drive is accessible but lacks the workspace structure agents need for organized file management across sessions.
Fastio takes a different approach. It provides shared workspaces where agents and humans see the same files through the same interface. Your scheduling agent writes daily briefings, meeting notes, and availability reports to a Fastio workspace. You review them in the web UI or query them through the Fastio MCP server. When Intelligence Mode is enabled on a workspace, the platform indexes those files for semantic search. You can ask questions like "what did the agent schedule last Tuesday?" and get answers with citations pulled from the actual meeting records.
The Business Trial includes 50GB of storage, included credits, and 5 workspaces, with no credit card required. For a scheduling agent that mostly writes small text files, that capacity lasts indefinitely.
The practical workflow ties the whole system together: your OpenClaw agent writes calendar summaries and meeting prep docs to a Fastio workspace. Your team reads them there. If the agent produced something useful, like a recurring meeting template or a scheduling policy doc, you can transfer ownership to a team member who takes over management. The agent keeps admin access for ongoing updates.
What to Watch for with Time Zones and Recurring Events
Two issues cause the most trouble in calendar agent deployments. Address them during setup, not after your agent books a meeting at 3 AM.
Time zone configuration
Set the time zone explicitly in your agent's environment. VPS deployments default to UTC, which means your "9 AM standup" becomes a 9 AM UTC event if you're not careful. The SFAILabs guide recommends setting the timezone at the environment level rather than relying on per-request parsing.
Always include the timezone offset when creating events through the API. A start time like 2026-05-29T09:00:00-05:00 is unambiguous. A start time like 2026-05-29T09:00:00 without an offset is not, and the API will interpret it based on the calendar's default timezone, which may not be what you intended.
Recurring events
The Google Calendar API treats recurring events as a single entry with an RRULE pattern unless you expand them. If your agent queries for "meetings this week" without the singleEvents=true parameter, it will miss every instance of your weekly standup, your biweekly 1-on-1, and your monthly review. This is one of the most common bugs in calendar integrations.
Always pass singleEvents=true when querying events for a date range. This expands recurring events into individual instances so your agent can see every meeting on the actual calendar.
Push notifications vs. polling
The Calendar API's Events watch endpoint lets you register an HTTPS callback that receives notifications when events change. The default TTL is 604,800 seconds (7 days), after which you need to renew the subscription. This is more efficient than polling and gives you near-real-time updates when someone adds or moves a meeting.
For simpler setups, the heartbeat pattern with 30-minute polling is good enough. You'll miss last-second calendar changes, but for most scheduling agents a 30-minute window is acceptable. Choose push notifications when you need tighter response times, like detecting a cancellation before a meeting prep reminder goes out.
Security considerations
Log event IDs and timestamps only. Never write event titles, attendee names, or meeting descriptions to plain-text log files. If your agent creates meeting summaries or incident reports, store them in a workspace with appropriate access controls rather than in unprotected logs.
Frequently Asked Questions
How do I connect OpenClaw to Google Calendar?
Create a Google Cloud project, enable the Calendar API, and set up OAuth credentials (desktop app or web application). Then follow the OAuth handshake using the integration guide for your setup. Once you can list upcoming events, the connection is working. The process takes about 10 minutes. Tokens are stored locally and never sent to OpenClaw.
Can OpenClaw create calendar events automatically?
Yes, but only if you grant the calendar.events scope during OAuth setup. With this scope, your agent can create events from natural language requests like "schedule a call with Ana Thursday at 2pm." You can start with read-only access for briefings and availability checks, then add write permissions later when you need event creation.
What Google Calendar scopes does OpenClaw need?
Three scopes cover most scheduling agent workflows. Use calendar.readonly for reading calendars, calendar.events.readonly for reading event details, and calendar.events for creating and modifying events. Start with read-only scopes and add write access only when you need event creation. This minimizes the permissions your agent holds.
How do I set up a morning briefing with OpenClaw?
Add a calendar check task to your HEARTBEAT.md file. The heartbeat triggers every 30 minutes by default and evaluates whether any task needs attention. For a morning-specific briefing, you can also set a cron trigger at your preferred wake-up time. The agent queries today's events, filters for what matters (first meeting, long gaps, off-site locations), and delivers a summary via Telegram, WhatsApp, or another messaging channel.
Does OpenClaw support push notifications from Google Calendar?
Google Calendar's Events watch endpoint supports push notifications to an HTTPS callback URL with a 7-day default TTL. This gives you near-real-time updates when events change on the calendar. For simpler setups that don't need instant updates, the 30-minute heartbeat polling pattern works well and doesn't require a publicly accessible HTTPS endpoint.
Related Resources
Keep your scheduling agent's state between sessions
Fastio gives your OpenClaw agent 50GB of free persistent storage with MCP access, no credit card required. Write calendar summaries, meeting prep docs, and availability reports to a shared workspace your team can see.