Skip to content

Create Google Calendar Function

Endpoint used to create a Google Calendar function.

Terminal window
curl --request POST \
--url https://chat.api.toolzz.com.br/api/v1/functions/ \
--header 'Authorization: Bearer TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '
{
"name": "string",
"description": "string_prompt",
"iconFileId": null,
"outputs": [],
"googleCalendar": {
"googleId": "string_digits",
"calendarId": "email_address",
"timezone": "string_timezone",
"notificationContent": "string",
"googleUser": {
"id": "string_digits",
"email": "email_address",
"verified_email": true,
"name": "string",
"given_name": "string",
"family_name": "string",
"picture": "url",
"hd": "string_domain"
},
"googleToken": "oauth_access_token"
},
"type": "google-calendar",
"userId": "uuid",
"unityId": "uuid"
}
'
{
"id": "uuid",
"institutionId": "uuid",
"userId": "uuid",
"unityId": "uuid",
"code": "string",
"description": "string",
"iconFileId": "string",
"status": true,
"name": "string",
"color": "string",
"outputs": [],
"isActivated": true,
"type": "google-calendar",
"googleCalendarPlugin": [
{
"id": "uuid",
"googleId": "string_digits",
"calendarId": "email@domain.com",
"timezone": "string_timezone",
"pluginId": "uuid",
"notificationType": null,
"notificationContentType": null,
"notificationContent": null,
"notificationDelayMs": 0,
"notificationWaitForSpeech": 0,
"createdAt": "iso-date",
"updatedAt": "iso-date",
"googleUser": {
"name": "string",
"given_name": "string",
"family_name": "string",
"picture": "url",
"email": "email@domain.com",
"hd": "string"
},
"googleToken": "string_token"
}
],
"discordPlugin": [],
"telegramPlugin": []
}
ParameterTypeDescriptionRequired
AuthorizationStringAccess token (“Bearer” must be before the token)Yes
CategoryKeyTypeDescriptionRequired
GeneralnameStringIdentifier name of the integration tool.Yes
descriptionStringPrompt/Instruction that guides the AI on the purpose of the function.Yes
iconFileIdNull/UUIDFile identifier for a custom icon.No
outputsArrayList of expected output variables (usually []).No
typeStringTechnical type of the integration (fixed: google-calendar).Yes
userIdUUIDUnique user identifier in the system.Yes
unityIdUUIDUnique organizational unit identifier.Yes
GooglegoogleCalendarObjectConnection data with the Google API:Yes
googleCalendar.googleIdStringUnique identification ID of the Google account.Yes
googleCalendar.calendarIdStringE-mail or target calendar ID.No
googleCalendar.timezoneStringCalendar timezone (e.g., America/Sao_Paulo).No
googleCalendar.notificationContentStringText template for event notifications.No
googleCalendar.googleTokenStringOAuth2 access token (Access/Refresh Token).Yes
ProfilegoogleCalendar.googleUserObjectProfile information of the authenticated user:Yes
googleUser.idStringInternal Google profile ID.Yes
googleUser.emailStringE-mail of the linked Google account.Yes
googleUser.verified_emailBooleanAccount verification status on Google.Yes
googleUser.nameStringUser’s full name.Yes
googleUser.given_nameStringUser’s first name.Yes
googleUser.family_nameStringUser’s last name.Yes
googleUser.pictureURLURL of the user’s profile image.No
googleUser.hdStringOrganization domain (e.g., company.com).No

CategoryKeyTypeDescription
GeneralidUUIDUnique plugin identifier in the database.
institutionIdUUIDUnique identifier of the institution owning the plugin.
userIdUUIDUnique identifier of the user who configured the integration.
unityIdUUIDLinked organizational unit identifier.
codeStringTechnical name or internal identifier of the plugin logic.
descriptionStringInstructions (prompt) that guide the AI on how to use the function.
iconFileIdStringIcon file identifier (if any).
statusBooleanDefines if the plugin is available in the system (true/false).
nameStringFriendly name of the tool (e.g., “Google Calendar”).
colorStringColor identifier for interface display (e.g., gray).
outputsArrayList of output variables generated by the plugin (empty by default).
isActivatedBooleanIndicates if the integration is active and ready for use.
typeStringCategory of the integration (always google-calendar in this case).
InstancegoogleCalendarPlugin[]Array[Obj]List of specific calendar settings:
googleCalendarPlugin[].idUUIDUnique identifier of this calendar instance configuration.
googleCalendarPlugin[].googleIdStringUnique snowflake/numeric ID of the Google account.
googleCalendarPlugin[].calendarIdStringTarget calendar e-mail (official ID in Google Calendar).
googleCalendarPlugin[].timezoneStringCalendar timezone (e.g., America/Sao_Paulo).
googleCalendarPlugin[].pluginIdUUIDForeign key referencing the main plugin id.
NotificationsnotificationTypeNull/StrConfigured notification type (Push, Webhook, etc.).
notificationContentTypeNull/StrContent type sent in the notification.
notificationContentNull/StrFixed content or notification template.
notificationDelayMsNumberDelay in milliseconds to trigger the notification.
notificationWaitForSpeechNumberWaiting time for speech before proceeding (in ms).
TimestampscreatedAtStringCreation date and time (ISO 8601).
updatedAtStringLast update date and time (ISO 8601).
Google ProfilegoogleUserObjectMetadata extracted from the authenticated Google account:
googleUser.nameStringFull name displayed on the Google profile.
googleUser.given_nameStringUser’s first name.
googleUser.family_nameStringUser’s last name.
googleUser.pictureURLPublic link to the Google profile photo.
googleUser.emailStringE-mail of the authenticated Google account.
googleUser.hdStringOrganization domain (Hosted Domain, e.g., toolzz.me).
SecuritygoogleTokenStringOAuth2 token (Access/Refresh) used in API communication.
OthersdiscordPlugin[]ArrayList of linked Discord plugins (empty in this context).
telegramPlugin[]ArrayList of linked Telegram plugins (empty in this context).

To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.

To access your access token, follow these steps:

  1. Log in to the ToolzzAI platform
  2. Click on “Settings”
  3. Click on “Access Token”
  4. Copy the access token

Access token page