Google Calendar is a product of Google Workspace that allows users to organize their schedules and events. It is a cloud-based calendar that allows users to create, edit, and delete events. It also allows users to share their calendars with others.
Overview
This notebook will help you get started with the Google Calendar Toolkit. This toolkit interacts with the Google Calendar API to perform various operations on the calendar. It allows you to:- Create events.
- Search events.
- Update events.
- Move events between different calendars.
- Delete events.
- List events.
Setup
To use this toolkit, you will need to:- Have a Google account with access to Google Calendar.
- Set up your credentials as explained in the Google Calendar API docs. Once you’ve downloaded the
credentials.json
file, you can start using the Google Calendar API.
Installation
This toolkit lives in thelangchain-google-community
package of the langchain-google repository. We’ll need the calendar
extra:
Instantiation
By default the toolkit reads the localcredentials.json
file. You can also manually provide a Credentials
object.
Customizing Authentication
Behind the scenes, agoogleapi
resource is created using the following methods. you can manually build a googleapi
resource for more auth control.
Tools
View available tools:- CalendarCreateEvent
- CalendarSearchEvents
- CalendarUpdateEvent
- GetCalendarsInfo
- CalendarMoveEvent
- CalendarDeleteEvent
- GetCurrentDatetime
Invocation
Invoke directly with args
You can invoke the tool directly by passing the required arguments in a dictionary format. Here is an example of creating a new event using theCalendarCreateEvent
tool.
Use within an agent
Below we show how to incorporate the toolkit into an agent. We will need a LLM or chat model:API reference
- Refer to the Google Calendar API overview for more details from Google Calendar API.
- For detailed documentation of all Google Calendar Toolkit features and configurations head to the calendar documentation.