DocsGoogle Workspace (gog)

Google Workspace (gog)

Workspace Integration (gog)

The Google Workspace integration relies on the gog CLI tool, which is executed securely within the agent's Node.js sandbox. This allows agents to read emails, manage calendars, and update spreadsheets without exposing raw OAuth tokens to the LLM.

Initial Setup Flow

Because OAuth tokens cannot be securely generated headlessly, the initial authentication must happen on your host machine. In your terminal, run:

gog auth credentials /path/to/client_secret.json gog auth add you@gmail.com --services gmail,calendar,drive,contacts,docs,sheets

This provisions the secure token cache on your execution node. The OpenClaw Gateway will automatically detect the presence of these credentials and illuminate the Google Workspace badge in your Integrations dashboard.

Agent Execution

Once connected, you can assign tasks via the Mission Control board. The agent will formulate standard CLI commands (e.g., gog gmail search 'newer_than:1d'). The output is parsed back into the context window, allowing the agent to reason over your emails and draft replies using gog gmail drafts create.