> ## Documentation Index
> Fetch the complete documentation index at: https://docs.celesto.ai/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/6vAp4HH8YdSly8GJ/assets/undraw_security-on_3ykb.png?fit=max&auto=format&n=6vAp4HH8YdSly8GJ&q=85&s=a2780df09c1ae31cc9c59cfb2e76b50a" 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
```
