---
title: Connect Google: Gmail, Calendar, Drive, YouTube
nav: Connect Google
summary: Agent J pre-installs a pinned Google tool; website sign-in and API authorization are checked separately; guided authorization with your own Google project arrives in 0.18.1.
order: 26
---
# Connect Google: Gmail, Calendar, Drive, YouTube

Tell Agent J "Connect Gmail, Calendar and YouTube." It checks two things separately: whether you are signed in to Google's websites in the computer's browser, and whether Google's APIs are authorized. Neither replaces the other. Signing in to Gmail does not let the Agent use the Gmail API, and API authorization does not sign you in to YouTube Studio.

## In this version

- **Google tool pre-installed**: Agent J installs one pinned Google command-line tool (gog) in the background, inside Agent J's own folder, checked byte for byte after download. If it fails, binding, pairing and chat are unaffected. It never touches a gog, gcloud or gws you already have, and never reads their saved authorization.
- **Read-only status**: your Agent runs `agentj google status` to see whether the tool is ready and which Google tools were already on the computer (presence only, contents never read).
- **Permissions per purpose**: read mail, send mail, read calendar, write calendar events, Drive files it creates or you pick, YouTube upload and read-back, Search Console read-only. Each purpose asks for the smallest permission it needs, never "everything".
- **Off if you don't need it**: say "I won't use Google tools" and your Agent runs `agentj google off`, which removes only Agent J's own copy. Turn it back on any time.

## Coming in 0.18.1

Guided API authorization: enable the needed APIs in your own Google project, create a desktop client, and set the app to **In production**, which avoids the seven-day expiry of Testing mode. This is not Google verification; you will still see Google's unverified-app warning. Authorization is stored in the computer's system keychain and checked once a day.

Until then your Agent tells you plainly that API authorization arrives in 0.18.1. It does not improvise an authorization flow with ad-hoc commands.

## What you do yourself

- Sign in on Google's real sign-in page on the computer, complete two-step verification, and read and accept the Google Cloud terms.
- On "Google hasn't verified this app", check that it is the app you just created and that the purposes and permissions are right, then follow Google's Advanced → Continue. Your Agent never clicks that for you and never submits the app for Google verification (Submit for verification).
- Never paste passwords, authorization codes, callback URLs or client JSON into chat. Your Agent will not ask for them.

## After authorization

Authorization does not permit sending or publishing: every email sent and every video uploaded still asks for its own approval on your phone. YouTube uses the standard Data API and can upload privately with a scheduled publish time; after that time your Agent reads the status back and only reports "published" when it is actually public. If Google locks a video as private, re-uploading through YouTube's website or an eligible client is usually needed; changing visibility in Studio is not a guaranteed fix. Your project's quotas in the Google Cloud console apply.

Authorization can end if you revoke access, change your Gmail password, leave it unused for a long time, or an organization policy intervenes. The morning check says when to reauthorize; only Google tasks wait, everything else continues.

**Copy to your main Agent:**

> Prepare local authorization for only the Google purposes I need. Use my own project and explain the setup plan and the actual permissions first; I confirm Google sign-in and risk warnings myself. Keep credentials out of chat. Check website sign-in and API authorization separately, and do not send or publish just because authorization succeeded.

<details>
<summary>Technical details</summary>

- Tool: gog 0.43.0 (openclaw/gogcli, MIT), SHA-256 pinned per platform, downloaded from agentj.app first and GitHub second; only the single executable is extracted, with its own GOG_HOME and no inherited Google token variables.
- Commands: `agentj google status`, `check`, `install`, `on`, `off`; `agentj google plan --purpose gmail-read --purpose youtube-publish` shows a plan and executes nothing.
- Storage: `google/` in the local state folder (readable only by your user), never uploaded, never in chat or logs.

</details>
