Tools & Integrations

Google Calendar

Let agents list, create, and delete Google Calendar events on a user's behalf

Overview

Connect your agents to Google Calendar so they can list, create, and delete events on a user's behalf.

This integration covers Calendar only. For email automation, use Outlook Calendar and Email.

This integration uses OAuth 2.0 for secure authentication. Users authorize access once, and MagOneAI handles token management and refresh automatically. All credentials are stored in HashiCorp Vault.

OAuth setup for Google Workspace

Before agents can access Google services, you need to configure OAuth and users need to authorize access.

Configure Google OAuth credentials

In the Admin Portal, navigate to Integrations → Google Workspace. Enter your Google OAuth client ID and client secret. These are created in the Google Cloud Console for your project. The platform stores them securely in HashiCorp Vault.

Users authorize access

When a user first uses a Google tool, they're redirected to Google's OAuth consent screen. They authorize MagOneAI to access their calendar on their behalf.

Platform manages token storage and refresh

After authorization, MagOneAI stores the access token and refresh token in Vault. The platform automatically refreshes tokens before they expire — users never see credential errors.

Agents can now access Google services

Once authorized, agents can call Google Calendar tools on behalf of the user. Credentials are injected at runtime when tools execute.

OAuth tokens are stored securely in HashiCorp Vault. The platform handles token refresh automatically — users authenticate once and agents have ongoing access.

Google Calendar tools

Give your agents access to calendar management capabilities. Agents can read availability, create meetings, and manage events.

List events

Retrieve calendar events for a specific date range.

Parameters:

  • calendar_id (optional) — defaults to user's primary calendar
  • start_time — ISO 8601 datetime for range start
  • end_time — ISO 8601 datetime for range end
  • max_results (optional) — maximum number of events to return

Returns: List of events with title, start time, end time, attendees, and location.

Example use case: "Show me all meetings this week so I can prepare for them."

Create event

Create a new calendar event with title, time, attendees, and optional details.

Parameters:

  • calendar_id (optional) — defaults to user's primary calendar
  • summary — event title
  • start_time — ISO 8601 datetime for event start
  • end_time — ISO 8601 datetime for event end
  • attendees (optional) — list of email addresses
  • description (optional) — event description
  • location (optional) — meeting location or video conference link

Returns: Created event details including event ID.

Example use case: "Schedule a 30-minute meeting with john@example.com tomorrow at 2pm to discuss the quarterly report."

Delete event

Remove a calendar event.

Parameters:

  • calendar_id (optional) — defaults to user's primary calendar
  • event_id — ID of the event to delete

Returns: Confirmation of deletion.

Example use case: "Cancel my meeting with the client tomorrow."

Usage in workflows

Google tools can be used in both Agent nodes (for intelligent, flexible execution) and Tool nodes (for deterministic execution).

Agent node example

System prompt:

You are a scheduling assistant. When asked to schedule meetings:
1. List existing events for the requested window to see what is already booked
2. Find a time slot that is free
3. Create the calendar event with the attendees and an agenda

Be proactive about suggesting alternative times if conflicts exist.

User message:

Schedule a 1-hour meeting with john@example.com and sarah@example.com
sometime next week to discuss Q1 planning.

The agent will:

  1. Use list_events to see what is already on the calendar next week
  2. Select a free time slot
  3. Use create_event to schedule the meeting, with both attendees invited

Google sends the invitation email itself when the event is created, so no email tool is involved.

Tool node example

For deterministic event creation, use a Tool node:

Tool: Create event Parameters:

  • summary: "Weekly Report Review - {{date}}"
  • start_time: {{slot_start}}
  • end_time: {{slot_end}}
  • attendees: ["john@example.com"]

The tool executes with exactly these parameters every time, using variable values from the workflow context.

Security and permissions

OAuth scopes

The Google Workspace integration requests these OAuth scopes:

  • https://www.googleapis.com/auth/calendar — full calendar access

Users see this permission when they authorize access.

Credential storage

All OAuth tokens are stored in HashiCorp Vault with:

  • Encryption at rest using AES-256
  • User-scoped access controls
  • Automatic key rotation
  • Audit logging for all access

Token refresh

Access tokens expire after 1 hour. MagOneAI automatically:

  1. Detects when a token is about to expire
  2. Uses the refresh token to obtain a new access token
  3. Updates the stored token in Vault
  4. Retries the failed tool call with the new token

Users never see "token expired" errors.

Troubleshooting

Next steps

MagOneAI© 2026 Magure, Inc.

On this page