Google Workspace

Connect Google Workspace

google_connect · Changes data · Markdown

Connects the company's Google Workspace through its own service account, for the mailboxes the agent may act as.

Free

This tool costs nothing to call.

An example

Connect our Google Workspace for support@ only. Here is the service account's key.

Your agent callsgoogle_connectFree

The example business is Halverson Cycle & Repair, a bike shop with a repair workshop in Portland, Oregon. The reply is the one the tool really gives.

With these arguments
{
  "secret": "{\"type\": \"service_account\", \"client_email\": \"conecto@halverson.iam.gserviceaccount.com\", \"private_key\": \"-----BEGIN PRIVATE KEY-----...\"}",
  "mailboxes": [
    "support@halversoncycle.example"
  ]
}
What comes back
{
  "google_workspace": {
    "service_account": "conecto@halverson.iam.gserviceaccount.com",
    "mailboxes": [
      "support@halversoncycle.example"
    ],
    "connected_at": "2026-10-14T08:00:00+00:00"
  },
  "need_approval": [
    "google_calendar_cancel",
    "google_drive_upload"
  ]
}

Use it when

The company uses Gmail and Drive and wants the agent to work in them there.

What it does

Connect the company's own Google Workspace so the agent works in its Gmail, Google Calendar and Drive, which stay the source of truth. The company makes a service account in Google Cloud, and its Workspace admin gives the account's client ID domain-wide delegation for gmail.modify, calendar and drive. Give the account's JSON key and the mailboxes the agent may act as (it never acts as anyone else). Each mailbox is checked before anything is kept. On accounts with an owner, cancelling events and replacing files wait for the owner's approval by default. Free.

What comes back

google_workspace: service_account, mailboxes and connected_at; need_approval, the tools that now wait for the owner. Every reply also carries cost_usd and balance_usd.

Inputs

NameTypeWhat it is
secretRequiredstringThe service account's JSON key. Never shown again. 50 to 10,000 characters.
mailboxesRequiredarray of stringsThe addresses the agent may act as, like support@ and sales@. 1 to 20 items.

The call

Over MCP, call google_connect on https://api.conecto.chat/mcp/googleworkspace. Over REST:

Terminal
curl -X POST https://api.conecto.chat/v1/tools/google_connect \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"secret":"{\"type\": \"service_account\", \"client_email\": \"conecto@halverson.iam.gserviceaccount.com\", \"private_key\": \"-----BEGIN PRIVATE KEY-----...\"}","mailboxes":["support@halversoncycle.example"]}'

When it refuses

A refused call costs nothing and says what to do next.

CodeWhenWhat to do
invalid_input400The key is not a service account key, or a mailbox is not an email address.Send the JSON key as Google Cloud downloads it, and 1 to 20 mailboxes.
vendor_rejected502Google refused the key's delegation for a mailbox.Give the key's client ID domain-wide delegation in the Admin console.

Give this to your agent.

Set up Conecto from https://conecto.chat/SKILL.md