Google Workspace
Each agent works with its own Google Workspace account: its Gmail, its calendar, and the Drive documents your organization shares with it.
On this page
With Google Workspace, each agent has its own account on your domain, like any other colleague: it searches, reads, drafts, and sends from its mailbox, checks its calendar and books meetings, and works with the Drive files your organization shares with it.
The connection has two parts:
| Part | How often | Who |
|---|---|---|
| Your organization's app | Once | A Google Workspace admin, together with an AgentOS admin |
| Each agent's account | Once per agent | An AgentOS admin, with the password of the agent's account |
The app belongs to your organization: only accounts on your domain can use it, you control access from your own console, and AgentOS never shares credentials between customers.
1. Open the connection in AgentOS#
In AgentOSIntegrationsConnect a serviceGoogle WorkspaceConnect
The Register the app in Google Cloud page holds what you'll use in Google: your AgentOS redirect address, with Copy address, and the permissions for each service, each with its own copy button. Keep it open.
2. Register the app in Google Cloud#
In a Google Cloud project of your organization:
- Enable the services “Gmail API,” “Google Calendar API,” and “Google Drive API.” Google's guide: Enable Google Workspace APIs.
- Keep the app for your organization only: in “Google Auth Platform,” choose the Internal audience and, under “Data Access,” add the permissions you copied from AgentOS. Google's guide: Configure OAuth consent.
- Create the client: under “Clients,” one of type “Web application,” with the AgentOS redirect address under “Authorized redirect URIs.” Check “Use this client for an AI-powered agent.” Google's guide: Create access credentials.
With the internal audience, Google doesn't require app verification. If you don't have a project yet, Google explains how to create one.
The permissions AgentOS asks for#
| Service | Permissions | What for |
|---|---|---|
| Identity | openid, email |
Check that the account that signed in is the agent's. |
gmail.modify |
Search and read email, save drafts, send, and reply. | |
| Calendar | calendar.events, calendar.calendarlist.readonly, calendar.events.freebusy |
View, create, and respond to events, see its calendars, and find free time. |
| Documents | drive |
Search, read, create, change, move, and share Drive files. |
Each agent uses only the services you turn on for it, and everything it writes waits for your approval.
3. Register the app in AgentOS#
Back on the page you kept open, fill in App details with the Client ID (it ends in .apps.googleusercontent.com) and the Client secret, and click Connect. The secret is stored encrypted and never shown again.
On the app's page, Test connection checks the client with Google without using any account.
4. Connect each agent's account#
The agent's account must exist in your Google Workspace (it uses a license). Google's guide: Add a user account.
-
On the app's page, under Agent accounts, click Add account:
AgentSales assistantAccount emailsales@yourcompany.comServicesWhen you connect it, the permissions for the chosen services are requested.
-
The account shows Not connected. On its row, click Connect, sign in to Google with the agent's account, and accept the permissions.
-
The row changes to Connected. Test checks at any time that the authorization is still valid.
AgentOS rejects the connection if you sign in with an account that isn't the agent's.
5. Share what it will use#
The agent sees what's its own and what your organization shares with it, like a colleague:
- A Drive folder: share it with the agent's account, as a viewer if it only reads it or as an editor if it will create or change files. Google's guide: Share files from Google Drive.
- A calendar: share it with the agent's account, with permission to view or to make changes. Google's guide: Share your calendar.
To remove access, stop sharing: it loses access right away.
6. Put it to work#
In the agent's settings, under Capabilities, turn on Email, Calendar, and Documents, depending on what it will use.
- Without approval: it searches and reads email, saves drafts, views events, finds common free time, and searches and retrieves documents. What it reads is information, never an instruction.
- With your approval: sending or replying to an email, creating, changing, or canceling an event, responding to an invitation, and creating, changing, moving, or sharing a file. The card shows the exact action, and Edit lets you correct it before approving.
For the agent to act as soon as something arrives, create a When it happens scheduled task; for a team to work with a shared folder and calendar, connect them to a project.