Google

Google

Google links Google accounts to MaxSuite, so you and your agents can work with their Calendar, Drive, Google Docs and Gmail from here (module google). Each account belongs to the person who linked it.

In the sidebar under Connections → Google. Only the person who linked an account can use it. Nobody else can read that person's mail, calendar or Drive through MaxSuite, administrators included.

Before you start: the workspace's Google client

Google gives OAuth client credentials to a Google Cloud project of your own, and the workspace signs in to Google as that client. An administrator registers it once, with a client id, a client secret and a redirect URI:

  1. In your Google Cloud project, create an OAuth client and add https://<your-deployment>/api/google/callback as an authorised redirect URI.
  2. Send the client id, secret and that redirect URI to POST /api/google/client (needs google:write). The secret is encrypted and never returned. GET /api/google/client says whether a client is configured.

There is no screen for this step. Until it is done, linking is refused with a message saying no Google OAuth client is configured.

Google

The page has three tabs.

  • Accounts: the accounts you linked (an administrator sees everyone's), with the access each one granted and when its current token runs out. A time in the past is not a fault by itself: a fresh token is fetched when needed. Link an account sits at the top for people who may manage Google.
  • Calendar: upcoming events on the chosen account's primary calendar, soonest first, with where each one is. An all-day event shows as a day, not as midnight.
  • Drive: the chosen account's files, most recently changed first, with the bin left out. Type a name and press Search to narrow it.

When there is more than one account, Calendar and Drive have an account picker. They only work for an account you linked yourself.

What you can do

  1. Open Connections → Google and press Link an account.
  2. Tick what Google gives Max:
    • Gmail: read, organise and send mail. The account then also appears on the Mail Mailboxes page, where its inbox reads and sends like any mailbox, and your agents can work with it.
    • Calendar: read and change events.
    • Drive: see files, or Drive: see and change files. Leave change unticked unless an agent or a sync needs to write there.
  3. Google's own page opens. Choose your account and approve.
  4. You come back to the page with the account under Accounts. If you cancelled on Google, nothing changed.

A tool that needs access the account did not grant is refused with a message saying which. Link the account again with it ticked.

Look at your calendar or Drive

  1. Open the Calendar or Drive tab.
  2. If you have several accounts, pick one.
  3. On Drive, search by file name.

Unlinking is done by an agent tool or the API (DELETE /api/google/:id); the screen has no button for it. Only the account's own person, or an administrator, may unlink it. The grant stays in place at Google until it is revoked there.

Who can do what

PermissionLabelLets you
google:readView Google, including your own Gmail: who each message is from, its subject and, when opened, its full textSee the linked accounts, read your own calendar and Drive, export your own Google Docs, and list and read your own Gmail.
google:writeManage googleLink accounts, register the workspace's OAuth client, and change your own calendar, Drive and mailbox. Unlink your own account, or anyone's if you are an administrator.

Whatever the permission, an account is used only by the person who linked it. See People, roles and permissions.

What happens on its own

Nothing in this module runs on a schedule.

Needs

Nothing has to be switched on first. Booking, Mail and Sync use accounts linked here.

What agents can do

An agent works with the accounts of the person it acts for, and must name the account: google.accounts lists them and gives the id the other tools need. Reads run straight away. Every change waits for a person's approval by default, because each one lands in a real calendar, Drive or mailbox. Sending mail always asks, every time. See Agents and approvals.

Read only: google.accounts, google.files, google.events, google.exportDoc, google.gmailMessages, google.gmailRead

Calendar and Drive, need approval: google.createEvent, google.updateEvent, google.deleteEvent, google.createFolder, google.createFile, google.trashFile

Gmail drafts: google.gmailDraft, google.gmailUpdateDraft, google.gmailDiscardDraft

Gmail, always asks: google.gmailSend, google.gmailSendDraft

Gmail, change: google.gmailModify, google.gmailTrash

Account: google.unlink

What to know about them:

  • google.events reads a window of the calendar, from now by default. Agents are told to ask it before proposing a time.
  • google.createEvent makes an all-day event from a date alone and a timed one from a full date and time. google.updateEvent changes only what it is given. google.deleteEvent cancels an event and Google tells the guests. There is no undo.
  • google.exportDoc reads one Google Doc as HTML and stores nothing. To keep a copy, follow it with docs.create in Documents.
  • google.createFolder and google.createFile make a folder, or a blank Doc or Sheet, and answer with the link.
  • google.trashFile and google.gmailTrash move a file or a message to Google's bin, where it can be restored for thirty days.
  • google.gmailMessages lists messages newest first: sender, subject, date, snippet and labels. google.gmailRead reads one message in full.
  • google.gmailDraft writes a draft in Gmail Drafts and sends nothing. google.gmailSendDraft shows it to the person on a card and sends only when they press.
  • google.gmailSend sends a plain-text email. It cannot be called back. google.gmailModify adds or removes labels, for example to mark a message read or archive it.
  • google.unlink forgets an account here. No tool links one back, because that takes a person on Google's consent screen.

Over MCP the same tools are named google__accounts, google__events and so on. See API keys and MCP access.

Google · maxsuite · MaxDoc