> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace connectors

> Connect Gmail, Google Calendar, Contacts, Drive, Docs, and Sheets with an individual connector, or work across them through the Google Workspace connector.

Pick a connector and connect it through one shared account or each person's own. Scopes are the permissions your app requests from Google, so request only the ones it needs.

> [!NOTE]
>
> You need a [Builder plan](https://base44.com/pricing) or higher to use connectors in your app.

***

## What you can do

Connect your app to your email, calendars, contacts and files.

> **Automate email**
>
> Send confirmations and follow-ups, and turn incoming emails into tasks or tickets.

> **Sync calendars and contacts**
>
> Sync bookings, show your availability, and keep contacts up to date.

> **Work with files and data**
>
> Save reports to Drive, generate Docs, and import or export Sheets data.

***

## Google Workspace connector

Use this connector when your app combines several Google services, such as an assistant that works with your inbox, calendar and Drive files. If it uses only one or two, connect those instead.

**Example prompts**

Describe the Google services involved, what triggers the action, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Get to know me - skim my emails, meetings and Drive files and tell me what I'm working on.
```

```text wrap theme={null}
Be my personal assistant: watch my inbox and calendar and tell me what needs me today.
```

```text wrap theme={null}
Prep my next meeting from related email threads, files and the attendees' details.
```

```text wrap theme={null}
Draft follow-ups to attendees after each meeting.
```

```text wrap theme={null}
Turn this week's meetings and emails into a Doc and a Sheet.
```

**Scopes**

> This connector requests the scopes below across 6 services, so it needs more access than an individual connector.
>
> * **Gmail:** `gmail.readonly`, `gmail.modify`, `gmail.compose`, `gmail.send`
> * **Calendar:** `calendar.readonly`, `calendar.settings.readonly`, `calendar.events`
> * **Contacts:** `contacts.readonly`
> * **Drive:** `drive.readonly`, `drive`
> * **Docs:** `documents.readonly`, `documents`
> * **Sheets:** `spreadsheets.readonly`, `spreadsheets`
>
> Each scope is described under its service in [Google services](#google-services).
>
> **Access:** Your app works with the data of the Google account that authorizes the connection.

***

## Connecting a Google service

Connect a Google service through one shared account or let each person connect their own.

**Shared connector**

You connect one account once, and everyone who uses your app shares that connection and its data.

**To add a shared Google connector:**

1. Click **Connectors** in your Base44 workspace sidebar.
2. Click **Add connector**.
3. Search for the service you want, such as **Google Calendar** or **Google Workspace**, and click it.
4. Select **Shared connector**, then click **Next**.
5. Enter a **Connection name**.
6. Select where the connection can be used under **Who can access**. The default is **Apps and Super agent**.
7. If **Permissions** appears, choose **Read-only** to view data, or **Read & write** if your app needs to send, create or change it. The default is **Read-only**.
8. Click **Add connector**, then sign in with the Google account you want to share.
9. Open your app in the app editor.
10. Ask the AI chat to use the shared Google connection for the feature you want to build.

**App user connector**

Each person connects their own Google account, so your app works with their data. Google Calendar also offers **Let Base44 manage OAuth**.

> [!TIP]
>
> **Before you begin:** Workspace admins set up app user connectors. To let Base44 manage OAuth, you need a [Pro plan](https://base44.com/pricing) or higher. If you use your own OAuth client, review [Scopes and permissions](#scopes-and-permissions) before you build.

If you use **Let Base44 manage OAuth** for Google Calendar, skip to **To add an app user Google connector**.

**To prepare your own OAuth client:**

1. Create or select a project in the Google Cloud console.
2. Enable the API for each Google service your app uses.
3. Set up the OAuth consent screen with the scopes you plan to request.
4. While your OAuth app is in testing mode, add the Google accounts you'll test with as test users.
5. Create an OAuth client for a web application.
6. Add `https://connectors.base44.com/api/oauth/callback` as an authorized redirect URI.
7. Copy the client ID and client secret.

**To add an app user Google connector:**

1. Click **Connectors** in your Base44 workspace sidebar.
2. Click **Add connector**.
3. Search for the service you want, such as **Google Calendar** or **Google Drive**, and click it.
4. Select **App user connector**, then click **Next**.
5. If **Choose how to manage authentication** appears, select **Let Base44 manage OAuth** or **Use your own OAuth client**.
6. Enter a **Connector name**.
7. If you use your own OAuth client, enter its **Client ID** and **Client Secret**.
8. Clear any scopes your app doesn't need under **Scopes**. With your own OAuth client, add others under **Additional scopes**. To see what each scope does, see [Google services](#google-services).
9. Click **Add Connector**.
10. Open your app in the app editor.
11. Ask the AI chat to add a way for people to connect their own Google account.

***

## Google services

Find the service your app uses to see what it can do and the scopes it requests.

For other Google connectors, such as Google Analytics, Google Meet, and Google Search Console, see the [connectors catalog](https://docs.base44.com/Integrations/connectors-catalog).

### Gmail

Send, read, and manage emails in [Gmail](https://base44.com/integrations/connectors/gmail).

**Example prompts**

Describe the subject line, message body, formatting, recipients, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Send automated confirmation emails when a new order is placed.
```

```text wrap theme={null}
Read and parse incoming emails to create support tickets.
```

```text wrap theme={null}
Trigger a workflow automatically when a new email arrives.
```

```text wrap theme={null}
Send personalized follow-up emails to new leads.
```

```text wrap theme={null}
Notify team members via email when tasks are assigned.
```

**Scopes**

> Reading mail content is a restricted Google scope.
>
> Gmail scope names start with `https://www.googleapis.com/auth/`:
>
> * `gmail.readonly`: Read messages and metadata
> * `gmail.modify`: Read, label, and change messages, but not permanently delete them
> * `gmail.compose`: Create drafts and send email
> * `gmail.send`: Send messages
> * `gmail.labels`: Manage labels
> * `gmail.settings.basic`: Manage filters, signatures, and the vacation responder
>
> **Access:** Your app works with the mail of the Gmail account that authorizes the connection.

### Google Calendar

Access and manage [Google Calendar](https://base44.com/integrations/connectors/google-calendar) events.

**Example prompts**

Describe the calendar, the events, what triggers the action, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Sync all my bookings directly to my Google Calendar.
```

```text wrap theme={null}
Show my real-time availability from Google Calendar to clients.
```

```text wrap theme={null}
Run an automation when a calendar event is created or updated.
```

```text wrap theme={null}
Automatically block off meeting times in my personal calendar.
```

```text wrap theme={null}
Add new calendar events when a task is marked as complete.
```

**Scopes**

> The broad `calendar` scope manages every calendar, so choose a narrower scope when your app only reads events or availability. With **Let Base44 manage OAuth**, the picker offers only the narrower scopes.
>
> Google Calendar scope names start with `https://www.googleapis.com/auth/`:
>
> * `calendar`: Manage all calendars and events
> * `calendar.readonly`: View all calendars, events, and their settings
> * `calendar.events`: Manage events on calendars
> * `calendar.events.readonly`: View events on calendars
> * `calendar.events.freebusy`: View free/busy information from calendars without seeing event details
> * `calendar.freebusy`: View free/busy information for calendars
> * `calendar.app.created`: Manage calendars your app created
> * `calendar.calendarlist.readonly`: View the list of calendars
> * `calendar.events.public.readonly`: View public events on calendars
> * `calendar.settings.readonly`: View Google Calendar settings
>
> **Access:** Your app works with the calendars of the Google account that authorizes the connection.

### Google Contacts

Read, create, and manage contacts in Google Contacts.

**Example prompts**

Describe the contacts, what triggers the action, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Build a CRM that syncs clients two-way with my Google Contacts.
```

```text wrap theme={null}
Import leads from people I've emailed but never saved as contacts.
```

```text wrap theme={null}
Analyze my contact network and categorize contacts automatically with AI.
```

```text wrap theme={null}
Create a searchable company directory from my Google Workspace organization.
```

```text wrap theme={null}
Automatically save new customers as contacts when they sign up.
```

**Scopes**

> Choose `contacts.readonly` when your app only needs to read saved contacts.
>
> Google Contacts scope names start with `https://www.googleapis.com/auth/`:
>
> * `contacts.readonly`: View contacts
> * `contacts`: View, create, edit, and delete contacts
> * `contacts.other.readonly`: View other contacts, such as people you've emailed but haven't saved
> * `directory.readonly`: View your organization's Google Workspace directory
>
> **Access:** Your app works with the contacts of the Google account that authorizes the connection.

### Google Drive

Search, access, and manage files in [Google Drive](https://base44.com/integrations/connectors/google-drive).

**Example prompts**

Describe the files or folders, what triggers the action, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
List all files in my Google Drive and display them in my app.
```

```text wrap theme={null}
Search Google Drive for documents matching a keyword and show results.
```

```text wrap theme={null}
Save generated PDF reports from my app to Google Drive.
```

```text wrap theme={null}
Read a spreadsheet from Google Drive and import its data into my app.
```

```text wrap theme={null}
Trigger a workflow when a file is added or updated in Drive.
```

**Scopes**

> The `drive` scope gives your app access to all files and folders in Google Drive, while `drive.file` covers only the files your app creates or opens.
>
> Google Drive scope names start with `https://www.googleapis.com/auth/`:
>
> * `drive`: View, create, edit, and delete all files and folders in Google Drive
> * `drive.readonly`: View all files and folders in Google Drive
> * `drive.file`: Access only the files your app creates or opens with permission
>
> **Access:** Your app works with files in the Google Drive of the Google account that authorizes the connection.

### Google Docs

Create and edit [Google Docs](https://base44.com/integrations/connectors/google-docs) documents.

**Example prompts**

Describe the document, what triggers it, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Generate meeting notes documents automatically.
```

```text wrap theme={null}
Create contracts from templates with client data.
```

```text wrap theme={null}
Update shared documents when project status changes.
```

```text wrap theme={null}
Export reports to Google Docs format.
```

```text wrap theme={null}
Collaborate on documents with team comments.
```

**Scopes**

> The `documents` scope lets your app view and edit every Google Docs document in the connected account, not only the ones it creates.
>
> Google Docs scope names start with `https://www.googleapis.com/auth/`:
>
> * `documents`: View, create, and edit all Google Docs documents
> * `documents.readonly`: View all Google Docs documents
>
> **Access:** Your app works with the documents of the Google account that authorizes the connection.

### Google Sheets

Read and write data in [Google Sheets](https://base44.com/integrations/connectors/google-sheets) spreadsheets.

**Example prompts**

Describe the spreadsheet, what triggers the action, and any dynamic fields in the AI chat. For example:

```text wrap theme={null}
Export app data to a Google Sheets spreadsheet.
```

```text wrap theme={null}
Import leads from a Google Sheet into the CRM.
```

```text wrap theme={null}
Update inventory counts in Google Sheets automatically.
```

```text wrap theme={null}
Create weekly reports and save them to Google Sheets.
```

```text wrap theme={null}
Sync form submissions to a Google Sheets database.
```

**Scopes**

> The `spreadsheets` scope lets your app change every spreadsheet in the account, not only the ones it creates.
>
> Google Sheets scope names start with `https://www.googleapis.com/auth/`:
>
> * `spreadsheets`: View, edit, create, and delete all Google Sheets spreadsheets
> * `spreadsheets.readonly`: View all Google Sheets spreadsheets
>
> **Access:** Your app works with the spreadsheets of the Google account that authorizes the connection.

***

## Scopes and permissions

When you use your own OAuth client, you own the OAuth app and submit its verification to Google. Shared Google connectors and **Let Base44 manage OAuth** run on Base44's OAuth app, so you don't submit anything to Google for those. See [Using your own OAuth client](https://docs.base44.com/Integrations/Connectors.md#using-your-own-oauth-client).

Google groups the permissions your app requests into 3 categories. These groups determine the verification your app needs before it goes live, so choose the narrowest scopes that support what your app does. This matters most for Gmail, Drive, and Calendar.

* **Basic:** Covers name, email address, and profile. Google asks for nothing extra.
* **Sensitive:** Covers broader access to a Google service, such as creating calendar events. Google asks for app verification, including a review of how you use the data.
* **Restricted:** Covers reading the content of someone's messages or files, such as reading Gmail. Google asks for app verification, and may also require a yearly independent security assessment.

> [!TIP]
>
> To send email without restricted-scope verification, request only `gmail.send`.

Restricted-scope verification can take several weeks, and until it clears, Google may limit how many people can use your app and show an unverified-app warning. If Google requires a security assessment, a Google-approved independent assessor evaluates your app using the CASA framework. The assessment asks about the platform your app runs on as well as your own code, so [contact support](https://docs.base44.com/Community-and-support/Contacting-support.md) early. Requirements, timings, and exceptions are Google's to set, so check [Google's developer documentation](https://developers.google.com/identity/protocols/oauth2/production-readiness/restricted-scope-verification) before you plan around them.

> [!NOTE]
>
> Base44 always adds the `email` scope to identify the Google account. It appears under **Always included**, and you can't remove it.

***

## Using Google services in a backend function

If you write your own backend functions, they can call Google's APIs directly, and Base44 handles the OAuth flow and token storage.

For a shared connection, pass a service ID from the table below to `getConnection()`. For an app user connection, pass your own connector's ID, not a service ID.

**Shared connector**

```javascript theme={null}
// One account the whole app uses
const { accessToken } =
  await base44.asServiceRole.connectors.getConnection("googlecalendar");
// Use the access token to call the Google Calendar API.
```

**App user connector**

```javascript theme={null}
// The signed-in person's own account
const { accessToken } =
  await base44.asServiceRole.connectors.getCurrentAppUserConnection(
    "YOUR_CONNECTOR_ID",
  );
// Use the access token to call the Google API for that person.
```

| Service | Service ID (shared connections) |
| - | - |
| Gmail | `gmail` |
| Google Calendar | `googlecalendar` |
| Google Contacts | `google_contacts` |
| Google Drive | `googledrive` |
| Google Docs | `googledocs` |
| Google Sheets | `googlesheets` |
| Google Workspace | `googleworkspace` |

> **[Shared connectors](https://docs.base44.com/developers/backend/resources/connectors/shared-connectors.md)**
>
> Configure, deploy, and call a shared connection from a backend function.

> **[App user connectors](https://docs.base44.com/developers/backend/resources/connectors/app-user-connectors.md)**
>
> Retrieve a per-user token and call the API as the signed-in person.

***

## Troubleshooting

If you use your own OAuth client, check these when people can't connect their Google account.

> **Some people can't connect their own account**
>
> If you use your own OAuth client, it starts in testing mode, where only approved test users can connect. Before opening access more broadly, move your OAuth app to production and complete any verification Google requires.

> **Connecting fails with a redirect URI error**
>
> Register the callback URL your connection uses as an authorized redirect URI in your Google OAuth client:
>
> * For the single callback URL, enter `https://connectors.base44.com/api/oauth/callback` exactly.
> * For per-app callback URLs, see [Viewing your callback URLs](https://docs.base44.com/Integrations/Connectors.md#viewing-your-callback-urls).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.