To integrate Google Calendar with OpenClaw via Maton API, store your GOOGLE_SERVICE_ACCOUNT_KEY in OpenClaw's config and configure the Maton middleware layer to manage calendar events on your behalf. OpenClaw can create, update, and query Google Calendar events through Maton's automation API without requiring OAuth flows. This is a Direct API Integration for Intermediate users.
Why Use Google Calendar via Maton API in OpenClaw?
Standard Google Calendar API integration requires OAuth — a flow designed for user-facing applications where a human clicks 'Allow' and receives tokens that expire and need refresh. For automation workflows where OpenClaw operates as a background service, this model is cumbersome. Maton's API layer solves this by accepting Google Service Account credentials instead, translating simple REST calls into properly authenticated Google API requests without any OAuth flow.
The result is a calendar integration that works reliably in server-side and headless contexts. OpenClaw can create events, update availability, check for scheduling conflicts, and query upcoming meetings using consistent service account authentication — no token refresh logic, no expired session errors, no user-facing login screens. This makes it significantly more robust for automated workflows than trying to manage OAuth tokens manually.
The trade-off is that service accounts require explicit calendar sharing to access a specific calendar's events. You must share each Google Calendar you want OpenClaw to manage with the service account's email address. This is a one-time setup step per calendar, and it gives you precise control over which calendars the integration can access — a security advantage over broader OAuth grants.
Integration method
This integration connects OpenClaw to Google Calendar through Maton's automation API layer, which handles Google's OAuth complexity using service account credentials. Rather than managing user OAuth tokens and refresh cycles, you provide a Google Service Account key file and OpenClaw communicates with Google Calendar through Maton's simplified REST interface. This makes it suitable for server-side calendar automation where no human OAuth flow is practical.
Prerequisites
- OpenClaw installed and running (version 1.0 or later)
- A Google Workspace or personal Google account with access to Google Cloud Console
- A Google Cloud project (free to create at console.cloud.google.com) with the Google Calendar API enabled
- A Google Service Account created in that project with a downloaded JSON key file
- The Google Calendar you want to manage shared with the service account's email address
Step-by-step guide
Create a Google Service Account and Enable the Calendar API
Create a Google Service Account and Enable the Calendar API
Go to console.cloud.google.com and sign in with your Google account. If you do not have a Google Cloud project, click 'Create Project' — name it 'OpenClaw Integrations' or similar. The project is free to create and you will use it only for API access. Once in your project, navigate to APIs & Services > Library. Search for 'Google Calendar API' and click Enable. This authorizes the project to make Calendar API requests. Next, go to APIs & Services > Credentials. Click 'Create Credentials' > 'Service Account'. Fill in a service account name like 'openclaw-calendar-bot'. Click 'Create and Continue'. For the role, select 'Project > Editor' or leave it blank — the relevant permissions come from calendar sharing, not project roles. Click 'Done'. You now have a service account with an email like `openclaw-calendar-bot@your-project-id.iam.gserviceaccount.com`. Note this email — you will use it in Step 3. Click on the service account, go to the 'Keys' tab, click 'Add Key' > 'Create new key' > JSON. Download the JSON file. This is your GOOGLE_SERVICE_ACCOUNT_KEY.
1# The downloaded JSON key file has this structure:2{3 "type": "service_account",4 "project_id": "your-project-id",5 "private_key_id": "key-id-here",6 "private_key": "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----\n",7 "client_email": "openclaw-calendar-bot@your-project-id.iam.gserviceaccount.com",8 "client_id": "...",9 "auth_uri": "https://accounts.google.com/o/oauth2/auth",10 "token_uri": "https://oauth2.googleapis.com/token"11}1213# Store this file at a secure path, e.g.:14# ~/.openclaw/credentials/google-service-account.jsonPro tip: Create a dedicated directory `~/.openclaw/credentials/` with permissions set to 700 (owner read/write only) before storing the service account JSON there. This prevents other users or processes on the system from reading your credentials.
Expected result: You have downloaded a JSON key file for the service account and noted the service account email address ending in `.iam.gserviceaccount.com`.
Share Your Google Calendar with the Service Account
Share Your Google Calendar with the Service Account
Google Calendar does not grant service accounts access to calendars automatically — you must explicitly share each calendar you want the integration to manage. This is a security feature: the service account can only see and modify calendars you deliberately share with it. Open Google Calendar at calendar.google.com. In the left sidebar, hover over the calendar you want OpenClaw to manage and click the three-dot menu. Select 'Settings and sharing'. Scroll to the 'Share with specific people or groups' section. Click 'Add people and groups'. Enter the service account email address from Step 1 (it ends in `.iam.gserviceaccount.com`). Set the permission level: 'Make changes to events' gives full read/write access to events on that calendar. Click 'Send'. The service account does not receive the calendar sharing invitation the way a human does — the sharing takes effect immediately. You can also find the Calendar ID in this settings page under 'Integrate calendar'. The Calendar ID typically looks like `calendar-name@group.calendar.google.com` or your Gmail address for the primary calendar.
1# Note your Calendar ID from the calendar settings page2# It appears under 'Integrate calendar' > 'Calendar ID'3# Examples:4# Primary calendar: your-email@gmail.com5# Team calendar: abc123xyz@group.calendar.google.com67# Test that the service account can see the calendar via Maton:8curl -X POST https://api.maton.app/v1/google-calendar/events/list \9 -H "Content-Type: application/json" \10 -d '{11 "service_account_key": "PATH_OR_CONTENT_OF_YOUR_JSON_KEY",12 "calendar_id": "YOUR_CALENDAR_ID",13 "time_min": "2026-03-30T00:00:00Z",14 "time_max": "2026-04-06T00:00:00Z"15 }'Pro tip: You can share multiple calendars with the same service account — a primary personal calendar and a shared team calendar, for example. Each shared calendar gets its own Calendar ID, and you reference the specific ID in each API call.
Expected result: The service account email appears in the calendar sharing settings with 'Make changes to events' permissions. The Maton test call returns a list of events.
Configure GOOGLE_SERVICE_ACCOUNT_KEY in OpenClaw
Configure GOOGLE_SERVICE_ACCOUNT_KEY in OpenClaw
Open `~/.openclaw/config.yaml` and add the Google Calendar integration block. The service account key can be provided either as a file path to the downloaded JSON file or as the full JSON content inline in the config. Using a file path is recommended for security — it keeps the private key out of the main config file, which may be more broadly readable. The file path approach references the JSON file you saved in Step 1. The `calendar_id` field specifies the default Google Calendar for operations. You can override this per-workflow in the actions block if you manage multiple calendars. The `timezone` field ensures events are created in your local timezone rather than UTC by default. After saving the config and running `openclaw reload`, the integration will verify that the service account credentials are valid and can authenticate with Google's API through the Maton layer.
1# ~/.openclaw/config.yaml2integrations:3 google-calendar-maton:4 service_account_key_path: "~/.openclaw/credentials/google-service-account.json"5 # OR provide the JSON inline (less recommended):6 # service_account_key: |7 # { "type": "service_account", "project_id": "...", ... }8 calendar_id: "your-email@gmail.com" # Default calendar to use9 maton_endpoint: "https://api.maton.app/v1/google-calendar"10 timezone: "America/New_York" # Your local timezone11 default_event_duration_minutes: 60 # Default event length when not specifiedPro tip: Use `~/.openclaw/credentials/` as your credentials directory and ensure the directory permissions are set to 700 (chmod 700 ~/.openclaw/credentials). This ensures only your user account can read the service account key file.
Expected result: Config saves without errors. `openclaw reload` confirms successful authentication with Google Calendar via the Maton API layer.
Create and Query Calendar Events
Create and Query Calendar Events
With authentication working, test the core calendar operations: listing upcoming events, creating a new event, and deleting an event. These form the building blocks for all calendar automation workflows. The Maton API layer accepts simplified JSON payloads compared to the raw Google Calendar API — you do not need to manage etags, sequence numbers, or the full event resource schema that Google's direct API requires. Maton handles those details, accepting straightforward create/read/update/delete requests. Test creating a calendar event first — this confirms write permissions are working. Then query events to verify the event appears. Finally, test deletion to confirm the full CRUD cycle is functional before building workflows on top of it.
1# Create a calendar event via Maton2curl -X POST https://api.maton.app/v1/google-calendar/events/create \3 -H "Content-Type: application/json" \4 -d '{5 "service_account_key_path": "~/.openclaw/credentials/google-service-account.json",6 "calendar_id": "your-email@gmail.com",7 "summary": "OpenClaw Test Event",8 "description": "Testing OpenClaw Google Calendar integration via Maton",9 "start": "2026-04-01T10:00:00",10 "end": "2026-04-01T11:00:00",11 "timezone": "America/New_York"12 }'1314# List events in a date range15curl -X POST https://api.maton.app/v1/google-calendar/events/list \16 -H "Content-Type: application/json" \17 -d '{18 "service_account_key_path": "~/.openclaw/credentials/google-service-account.json",19 "calendar_id": "your-email@gmail.com",20 "time_min": "2026-04-01T00:00:00Z",21 "time_max": "2026-04-07T00:00:00Z"22 }'2324# Delete an event by ID25curl -X POST https://api.maton.app/v1/google-calendar/events/delete \26 -H "Content-Type: application/json" \27 -d '{28 "service_account_key_path": "~/.openclaw/credentials/google-service-account.json",29 "calendar_id": "your-email@gmail.com",30 "event_id": "EVENT_ID_FROM_LIST_RESPONSE"31 }'Pro tip: When creating events that span midnight or involve complex recurrence rules, test with a simple one-time event first. Add recurrence and attendees in subsequent iterations once the basic create/list/delete cycle is confirmed working.
Expected result: The test event appears in Google Calendar. The list endpoint returns it, and deletion removes it from the calendar. All three operations confirm full read/write access.
Build Calendar Automation Workflows in OpenClaw
Build Calendar Automation Workflows in OpenClaw
With the integration verified, configure OpenClaw workflows that use Google Calendar as a trigger source or action target. The most common patterns are: creating events in response to external triggers, querying the calendar to check availability before scheduling, and updating events in batch operations. The workflow config uses the `google-calendar-maton` integration key to reference this integration. You can chain it with other integrations — for example, trigger on a Calendly booking (from the Calendly integration), then create a corresponding preparation block in Google Calendar, then post a notification to a Slack channel. For availability checking workflows, the `query-events` action type returns a list of events in a time window. Your workflow conditions can then evaluate whether the result is empty (slot is free) or non-empty (slot is busy) before proceeding.
1# ~/.openclaw/config.yaml — calendar automation workflow2workflows:3 create-prep-block:4 trigger:5 type: manual # Or chain from another integration trigger6 actions:7 - type: integration-call8 integration: google-calendar-maton9 action: create-event10 params:11 summary: "Meeting Prep"12 description: "Auto-created prep block"13 start: "{{date.today}}T09:00:00"14 end: "{{date.today}}T09:30:00"15 timezone: "America/New_York"1617 check-availability:18 trigger:19 type: manual20 actions:21 - type: integration-call22 integration: google-calendar-maton23 action: list-events24 params:25 time_min: "{{input.start_time}}"26 time_max: "{{input.end_time}}"27 - type: condition28 if: "{{result.count == 0}}"29 then:30 - type: log31 message: "Slot is available"32 else:33 - type: log34 message: "Slot is busy: {{result.events | map('summary') | join(', ')}}"Pro tip: For workflows that create events on behalf of team members, ensure the team calendar (not individual calendars) is the target — service accounts can only write to calendars explicitly shared with them, so your own primary calendar will reject writes from a service account unless you shared it in Step 2.
Expected result: OpenClaw executes calendar create and query actions as part of workflow automations, creating events in Google Calendar and checking availability programmatically.
Common use cases
Automated Event Creation from External Triggers
When an external event occurs — a new form submission, a completed purchase, a Calendly booking — OpenClaw creates a corresponding Google Calendar event automatically. Using the service account, OpenClaw writes to a shared team calendar without any human involvement in the scheduling process.
Configure OpenClaw to create a Google Calendar event titled 'Client Onboarding: [name]' in the team calendar whenever a new client is added, scheduled for 3 business days from today at 10 AM
Copy this prompt to try it in OpenClaw
Calendar Availability Checker
Before scheduling an automated meeting or blocking time, OpenClaw queries the Google Calendar via Maton to check for existing events in a time window. This prevents double-booking and ensures that automated scheduling respects the calendar's current state.
Query the team Google Calendar via Maton to check if there are any events scheduled between 9 AM and 5 PM on April 5, 2026, and return a list of available 1-hour slots
Copy this prompt to try it in OpenClaw
Recurring Event Management and Updates
Manage recurring calendar events programmatically — update the description, add conferencing links, or change the location for a series of recurring events without touching the Google Calendar UI. OpenClaw handles the batch update through Maton's API layer.
Update all instances of the recurring 'Weekly Team Sync' event in Google Calendar to add the Zoom link https://zoom.us/j/example in the event description field
Copy this prompt to try it in OpenClaw
Troubleshooting
API returns 403 'forbidden' when trying to list or create events
Cause: The service account does not have permission to access the target calendar. Either the calendar was not shared with the service account email, or it was shared with 'View only' permissions rather than 'Make changes to events'.
Solution: In Google Calendar settings for the target calendar, verify the service account email appears under 'Share with specific people' with 'Make changes to events' permission. The service account email ends in `.iam.gserviceaccount.com`. Re-share with the correct permission level if needed.
1# Confirm the service account email that needs calendar access:2cat ~/.openclaw/credentials/google-service-account.json | grep client_email3# Share that exact email in Google Calendar > Settings > Share with specific peopleOpenClaw reports 'invalid credentials' or 'failed to authenticate' on startup
Cause: The service account JSON key file path in the config is wrong, the file was moved or deleted, or the JSON content is malformed from being copied incorrectly.
Solution: Verify the file exists at the path specified in `service_account_key_path`. Check the JSON is valid by running it through a JSON validator. If the key was accidentally deleted, generate a new key from Google Cloud Console > IAM & Admin > Service Accounts > Keys > Add Key.
1# Check the file exists and is valid JSON:2ls -la ~/.openclaw/credentials/google-service-account.json3python3 -m json.tool ~/.openclaw/credentials/google-service-account.json > /dev/null && echo 'valid JSON' || echo 'invalid JSON'Events are created in the wrong timezone (off by several hours)
Cause: The timezone in the event creation request does not match your local timezone, causing Google Calendar to display the event at an unexpected time.
Solution: Ensure the `timezone` field in both your OpenClaw config and individual event creation calls uses a valid IANA timezone string (e.g., `America/New_York`, `Europe/London`, `Asia/Tokyo`). Do not use abbreviations like `EST` or `UTC+5` — Google Calendar requires full IANA strings.
1# Valid IANA timezone examples:2# America/New_York, America/Los_Angeles, America/Chicago3# Europe/London, Europe/Berlin, Europe/Paris4# Asia/Tokyo, Asia/Singapore, Australia/Sydney56# In config.yaml:7integrations:8 google-calendar-maton:9 timezone: "America/New_York" # Full IANA string, not 'EST'clawhub registry or Maton API returns 429 rate limit errors
Cause: The Google Calendar API has a quota of 1 million requests per day and 500 requests per 100 seconds per user. If automation workflows are creating many events rapidly, the rate limit can be exceeded.
Solution: Add delays between bulk event creation operations. For batch workflows that create many events, spread them over time using the `rate_limit` setting in your workflow config. For monitoring-only workflows, increase `poll_interval` to reduce read request frequency.
1# In ~/.openclaw/config.yaml workflow block:2workflows:3 bulk-calendar-sync:4 actions:5 - type: integration-call6 rate_limit: 10 # Max 10 API calls per second7 integration: google-calendar-matonBest practices
- Store the service account JSON key file in a dedicated `~/.openclaw/credentials/` directory with 700 permissions — this prevents other processes from reading your private key while keeping it accessible to OpenClaw.
- Share only the specific calendars OpenClaw needs to manage with the service account, not your entire Google Workspace — the principle of least privilege reduces risk if the service account credentials are ever compromised.
- Use the `calendar_id` field consistently in all workflow configs to prevent accidental writes to the wrong calendar — explicitly naming the target calendar in each action is safer than relying on the default.
- Always specify a timezone explicitly when creating events — omitting it can result in events appearing at unexpected times, especially for workflows that run on servers in different geographic regions.
- Test event creation with a dedicated test calendar before modifying your primary or team calendars — share the test calendar with the service account, verify all operations, then share your real calendar once you are confident the integration works correctly.
- Rotate service account keys annually as a security practice — generate a new key in Google Cloud Console, update your OpenClaw config, verify the integration still works, then delete the old key.
- For workflows that need to avoid double-booking, always query existing events in the target time window before creating a new event — the availability check pattern prevents automated conflicts in shared calendars.
Alternatives
Calendly handles the booking workflow (letting external people schedule time with you) while Google Calendar via Maton manages the calendar itself — they serve different parts of the scheduling lifecycle and work well together.
Outlook via Microsoft Graph is the equivalent integration for Microsoft 365 organizations — choose it if your team uses Outlook Calendar rather than Google Calendar.
Fathom focuses on post-meeting intelligence (transcripts and summaries) rather than calendar management — use it alongside Google Calendar integration for end-to-end meeting automation.
Frequently asked questions
How do I configure Google Calendar in OpenClaw using the Maton API?
Create a Google Service Account in Google Cloud Console with the Calendar API enabled, download the JSON key file, and share your target Google Calendar with the service account's email address. Then add the `google-calendar-maton` block to `~/.openclaw/config.yaml` pointing to the key file path and your calendar ID. Reload OpenClaw to activate.
What is the GOOGLE_SERVICE_ACCOUNT_KEY and why is it needed?
A Google Service Account is a non-human Google identity used for server-to-server authentication. The service account key is a JSON file containing private key credentials that allow OpenClaw to authenticate with Google's API without a human login flow. It bypasses the OAuth browser redirect that the standard Calendar API requires, making it suitable for automated background workflows.
Why do I need to share my Google Calendar with the service account?
Google Calendar does not grant service accounts automatic access to any calendar — this is by design for security. You must explicitly share each calendar you want OpenClaw to manage by adding the service account email to the calendar's sharing settings. The service account email ends in `.iam.gserviceaccount.com` and appears when you create the service account in Google Cloud Console.
What does Maton do in this integration — do I need a Maton account?
Maton is a middleware layer that simplifies Google Calendar API calls by abstracting away authentication complexity and providing a simpler REST interface. Check the Maton API documentation at their website for account and pricing details specific to their service. Maton handles the token generation from your service account credentials and forwards properly authenticated requests to Google's API.
How is Google Calendar via Maton different from Google Calendar OAuth?
Standard Google Calendar OAuth requires a human to click 'Allow' in a browser and generates tokens that expire every hour and need refresh logic. Service account authentication via Maton uses a private key that never expires (until you revoke it) and requires no browser interaction — making it far more reliable for background automation. The trade-off is that you must explicitly share each calendar with the service account.
Can OpenClaw create events in other people's Google Calendars?
Only if those people explicitly share their calendar with your service account email. OpenClaw cannot access or modify calendars that have not been shared with the service account, regardless of your own Google account's permissions. For team shared calendars, the team calendar admin must add the service account email to the calendar's sharing settings.
How do I get help setting up the Google Calendar Maton integration?
RapidDev's team can help configure Google Calendar automation workflows in OpenClaw, including service account setup, calendar sharing, and multi-calendar workflow design. The initial setup involves several steps across Google Cloud Console and calendar settings, and expert guidance can save significant troubleshooting time on first setup.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation