> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opennous.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Calendar

> Log meetings from Google Calendar as activity signals on your contacts.

<Note>
  Google Calendar is connected via the same OAuth flow as Gmail. If you've already connected Gmail, calendar sync is enabled automatically if you granted calendar scope during setup.
</Note>

## How it works

Nous polls your Google Calendar every 10 minutes, looking at a rolling window of **7 days back → 30 days forward**. For each event, it resolves attendees to contacts using a 6-step identity waterfall — email match, LinkedIn URL, phone, name+company — then logs a `meeting` activity on the matched contact's timeline.

Events are deduplicated by Google event ID so replays are safe.

## Setup

### 1. Connect Gmail / Google OAuth

In your Nous dashboard, go to **Settings → Integrations** and connect your Google account. Make sure to grant both Gmail and Calendar permissions when prompted.

<Warning>
  If you connected Gmail but only granted email scope (not calendar), you'll need to disconnect and reconnect, accepting the calendar permission.
</Warning>

### 2. Done

No further configuration needed. Nous starts polling immediately after the OAuth connection is verified.

## What gets logged

| Event type                             | Activity logged | Notes                                                                                         |
| -------------------------------------- | --------------- | --------------------------------------------------------------------------------------------- |
| Calendar event with external attendees | `meeting`       | Only events matching a meeting keyword (call, sync, zoom, etc.) or with ≥2 external attendees |
| Cancelled event                        | Skipped         | `status: cancelled` events are ignored                                                        |
| Internal-only event                    | Skipped         | Events where all attendees share your email domain                                            |

## Environment variables

These are set at the server level — you do not configure them per-workspace.

| Variable                    | Description                                                    |
| --------------------------- | -------------------------------------------------------------- |
| `GOOGLE_CLIENT_ID`          | OAuth app client ID                                            |
| `GOOGLE_CLIENT_SECRET`      | OAuth app client secret                                        |
| `GOOGLE_OAUTH_REDIRECT_URI` | Must be `https://api.yourdomain.com/api/oauth/google/callback` |

## Identity resolution

Nous resolves each external attendee email against your contacts in this order:

1. Exact email match
2. LinkedIn URL match
3. Phone match
4. Name + company match (with activity-signal tiebreaker for ambiguous results)

If no match is found, the attendee is skipped — Google Calendar does **not** create new contacts.
