← Back to tutorials

Tutorial

Connect Google Workspace

Connect Gmail and Google Calendar to your Zaki instance using the gog CLI.

Prerequisites (both methods)

  1. 1. Create Google Cloud OAuth Credentials

    Open Google Cloud Console → APIs & Services → Credentials. Click + CREATE CREDENTIALS → OAuth client ID → Application type: Desktop app. Download the JSON file.

    Open Google Cloud Console →

    You must configure the OAuth consent screen and add yourself as a Test user. Without this, authorization will fail.

  2. 2. Enable Gmail API and Google Calendar API

    Enable both APIs in the Google Cloud Console. Only need calendar? Just enable the Calendar API.

Method A: Terminal (no token usage)

Install gog, upload credentials, run the auth flow. See the full guide in your dashboard.

Method B: Chat (easier, uses tokens)

No commands needed. Do everything from your chat window (Telegram / WebChat). Say "Install gog for me", then "Connect my Gmail and Calendar" and upload your credentials file. Zaki will guide you through the rest.

What you can do after connecting

  • • "Check my recent emails"
  • • "Send an email to [email protected] about..."
  • • "What's on my schedule this week?"
  • • "Schedule a meeting for Friday at 2 PM"
  • • "Draft a reply to that email"

Troubleshooting

  • Access blocked: Add yourself as a Test user on the OAuth consent screen.
  • 403 accessNotConfigured: Make sure Gmail API and Calendar API are enabled.
  • Callback URL expired: Tell Zaki "re-authorize" for a fresh link.
  • no TTY keyring error: Prefix with GOG_KEYRING_PASSWORD="anypassword"