Skip to content
BlokloDocumentation

Google Calendar

Reading and creating Google Calendar events, for example a booking from the site written to the calendar and checking free slots.

Connection type: For the app and the agent. Sign-in: Sign in with a Google account in the provider's window and approve the permissions listed below. No passwords or keys are entered in Bloklo.

How it works

The app and the agent never see the credentials. They call the Google Calendar API through the Bloklo gateway, for example fetch("/gw/<connection id>/calendar/v3/users/me/calendarList"). The gateway appends the path to the address https://www.googleapis.com, adds an access token from the Google sign-in, renewed automatically, and passes the service's response back to the app.

  • Reads (GET) go through at once. Writes (POST, PUT, PATCH, DELETE) go through at once only when the connection is set to Always allow; otherwise the gateway returns status 202 with an approval_id and the write waits for approval in the panel (see Agent permissions).
  • The Test button sends GET /calendar/v3/users/me/calendarList?maxResults=1 and checks that the service accepted the credentials.

REST API v3 with JSON bodies. Times use RFC 3339 with a time zone offset; the main calendar has the ID “primary”. Lists are paged with pageToken and nextPageToken, and incremental sync uses syncToken (410 means a full resync). The API does not prevent double bookings, so check availability right before inserting an event.

Before you start

  • A Google account with access to the data the app should use.

Connecting in Bloklo

  1. Open Connectors in the sidebar and find Google Calendar.
  2. Click Connect and enter a connection name in Details.
  3. Click Connect. The Google sign-in window opens.
  4. Choose the Google account and approve the permissions. After approval you return to Bloklo and the connection is active.
  5. Attach the connection to a project: Attach to a project… on the connection page, or describe the task in the project chat.
Note

Until Google verifies the Bloklo app, the sign-in window may warn that the app is unverified. To continue, choose Advanced and then Go to bloklo.com. Until then at most 100 Google accounts can connect.

Provider permissions

Bloklo asks Google for exactly these scopes: https://www.googleapis.com/auth/calendar.events, https://www.googleapis.com/auth/calendar.calendarlist.readonly, https://www.googleapis.com/auth/calendar.freebusy. Access can be revoked at any time by removing the connection in Bloklo or in the Google account settings.

Note

Bloklo asks to read and write events, see the list of calendars and check availability (without changing calendar settings or sharing). The calendar does not prevent double bookings: the app checks availability right before saving a slot.

Google Calendar documentation

Example prompts

Prompts to type in the chat of a project with the connection attached:

  • “Build an appointment booking form that shows free slots from the calendar and adds an event on submit.”
  • “Show my events for the coming week on the page.”
  • “Send a meeting invitation with a video call link after someone signs up for a consultation.”

API methods

The most commonly used Google Calendar API methods. The path goes after /gw/<connection id>; parts in braces, such as {id}, are replaced with values. The gateway treats every request other than GET as a write, including queries sent with POST (such as search or GraphQL), so they need approval unless the connection is set to Always allow. The full list of methods is in the provider's documentation.

MethodPathWhat it doesIn the gateway
GET/calendar/v3/users/me/calendarListList the user's calendarsread
GET/calendar/v3/calendars/{calendarId}/eventsList events in a time rangeread
POST/calendar/v3/calendars/{calendarId}/eventsCreate an event with invitationswrite (approval)
GET/calendar/v3/calendars/{calendarId}/events/{eventId}Get an eventread
PATCH/calendar/v3/calendars/{calendarId}/events/{eventId}Update selected event fieldswrite (approval)
DELETE/calendar/v3/calendars/{calendarId}/events/{eventId}Delete an eventwrite (approval)
POST/calendar/v3/freeBusyCheck calendar availabilitywrite (approval)
POST/calendar/v3/calendars/{calendarId}/events/quickAddCreate an event from a text descriptionwrite (approval)
GET/calendar/v3/calendars/{calendarId}/events/{eventId}/instancesList instances of a recurring eventread

Service limits

600 requests per minute per user and 10,000 per minute per project (sliding window). Over the limit the response is 403 or 429 with reason usageLimits; retry with exponential backoff (up to 32–64 s). Event list: maxResults defaults to 250, at most 2500. Free/busy query: up to 50 calendars (calendarExpansionMax) and 100 group members (groupExpansionMax).

Google Calendar API reference

Agent actions and permissions

ActionTypeWhat the agent uses it for
Odczyt wydarzeńreadCzyta kalendarze i wydarzenia.
WydarzeniawriteTworzy i zmienia wydarzenia.
Tip

By default, reads run without asking and writes need approval in the chat. Change this on the connector page or in Settings → Agent permissions (see Agent permissions).

Troubleshooting

The connection says it needs reconnecting

Access was revoked in the Google account, expired, or the password changed. Open the connection and click Authorize.

The test returns HTTP 403

The account has no access to this data, or some permissions were unticked during sign-in. Reconnect and approve all permissions.

Limits and security

  • One connection can make up to 1,000 requests per minute; the service's own limits also apply.
  • Credentials are encrypted and not shown in the browser after saving; only the names of stored fields are visible.
  • A published app works for every visitor: protect the data the connection gives access to with sign-in in the app.

Something unclear or out of date? Contact us