Overview

Enable your agents to manage calendar events, schedules, and availability through Google Calendar. Create and update events, manage attendees, check availability, and streamline your scheduling workflows with AI-powered automation.

Prerequisites

Before using the Google Calendar integration, ensure you have:

Setting Up Google Calendar Integration

1. Connect Your Google Account

  1. Navigate to CrewAI Enterprise Integrations
  2. Find Google Calendar in the Authentication Integrations section
  3. Click Connect and complete the OAuth flow
  4. Grant the necessary permissions for calendar and contact access
  5. Copy your Enterprise Token from Account Settings

2. Install Required Package

uv add crewai-tools

Available Actions

Usage Examples

Basic Calendar Agent Setup

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

# Get enterprise tools (Google Calendar tools will be included)
enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

# Create an agent with Google Calendar capabilities
calendar_agent = Agent(
    role="Schedule Manager",
    goal="Manage calendar events and scheduling efficiently",
    backstory="An AI assistant specialized in calendar management and scheduling coordination.",
    tools=[enterprise_tools]
)

# Task to create a meeting
create_meeting_task = Task(
    description="Create a team standup meeting for tomorrow at 9 AM with the development team",
    agent=calendar_agent,
    expected_output="Meeting created successfully with Google Meet link"
)

# Run the task
crew = Crew(
    agents=[calendar_agent],
    tasks=[create_meeting_task]
)

crew.kickoff()

Filtering Specific Calendar Tools

from crewai_tools import CrewaiEnterpriseTools

# Get only specific Google Calendar tools
enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token",
    actions_list=["google_calendar_create_event", "google_calendar_list_events", "google_calendar_get_availability"]
)

meeting_coordinator = Agent(
    role="Meeting Coordinator",
    goal="Coordinate meetings and check availability",
    backstory="An AI assistant that focuses on meeting scheduling and availability management.",
    tools=enterprise_tools
)

# Task to schedule a meeting with availability check
schedule_meeting = Task(
    description="Check availability for next week and schedule a project review meeting with stakeholders",
    agent=meeting_coordinator,
    expected_output="Meeting scheduled after checking availability of all participants"
)

crew = Crew(
    agents=[meeting_coordinator],
    tasks=[schedule_meeting]
)

crew.kickoff()

Event Management and Updates

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

event_manager = Agent(
    role="Event Manager",
    goal="Manage and update calendar events efficiently",
    backstory="An experienced event manager who handles event logistics and updates.",
    tools=[enterprise_tools]
)

# Task to manage event updates
event_management = Task(
    description="""
    1. List all events for this week
    2. Update any events that need location changes to include video conference links
    3. Send calendar invitations to new team members for recurring meetings
    """,
    agent=event_manager,
    expected_output="Weekly events updated with proper locations and new attendees added"
)

crew = Crew(
    agents=[event_manager],
    tasks=[event_management]
)

crew.kickoff()

Contact and Availability Management

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

availability_coordinator = Agent(
    role="Availability Coordinator",
    goal="Coordinate availability and manage contacts for scheduling",
    backstory="An AI assistant that specializes in availability management and contact coordination.",
    tools=[enterprise_tools]
)

# Task to coordinate availability
availability_task = Task(
    description="""
    1. Search for contacts in the engineering department
    2. Check availability for all engineers next Friday afternoon
    3. Create a team meeting for the first available 2-hour slot
    4. Include Google Meet link and send invitations
    """,
    agent=availability_coordinator,
    expected_output="Team meeting scheduled based on availability with all engineers invited"
)

crew = Crew(
    agents=[availability_coordinator],
    tasks=[availability_task]
)

crew.kickoff()

Automated Scheduling Workflows

from crewai import Agent, Task, Crew
from crewai_tools import CrewaiEnterpriseTools

enterprise_tools = CrewaiEnterpriseTools(
    enterprise_token="your_enterprise_token"
)

scheduling_automator = Agent(
    role="Scheduling Automator",
    goal="Automate scheduling workflows and calendar management",
    backstory="An AI assistant that automates complex scheduling scenarios and calendar workflows.",
    tools=[enterprise_tools]
)

# Complex scheduling automation task
automation_task = Task(
    description="""
    1. List all upcoming events for the next two weeks
    2. Identify any scheduling conflicts or back-to-back meetings
    3. Suggest optimal meeting times by checking availability
    4. Create buffer time between meetings where needed
    5. Update event descriptions with agenda items and meeting links
    """,
    agent=scheduling_automator,
    expected_output="Calendar optimized with resolved conflicts, buffer times, and updated meeting details"
)

crew = Crew(
    agents=[scheduling_automator],
    tasks=[automation_task]
)

crew.kickoff()

Troubleshooting

Common Issues

Authentication Errors

  • Ensure your Google account has the necessary permissions for calendar access
  • Verify that the OAuth connection includes all required scopes for Google Calendar API
  • Check if calendar sharing settings allow the required access level

Event Creation Issues

  • Verify that time formats are correct (ISO8601 or Unix timestamps)
  • Ensure attendee email addresses are properly formatted
  • Check that the target calendar exists and is accessible
  • Verify time zones are correctly specified

Availability and Time Conflicts

  • Use proper ISO format for time ranges when checking availability
  • Ensure time zones are consistent across all operations
  • Verify that calendar IDs are correct when checking multiple calendars

Contact and People Search

  • Ensure search queries are properly formatted
  • Check that directory access permissions are granted
  • Verify that contact information is up to date and accessible

Event Updates and Deletions

  • Verify that event IDs are correct and events exist
  • Ensure you have edit permissions for the events
  • Check that calendar ownership allows modifications

Getting Help

Need Help?

Contact our support team for assistance with Google Calendar integration setup or troubleshooting.