Content

How to Connect Google Calendar to Claude

Claude can read your day without emailing anyone, but creating or moving a meeting with guests sends a notification you cannot recall. How to connect Google Calendar so reads stay free and anything that notifies a guest waits for a human.

IntegrationsOct 16, 2026

Key takeaways

  • -Listing or reading calendar events notifies nobody; creating or moving an event that includes other people sends a notification that cannot be unsent.
  • -Swytchcode only lets create and move run once you've explicitly added them with swy add method, so Claude can report on your day without any risk of emailing a guest.
  • -The Google login is stored outside the chat with swy auth connect google_calendar, with no project env file holding it.
  • -A policy can hold any event that has attendees for a human to approve before it's created, rather than trusting the agent to recognise a guest list.
  • -Swytchcode only auto-retries a create or update when it already carries an idempotency key; without one, a confused agent should look the calendar up rather than creating the event again.

You want Claude to tell you what is on your calendar today, find a clash, or notice a meeting with no agenda. That is a kind assistant, and it does not need to email anyone to do those jobs.

Creating a meeting is different, and moving one is different again. If other people are invited, they get a notification. If you move the meeting, they get another one. You cannot reach into their inbox and take the first email back. A confused retry can book the same meeting twice, or tell everyone it moved when it did not.

A create and a move both look like "schedule this" from inside a chat, even though one of them emails people in a way that can't be undone and the other emails them again. Swytchcode keeps those switched off by default and makes the agent's exact set of allowed actions explicit, so nothing gets created, moved, or sent to a guest until you decide it should be.

The problem: a create or a move is a write, plus a notification you can't recall

A list of today's events changes nothing, and nobody is emailed. An event with no guests is still a write on your calendar. An event with guests is a write plus a notification, so the moment an agent adds a person to an event, that is the moment mail goes out. Moving a meeting is a second notification on top of that.

The riskier version of this is an agent that isn't sure its last action worked. If it isn't sure a create succeeded, the wrong move is to create the event again "to be safe": a second create is a second meeting, not a retried one, and a move told everyone the time changed whether or not that was true.

How Swytchcode solves it

Swytchcode is a production runtime for AI agents: Claude decides which calendar action to call, and Swytchcode runs it. Only an action you added with swy add method can run, so "create an event" and "move an event" simply aren't available to the agent until you turn them on, no matter what a prompt asks for. Inputs are checked against that action's schema before the request is ever sent.

The Google login is added when an allowed call actually runs. It is stored with swy auth connect, not put in the chat, and there is no project env file for it, so there's nothing for the model to read even if an instruction asks for it.

Setting up Google Calendar with Swytchcode

setup.sh
npm install -g swytchcode   # or: irm https://cli.swytchcode.com/install.ps1 | iex  (Windows)
                            # or: curl -fsSL https://cli.swytchcode.com/install.sh | sh (macOS/Linux)
swy login
swy init --editor=claude --mode=sandbox   # saved for the project; Claude cannot switch it later

swy get google_calendar                   # the manifest name has an underscore

swy discover "list events on my calendar" --project google_calendar
swy info <id from discover>
swy add method <id from discover>          # leave create/move off for now

swy auth connect google_calendar           # the login stays on your machine

Use the method name discover prints rather than one copied from an old note, including this article, since Swytchcode's catalog changes. Test or live mode is chosen once with swy init and stored in .swytchcode/tooling.json; it does not by itself decide whose calendar you connected, so connect a calendar you can stand to clutter, not the company-wide one, until a read looks right.

Policies: build agents you can trust with event changes and guest notifications

When you're ready to let an agent create or move events at all, back that with a rule rather than trust, for example holding any event that has attendees for a human to approve before it's created:

policies.json
{
  "id": "events-with-guests-need-a-human",
  "target": ["<google_calendar create-event canonical_id>"],
  "when": { "field": "attendees", "operator": "!=", "value": [] },
  "action": {
    "type": "REQUIRES_APPROVAL",
    "message": "Agent wants to create an event with guests"
  },
  "approval_timeout": "30m"
}

That leaves events on your own calendar with no guests to flow freely while anything that would notify another person stops and asks. On the retry question specifically: Swytchcode retries a create or an update only when that call already has an idempotency key, a note that says this is the same event. If you don't know that Google stored that note for a particular action, don't retry; look the calendar up instead. The call and the policy decision are both written to a local log, so you can see afterward what ran and what was held.

Google Calendar's API will happily read your schedule for free, but creating or moving an event with guests sends a notification you cannot unsend, and a confused retry can double the problem. Swytchcode's fix is to default an agent to reads, require an explicit add before it can create or move anything, and hold any call that would notify a guest for a human, so the agent can tell you what's on your day without ever being the one who tells everyone else it changed.

FAQ

How do I connect Google Calendar to Claude?

Install the CLI, run swy init --editor=claude --mode=sandbox, download the integration with swy get google_calendar, find and allow a read action first, then store the Google login with swy auth connect google_calendar. Ask for today's events before you let it create a meeting, and don't paste a Google token into the chat.

Will reading my calendar email the guests?

No. Creating or changing an event that includes other people can notify them. A move notifies them again. Those notes cannot be unsent.

Is it google-calendar or google_calendar in commands?

google_calendar, with an underscore, is the manifest name used in swy commands. The directory address for the integration page uses a hyphen instead.

The assistant created the meeting twice. What now?

Do not create a third one to cancel the extras by hand from the chat until you have looked at the calendar. Two creates are two events. Delete or decline the extra one on purpose, as its own action, after you can see both.

Can I build an AI agent on top of Google Calendar with Swytchcode?

Yes. Start with a read, such as listing today's events, and add create or move only once you trust the agent with the notifications that come attached to them. Claude, Cursor, and Codex can all use the same catalog and allowlist.

Can Swytchcode stop an agent from inviting guests or moving a meeting, even if it's asked to?

Yes. If create or move was never added to the allowlist, the call fails before it reaches Google, regardless of the instruction. And where you have allowed it, the approval policy above stops any event with guests from being created until a human signs off within the timeout.

If an agent retries a Google Calendar call after a timeout, will it duplicate the meeting or notify guests twice?

It can, if the agent guesses instead of checking. Swytchcode only auto-retries a create or update when that call already carries an idempotency key marking it as the same event; without one, don't retry, look the calendar up first. An agent that creates a second event "to be safe" has made two meetings and possibly sent two sets of invitations, not retried one.

More content