> ## Documentation Index
> Fetch the complete documentation index at: https://celestoai-mintlify-f11a6371.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup Gmail and Calendar integration

> Connect Gmail and Google Calendar to your AI agent using the agentor setup-google command — handles OAuth credentials and browser-based authentication.

<img src="https://mintcdn.com/celestoai-mintlify-f11a6371/xzxAoqIYRB-dtw-B/assets/undraw_security-on_3ykb.png?fit=max&auto=format&n=xzxAoqIYRB-dtw-B&q=85&s=5be78121db44afa8f4399c5b79f05c48" alt="Google OAuth Setup" className="rounded-lg" width="500" data-path="assets/undraw_security-on_3ykb.png" />

The `agentor setup-google` command guides you through:

1. **Creating Google Cloud Project** (if needed)
2. **Enabling APIs** (Gmail, Calendar)
3. **OAuth credentials** (desktop app)
4. **Browser authentication** (automatic)
5. **Credential storage** (secure, local)

**1. First run:**

```bash theme={null}
agentor setup-google
# ✅ Opens browser for one-time authentication
# ✅ Saves credentials locally
# ✅ Ready to use!
```

**2. Already set up:**

```bash theme={null}
agentor setup-google
# ✅ Google credentials already exist
# Use --force to re-authenticate
```
