Google calendar Cancel Appointment (MCP Tool) avatar
Google calendar Cancel Appointment (MCP Tool)

Pricing

Pay per event

Go to Apify Store
Google calendar Cancel Appointment (MCP Tool)

Google calendar Cancel Appointment (MCP Tool)

Developed by

Nova Integrations

Nova Integrations

Maintained by Community

Pairs with the Apify "Actors MCP server" to give your AI Agent access to "cancel event" on Google Calendar. The user provides the booking email, and the appointment gets automatically cancelled. Use with "sambehnke/google-calendar-create-event" to SUPERCHARGE your agent!

0.0 (0)

Pricing

Pay per event

0

1

1

Last modified

11 hours ago

๐Ÿ—‘๏ธ Google Calendar Cancel Event Actor

A powerful Apify Actor that cancels Google Calendar events with user-friendly credential management. Perfect for voice agents, AI assistants, and MCP (Model Context Protocol) integration.

๐ŸŒŸ Features

  • ๐Ÿ” Secure Credential Storage: Save Google OAuth credentials once, use across multiple actors
  • ๐Ÿ” Smart Event Search: Find events by customer info, date range, or specific event ID
  • ๐Ÿšซ Silent Cancellation: Cancel events without sending notifications to attendees
  • ๐Ÿ”„ Auto Token Refresh: Automatically handles expired access tokens
  • ๐Ÿค– AI Agent Ready: Designed for seamless integration with voice agents and MCP servers
  • โš™๏ธ Flexible Confirmation: Choose to cancel first match, all matches, or get interactive confirmation

๐Ÿ“‹ Table of Contents

๐Ÿ“š Prerequisites

๐Ÿ”‘ Getting Google Calendar Credentials

Step 1: Set Up Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Calendar API:
    • Navigate to "APIs & Services" โ†’ "Library"
    • Search for "Google Calendar API"
    • Click "Enable"

Step 2: Create OAuth 2.0 Credentials

  1. Go to "APIs & Services" โ†’ "Credentials"
  2. Click "Create Credentials" โ†’ "OAuth 2.0 Client IDs"
  3. Configure OAuth consent screen (if prompted):
    • Choose "External" for testing
    • Fill in required fields (App name, User support email, etc.)
    • Add your email in "Test users" section
  4. Create OAuth Client:
    • Application type: "Web application"
    • Name: "Google Calendar Actor"
    • Authorized redirect URIs: https://developers.google.com/oauthplayground
  5. Save the Client ID and Client Secret

Step 3: Generate Access and Refresh Tokens

  1. Go to Google OAuth 2.0 Playground
  2. Click the gear icon (โš™๏ธ) in the top right
  3. Check "Use your own OAuth credentials"
  4. Enter your Client ID and Client Secret from Step 2
  5. In "Select & authorize APIs" section:
    • Find "Calendar API v3"
    • Select: https://www.googleapis.com/auth/calendar
    • Click "Authorize APIs"
  6. Complete the authorization:
    • Sign in with your Google account
    • Grant calendar permissions
  7. Exchange authorization code for tokens:
    • Click "Exchange authorization code for tokens"
    • Copy the access_token and refresh_token

๐ŸŽฏ You should now have all 4 credentials:

โœ… Client ID (ends with .googleusercontent.com)
โœ… Client Secret (starts with GOCSPX-)
โœ… Access Token (starts with ya29.)
โœ… Refresh Token (starts with 1//)

๐Ÿš€ Actor Setup

Step 1: Deploy the Actor

  1. Clone this repository
  2. Install Apify CLI: npm install -g apify-cli
  3. Login to Apify: apify login
  4. Deploy the actor: apify push

Step 2: Configure Credentials (One-Time Setup)

  1. Go to your Apify Console
  2. Find the "Google Calendar Cancel Event" actor
  3. Run with ALL credential fields filled:
{
"googleAccessToken": "ya29.your_access_token_here",
"googleRefreshToken": "1//your_refresh_token_here",
"googleClientId": "your_client_id.googleusercontent.com",
"googleClientSecret": "GOCSPX-your_client_secret_here",
"eventId": "test_event_id_optional"
}
  1. Verify you see: โœ… Credentials saved for future use
  2. Your credentials are now stored securely!

๐Ÿ’ก Usage Examples

{
"eventId": "abc123def456ghi789",
"calendarId": "primary"
}
{
"customerName": "John Doe",
"customerEmail": "john@example.com",
"serviceType": "Consultation",
"searchCriteria": {
"timeMin": "2025-08-20T00:00:00Z",
"timeMax": "2025-08-27T23:59:59Z",
"maxResults": 10
},
"confirmationMode": "first"
}

Cancel with Interactive Confirmation

{
"customerName": "Jane Smith",
"searchCriteria": {
"q": "Meeting with Jane Smith",
"timeMin": "2025-08-20T00:00:00Z",
"timeMax": "2025-08-30T23:59:59Z"
},
"confirmationMode": "interactive"
}

๐Ÿค– MCP Integration

Using with Apify MCP Server

  1. Install the Apify MCP Server:
$npm install @anthropic/mcp-server-apify
  1. Configure in your MCP client (e.g., Claude Desktop):
{
"mcpServers": {
"apify": {
"command": "npx",
"args": ["@anthropic/mcp-server-apify"],
"env": {
"APIFY_API_TOKEN": "your_apify_token"
}
}
}
}
  1. Call the actor via MCP:
{
"actor": "google-calendar-cancel-event-user-friendly",
"input": {
"customerName": "John Doe",
"searchCriteria": { ... }
}
}

Voice Agent Integration

Since credentials are stored once, your voice agent only needs to send:

{
"customerName": "Customer from call",
"customerPhone": "555-1234",
"searchCriteria": {
"timeMin": "2025-08-25T09:00:00Z",
"timeMax": "2025-08-25T17:00:00Z"
}
}

โš™๏ธ Configuration Options

Input Parameters

FieldTypeRequiredDescription
googleAccessTokenStringyes*OAuth access token (setup only)
googleRefreshTokenStringyes*OAuth refresh token (setup only)
googleClientIdStringyes*OAuth client ID (setup only)
googleClientSecretStringyes*OAuth client secret (setup only)
customerNameStringNoCustomer's name for search
customerPhoneStringNoCustomer's phone for search
customerEmailStringNoCustomer's email for search
serviceTypeStringNoService type for search
eventIdStringNoSpecific event ID to cancel
searchCriteriaObjectNoAdvanced search parameters
calendarIdStringNoCalendar ID (default: "primary")
confirmationModeStringNo"first", "all", or "interactive"

*Required only for initial credential setup

Search Criteria Object

{
"q": "search query text",
"timeMin": "2025-08-20T00:00:00Z",
"timeMax": "2025-08-27T23:59:59Z",
"maxResults": 10,
"singleEvents": true,
"orderBy": "startTime"
}

Confirmation Modes

  • first (default): Cancel the first matching event
  • all: Cancel all matching events
  • interactive: Return list of events for user confirmation

๐Ÿ› ๏ธ Troubleshooting

Common Issues

1. "No stored Google credentials found"

Solution: Run the actor once with all 4 Google credential fields filled.

2. "Token refresh failed: invalid_client"

Cause: Client ID/Secret don't match the refresh token. Solution:

  • If you regenerated Client Secret, get fresh tokens from OAuth Playground
  • Ensure all 4 credentials come from the same OAuth flow

3. "Access token may be expired"

Solution: The actor should auto-refresh, but if it fails:

  • Check that your refresh token is valid
  • Regenerate all credentials if needed

4. "No events found matching criteria"

Solutions:

  • Verify the date range includes the event
  • Check spelling of customer name/service type
  • Try broader search criteria
  • Use direct event ID if known

5. Events found but cancellation fails

Check:

  • You have "edit" permissions on the calendar
  • The event isn't already cancelled
  • The event exists in the specified calendar

Debug Mode

Add this to your input for detailed logging:

{
"debugMode": true,
...
}

Credential Validation

To test if your stored credentials work:

{
"eventId": "nonexistent_id_test",
"calendarId": "primary"
}

You should get "event not found" rather than authentication errors.

๐Ÿ”’ Security Notes

  • Credentials are encrypted in Apify's Key-Value storage
  • User isolation: Each Apify user has separate credential storage
  • No credential exposure: AI agents never see sensitive tokens
  • Automatic token refresh: Reduces need for manual credential updates
  • link-to-create-actor: Create new calendar events
  • link-to-reschedule-actor: Reschedule existing events

๐Ÿ†˜ Support

๐Ÿ“„ License

Apache-2.0 License - see LICENSE file for details.


Made with โค๏ธ for voice agents and AI automation