Usage #
// Import the typed helper
import { createEvent } from "@hotglue/sdk/google_calendar";
const result = await client.execute({
...createEvent({
calendar_id: string,
summary: string,
description: string,
// ...
}),
userId: "user_123",
});
// result is typed as CreateEventOutput
const result = await client.execute({
integration: "google_calendar",
tool: "create_event",
userId: "user_123",
input: {
calendar_id: string,
summary: string,
description: string,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["google_calendar"],
userId: "user_123",
}),
});
await agent.generate("run the Create Event tool");
Required Permissions #
https://www.googleapis.com/auth/calendar.events
Input Schema #
calendar_id
string
required
Calendar identifier. Use "primary" for the primary calendar
summary
string
required
Title of the event
description
string
Description of the event
location
string
Geographic location of the event
start
object
required
Start time of the event
end
object
required
End time of the event
attendees
object[]
List of attendees
recurrence
string[]
RRULE, EXRULE, RDATE, or EXDATE lines for recurring events
reminders
object
Reminder settings for the event
color_id
string
Color ID for the event (1-11)
visibility
string
Visibility of the event
values:
default, public, private, confidential
send_updates
string
Whether to send notifications about the event
values:
all, externalOnly, none
This tool calls: #
POST
https://www.googleapis.com/calendar/v3/calendars/{calendar_id}/events