OpenClaw × Google on Ubuntu: Setting Up the GOG Skill
Hamid Sabri / February 16, 2026
Introduction
Integrating OpenClaw with Google services unlocks powerful automation capabilities.
The GOG (Google on Go) skill enables OpenClaw to:
- Search and manage Gmail
- Access Google Calendar
- Interact with Google Drive
- Query Contacts
- Read and write Sheets
- Manage Docs
This guide walks through setting up GOG on Ubuntu, configuring OAuth, and connecting it to OpenClaw.
Prerequisites
- Ubuntu server (VPS or local)
- A Google account (ex:
yourname@gmail.com) - Access to a Google Cloud project to create an OAuth client (recommended)
Step 1: Install Build Tools and Go
Ubuntu's golang package can be outdated and trigger toolchain problems. Install Go from the official tarball.
sudo apt update
sudo apt install -y git make wget
cd /tmp
wget https://go.dev/dl/go1.26.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.26.0.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrc
go version
You should see go1.26.0.
Step 2: Build GOG on Ubuntu
Important: Don't build from main — it can break. Build from a release tag.
cd ~
git clone https://github.com/steipete/gogcli.git
cd gogcli
git fetch --tags
git checkout v0.11.0
If you encounter the error go: download go1.25 ... toolchain not available, force the local toolchain:
export GOTOOLCHAIN=local
make
If successful, you'll get bin/gog.
Install it:
ls -la bin
sudo install -m 0755 ./bin/gog /usr/local/bin/gog
gog --help
Step 3: Create Your Own Google OAuth Client
The 403 access_denied error happens when the OAuth app is in Testing mode and your email isn't an approved tester.
Best practice: Create your own OAuth client.
Google Cloud Setup
- Google Cloud Console → APIs & Services
- Enable the APIs you need:
- Minimum: Gmail API + Google Calendar API
- Add Drive/Sheets/Contacts/Docs if you use them
- OAuth consent screen
- If staying in "Testing", add your email as a Test user
- Credentials → Create Credentials → OAuth Client ID
- Choose Desktop app
- Download the JSON (ex:
client_secret.json) - Upload it to your Ubuntu server (scp/sftp)
Step 4: Configure GOG with the OAuth Client JSON
On Ubuntu:
gog auth credentials /path/to/client_secret.json
Step 5: Headless VPS Authentication
On a server without a browser, use the --manual flag:
gog auth add yourname@gmail.com --services gmail,calendar,drive,contacts,sheets,docs --manual
This prints a long Google URL.
What you do:
- Copy the URL
- Open it on your laptop/phone (logged into the same Google account)
- Approve the permission request
- Google redirects you to a URL containing
code=... - Paste the redirected URL (or the code, depending on prompt) back into your Ubuntu terminal
Confirm tokens saved:
gog auth list --json
You should see your account under accounts.
Step 6: Keyring Passphrase Prompt
You may see:
Enter passphrase to unlock "/home/crapa/.config/gogcli/keyring":
This means GOG encrypts tokens in a local keyring.
If You Know the Passphrase
Type it and press Enter.
If You Forgot It (Reset Keyring + Re-auth)
This deletes the local encrypted token store (you'll re-login once):
rm -rf ~/.config/gogcli/keyring
gog auth add yourname@gmail.com --services gmail,calendar,drive,contacts,sheets,docs --manual
Step 7: Quick Tests
Prove Google connectivity works:
gog gmail search "newer_than:7d" --max 5
gog calendar calendars --max 5
If these work, GOG is correctly connected.
Step 8: Connect OpenClaw to GOG
Add the Skill to OpenClaw
Run in your OpenClaw project:
npx playbooks add skill openclaw/skills --skill gog
Ensure OpenClaw Can Access GOG
This is critical for servers.
Important: Run OpenClaw as the same Linux user that ran gog auth add (so it can read ~/.config/gogcli/...).
Make sure GOG is in PATH for that user:
which gog
gog --help
If OpenClaw runs as a service (systemd/docker), ensure:
PATHincludes/usr/local/binHOMEpoints to the correct user home (so it can find~/.config/gogcli)
Step 9: Common Failure Checklist
Build Fails with contacts_crud.go Errors
You're on main. Switch to a release tag:
git checkout v0.11.0
Toolchain Not Available
Install recent Go and use:
export GOTOOLCHAIN=local
403 access_denied / App Not Verified
- Use your own Google OAuth client, OR
- Add your email as a Test user in the Google Cloud console
Accounts Empty After Auth
OAuth flow didn't finish (headless). Use --manual and paste the redirect/code.
Keyring Passphrase Blocks Automation
- Keep the passphrase safe, OR
- Reset keyring and re-auth (see Step 6)
Conclusion
With GOG configured and connected to OpenClaw, you now have a powerful automation layer for Google services.
The key to success:
- Build from a release tag, not
main - Use your own OAuth client to avoid Testing mode blocks
- Ensure OpenClaw runs as the user that authenticated GOG
- Test connectivity with quick GOG commands before integrating
Your OpenClaw assistant can now read email, manage calendars, access drive files, and much more — all controlled and predictable.