mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-27 00:58:13 +00:00
feat: update docs with new approach to consume Platform Actions (#3675)
This commit is contained in:
@@ -24,8 +24,8 @@ Before using the Google Calendar integration, ensure you have:
|
||||
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
|
||||
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](https://app.crewai.com/crewai_plus/settings/account)
|
||||
4. Grant the necessary permissions for calendar access
|
||||
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
|
||||
|
||||
### 2. Install Required Package
|
||||
|
||||
@@ -36,141 +36,121 @@ uv add crewai-tools
|
||||
## Available Actions
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="GOOGLE_CALENDAR_CREATE_EVENT">
|
||||
**Description:** Create an event in Google Calendar.
|
||||
<Accordion title="google_calendar/get_availability">
|
||||
**Description:** Get calendar availability (free/busy information).
|
||||
|
||||
**Parameters:**
|
||||
- `eventName` (string, required): Event name.
|
||||
- `startTime` (string, required): Start time - Accepts Unix timestamp or ISO8601 date formats.
|
||||
- `endTime` (string, optional): End time - Defaults to one hour after the start time if left blank.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `attendees` (string, optional): Attendees - Accepts an array of email addresses or email addresses separated by commas.
|
||||
- `eventLocation` (string, optional): Event location.
|
||||
- `eventDescription` (string, optional): Event description.
|
||||
- `eventId` (string, optional): Event ID - An ID from your application to associate this event with. You can use this ID to sync updates to this event later.
|
||||
- `includeMeetLink` (boolean, optional): Include Google Meet link? - Automatically creates Google Meet conference link for this event.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_UPDATE_EVENT">
|
||||
**Description:** Update an existing event in Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID - The ID of the event to update.
|
||||
- `eventName` (string, optional): Event name.
|
||||
- `startTime` (string, optional): Start time - Accepts Unix timestamp or ISO8601 date formats.
|
||||
- `endTime` (string, optional): End time - Defaults to one hour after the start time if left blank.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `attendees` (string, optional): Attendees - Accepts an array of email addresses or email addresses separated by commas.
|
||||
- `eventLocation` (string, optional): Event location.
|
||||
- `eventDescription` (string, optional): Event description.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_EVENTS">
|
||||
**Description:** List events from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
- `after` (string, optional): After - Filters events that start after the provided date (Unix in milliseconds or ISO timestamp). (example: "2025-04-12T10:00:00Z or 1712908800000").
|
||||
- `before` (string, optional): Before - Filters events that end before the provided date (Unix in milliseconds or ISO timestamp). (example: "2025-04-12T10:00:00Z or 1712908800000").
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_EVENT_BY_ID">
|
||||
**Description:** Get a specific event by ID from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_DELETE_EVENT">
|
||||
**Description:** Delete an event from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `eventId` (string, required): Event ID - The ID of the calendar event to be deleted.
|
||||
- `calendar` (string, optional): Calendar - Use Connect Portal Workflow Settings to allow users to select which calendar the event will be added to. Defaults to the user's primary calendar if left blank.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_CONTACTS">
|
||||
**Description:** Get contacts from Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_CONTACTS">
|
||||
**Description:** Search for contacts in Google Calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, optional): Search query to search contacts.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_DIRECTORY_PEOPLE">
|
||||
**Description:** List directory people.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_DIRECTORY_PEOPLE">
|
||||
**Description:** Search directory people.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, required): Search query to search contacts.
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_LIST_OTHER_CONTACTS">
|
||||
**Description:** List other contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `paginationParameters` (object, optional): Pagination Parameters.
|
||||
```json
|
||||
{
|
||||
"pageCursor": "page_cursor_string"
|
||||
}
|
||||
```
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_SEARCH_OTHER_CONTACTS">
|
||||
**Description:** Search other contacts.
|
||||
|
||||
**Parameters:**
|
||||
- `query` (string, optional): Search query to search contacts.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="GOOGLE_CALENDAR_GET_AVAILABILITY">
|
||||
**Description:** Get availability information for calendars.
|
||||
|
||||
**Parameters:**
|
||||
- `timeMin` (string, required): The start of the interval. In ISO format.
|
||||
- `timeMax` (string, required): The end of the interval. In ISO format.
|
||||
- `timeZone` (string, optional): Time zone used in the response. Optional. The default is UTC.
|
||||
- `items` (array, optional): List of calendars and/or groups to query. Defaults to the user default calendar.
|
||||
- `timeMin` (string, required): Start time (RFC3339 format)
|
||||
- `timeMax` (string, required): End time (RFC3339 format)
|
||||
- `items` (array, required): Calendar IDs to check
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "calendar_id_1"
|
||||
},
|
||||
{
|
||||
"id": "calendar_id_2"
|
||||
"id": "calendar_id"
|
||||
}
|
||||
]
|
||||
```
|
||||
- `timeZone` (string, optional): Time zone used in the response. The default is UTC.
|
||||
- `groupExpansionMax` (integer, optional): Maximal number of calendar identifiers to be provided for a single group. Maximum: 100
|
||||
- `calendarExpansionMax` (integer, optional): Maximal number of calendars for which FreeBusy information is to be provided. Maximum: 50
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/create_event">
|
||||
**Description:** Create a new event in the specified calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID (use 'primary' for main calendar)
|
||||
- `summary` (string, required): Event title/summary
|
||||
- `start_dateTime` (string, required): Start time in RFC3339 format (e.g., 2024-01-20T10:00:00-07:00)
|
||||
- `end_dateTime` (string, required): End time in RFC3339 format
|
||||
- `description` (string, optional): Event description
|
||||
- `timeZone` (string, optional): Time zone (e.g., America/Los_Angeles)
|
||||
- `location` (string, optional): Geographic location of the event as free-form text.
|
||||
- `attendees` (array, optional): List of attendees for the event.
|
||||
```json
|
||||
[
|
||||
{
|
||||
"email": "attendee@example.com",
|
||||
"displayName": "Attendee Name",
|
||||
"optional": false
|
||||
}
|
||||
]
|
||||
```
|
||||
- `reminders` (object, optional): Information about the event's reminders.
|
||||
```json
|
||||
{
|
||||
"useDefault": true,
|
||||
"overrides": [
|
||||
{
|
||||
"method": "email",
|
||||
"minutes": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
- `conferenceData` (object, optional): The conference-related information, such as details of a Google Meet conference.
|
||||
```json
|
||||
{
|
||||
"createRequest": {
|
||||
"requestId": "unique-request-id",
|
||||
"conferenceSolutionKey": {
|
||||
"type": "hangoutsMeet"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
- `visibility` (string, optional): Visibility of the event. Options: default, public, private, confidential. Default: default
|
||||
- `transparency` (string, optional): Whether the event blocks time on the calendar. Options: opaque, transparent. Default: opaque
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/view_events">
|
||||
**Description:** Retrieve events for the specified calendar.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID (use 'primary' for main calendar)
|
||||
- `timeMin` (string, optional): Lower bound for events (RFC3339)
|
||||
- `timeMax` (string, optional): Upper bound for events (RFC3339)
|
||||
- `maxResults` (integer, optional): Maximum number of events (default 10). Minimum: 1, Maximum: 2500
|
||||
- `orderBy` (string, optional): The order of the events returned in the result. Options: startTime, updated. Default: startTime
|
||||
- `singleEvents` (boolean, optional): Whether to expand recurring events into instances and only return single one-off events and instances of recurring events. Default: true
|
||||
- `showDeleted` (boolean, optional): Whether to include deleted events (with status equals cancelled) in the result. Default: false
|
||||
- `showHiddenInvitations` (boolean, optional): Whether to include hidden invitations in the result. Default: false
|
||||
- `q` (string, optional): Free text search terms to find events that match these terms in any field.
|
||||
- `pageToken` (string, optional): Token specifying which result page to return.
|
||||
- `timeZone` (string, optional): Time zone used in the response.
|
||||
- `updatedMin` (string, optional): Lower bound for an event's last modification time (RFC3339) to filter by.
|
||||
- `iCalUID` (string, optional): Specifies an event ID in the iCalendar format to be provided in the response.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/update_event">
|
||||
**Description:** Update an existing event.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID
|
||||
- `eventId` (string, required): Event ID to update
|
||||
- `summary` (string, optional): Updated event title
|
||||
- `description` (string, optional): Updated event description
|
||||
- `start_dateTime` (string, optional): Updated start time
|
||||
- `end_dateTime` (string, optional): Updated end time
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/delete_event">
|
||||
**Description:** Delete a specified event.
|
||||
|
||||
**Parameters:**
|
||||
- `calendarId` (string, required): Calendar ID
|
||||
- `eventId` (string, required): Event ID to delete
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="google_calendar/view_calendar_list">
|
||||
**Description:** Retrieve user's calendar list.
|
||||
|
||||
**Parameters:**
|
||||
- `maxResults` (integer, optional): Maximum number of entries returned on one result page. Minimum: 1
|
||||
- `pageToken` (string, optional): Token specifying which result page to return.
|
||||
- `showDeleted` (boolean, optional): Whether to include deleted calendar list entries in the result. Default: false
|
||||
- `showHidden` (boolean, optional): Whether to show hidden entries. Default: false
|
||||
- `minAccessRole` (string, optional): The minimum access role for the user in the returned entries. Options: freeBusyReader, owner, reader, writer
|
||||
</Accordion>
|
||||
</AccordionGroup>
|
||||
|
||||
@@ -180,19 +160,13 @@ uv add crewai-tools
|
||||
|
||||
```python
|
||||
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]
|
||||
apps=['google_calendar'] # All Google Calendar actions will be available
|
||||
)
|
||||
|
||||
# Task to create a meeting
|
||||
@@ -214,19 +188,11 @@ crew.kickoff()
|
||||
### Filtering Specific Calendar Tools
|
||||
|
||||
```python
|
||||
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
|
||||
apps=['google_calendar/create_event', 'google_calendar/get_availability']
|
||||
)
|
||||
|
||||
# Task to schedule a meeting with availability check
|
||||
@@ -248,17 +214,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
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]
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# Task to manage event updates
|
||||
@@ -266,10 +227,10 @@ 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
|
||||
3. Check availability for upcoming meetings
|
||||
""",
|
||||
agent=event_manager,
|
||||
expected_output="Weekly events updated with proper locations and new attendees added"
|
||||
expected_output="Weekly events updated with proper locations and availability checked"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
@@ -280,33 +241,28 @@ crew = Crew(
|
||||
crew.kickoff()
|
||||
```
|
||||
|
||||
### Contact and Availability Management
|
||||
### Availability and Calendar Management
|
||||
|
||||
```python
|
||||
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]
|
||||
goal="Coordinate availability and manage calendars for scheduling",
|
||||
backstory="An AI assistant that specializes in availability management and calendar coordination.",
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# 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
|
||||
1. Get the list of available calendars
|
||||
2. Check availability for all calendars 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"
|
||||
expected_output="Team meeting scheduled based on availability with all team members invited"
|
||||
)
|
||||
|
||||
crew = Crew(
|
||||
@@ -321,17 +277,12 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
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]
|
||||
apps=['google_calendar']
|
||||
)
|
||||
|
||||
# Complex scheduling automation task
|
||||
@@ -365,21 +316,16 @@ crew.kickoff()
|
||||
- Check if calendar sharing settings allow the required access level
|
||||
|
||||
**Event Creation Issues**
|
||||
- Verify that time formats are correct (ISO8601 or Unix timestamps)
|
||||
- Verify that time formats are correct (RFC3339 format)
|
||||
- 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
|
||||
- Use proper RFC3339 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
|
||||
|
||||
Reference in New Issue
Block a user