# Google

Connect a Google account and read and send Gmail, manage Google Calendar events, work with Google Drive files and sync Google Contacts through one Zernio API.

Connect a person's Google account once and use their Gmail, Google Calendar, Google Drive and Google Contacts with your Zernio API key. A connected account uses `platform: "google"` and represents one mailbox.

## Quick reference

You choose which of the four areas it grants when you connect it.

| Property | Value |
|----------|-------|
| Platform value | `google` |
| Areas | `email` (Gmail), `calendar` (Google Calendar), `files` (Google Drive), `contacts` (Google Contacts) |
| Auth | OAuth 2.0 with Google sign-in, `scopes` required. Or an [organization connection](/platforms/google/organization): a Workspace admin delegates once and you add mailboxes without user sign-in |
| Accounts | One per Google account and profile. Connecting again widens the same account |
| Email | List, search, read, send, reply, forward, label, trash, drafts, scheduled send, tracking, send-as and signatures. 200 sends a day (500 on Google Workspace), doubling after 14 clean days |
| Calendar | Events, RSVP, free-busy and availability on the user's calendars |
| Files | Only files Zernio created or the user picked (`drive.file`) |
| Contacts | Synced into `/v1/contacts`, read-only |
| Inbox | Inbound and sent mail appears as conversations, with `message.received` |
| Webhooks | `message.received`, `email.*`, `calendar.event.*`, `file.*`, `contact.*`, `account.rate_limited` |
| Social posting | No |
| List the accounts | `GET /v1/accounts?platform=google` |

## Before you start

- The person connecting needs a Gmail or Google Workspace account. A Workspace admin can block third-party apps for the whole domain.
- Sending from Gmail needs a payment method on your Zernio workspace. Reading, calendar, files and contacts do not.

## Connect

Call `GET /v1/connect/google` with `profileId` and the areas you need in `scopes`, such as `scopes=email,calendar`, and send the user to the returned `authUrl`. See [Connect](/platforms/google/connect).

To ask for the address first and route any mailbox, use the hosted [email connect link](/platforms/imap/connect) from `GET /v1/connect/email`. Gmail and Microsoft addresses go to their sign-in, every other mailbox connects over IMAP.

## Common errors

| Error | Cause | Fix |
|-------|-------|-----|
| `400` `invalid_field_value` on connect | `scopes` is missing | Pass a subset of `email`, `calendar`, `files`, `contacts`. |
| `412` `account_scope_missing` | The account was connected without the area this call needs | Connect again with that area added to `scopes`. |
| `error=no_access_granted` on your `redirect_url` | The user unticked every permission on Google's consent screen, so no account was saved | Ask them to connect again and keep at least one permission ticked. |
| `404` with `reason: "file_not_granted"` | The Drive file was not created by Zernio or picked by the user | Let the user pick it in a [picker session](/platforms/google/files#let-the-user-pick-drive-files). |

## In this section

<PlatformPages platform="google" />

## Related

- [Start OAuth](/connect/get-connect-url)
- [List email threads](/email/list-email-threads)
- [List calendar events](/calendar/list-calendar-events)
- [List files](/files/list-files)
- [Inbox webhooks](/webhooks/inbox)