feat: added google based connectors docs

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-01-06 23:20:44 -08:00
parent 761fa9162b
commit 1b4ec2daa7
4 changed files with 203 additions and 59 deletions

View file

@ -3,32 +3,81 @@ title: Gmail
description: Connect your Gmail to SurfSense description: Connect your Gmail to SurfSense
--- ---
# Gmail Connector # Gmail OAuth Integration Setup Guide
Index your Gmail emails and make them searchable. This guide walks you through setting up a Google OAuth 2.0 integration for SurfSense to connect your Gmail account.
## Prerequisites ## Step 1: Access the Google Cloud Console
- A Google account 1. Navigate to [Google Cloud Console](https://console.cloud.google.com/)
- Google OAuth configured in SurfSense (see [Prerequisites](/docs)) 2. Select an existing project or create a new one
- Gmail API enabled in Google Cloud Console
## Setup ## Step 2: Enable Required APIs
1. Navigate to your Search Space settings 1. Go to **APIs & Services** > **Library**
2. Click on **Add Connector** 2. Search for and enable the following APIs:
3. Select **Gmail** from the list - **People API** (required for Google OAuth)
4. Authorize SurfSense to access your Gmail - **Gmail API** (required for Gmail connector)
5. Configure which labels/folders to index
## What Gets Indexed ![Google Developer Console People API](/docs/connectors/google/google_oauth_people_api.png)
- Email content ## Step 3: Configure OAuth Consent Screen
- Email attachments
- Thread conversations
- Labels and categories
## Sync Frequency 1. Go to **APIs & Services** > **OAuth consent screen**
2. Select **External** user type (or Internal if using Google Workspace)
3. Fill in the required information:
- **App name**: `SurfSense`
- **User support email**: Your email address
- **Developer contact information**: Your email address
4. Click **Save and Continue**
The Gmail connector supports scheduled syncing to keep your emails indexed. ![Google Developer Console OAuth consent screen](/docs/connectors/google/google_oauth_screen.png)
### Add Scopes
1. Click **Add or Remove Scopes**
2. Add the following scopes:
- `https://www.googleapis.com/auth/gmail.readonly` - Read Gmail messages
- `https://www.googleapis.com/auth/userinfo.email` - View user email address
3. Click **Update** and then **Save and Continue**
## Step 4: Create OAuth Client ID
1. Go to **APIs & Services** > **Credentials**
2. Click **Create Credentials** > **OAuth client ID**
3. Select **Web application** as the application type
4. Enter **Name**: `SurfSense`
5. Under **Authorized redirect URIs**, add:
```
http://localhost:8000/api/v1/auth/google/gmail/connector/callback
```
6. Click **Create**
![Google Developer Console OAuth client ID](/docs/connectors/google/google_oauth_client.png)
## Step 5: Get OAuth Credentials
1. After creating the OAuth client, you'll see a dialog with your credentials
2. Copy your **Client ID** and **Client Secret**
> ⚠️ Never share your client secret publicly or include it in code repositories.
![Google Developer Console Config](/docs/connectors/google/google_oauth_config.png)
---
## Running SurfSense with Gmail Connector
Add the Google OAuth environment variables to your Docker run command:
```bash
docker run -d -p 3000:3000 -p 8000:8000 \
-v surfsense-data:/data \
# Gmail Connector
-e GOOGLE_OAUTH_CLIENT_ID=your_google_client_id \
-e GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret \
-e GOOGLE_GMAIL_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/gmail/connector/callback \
--name surfsense \
--restart unless-stopped \
ghcr.io/modsetter/surfsense:latest
```

View file

@ -3,32 +3,80 @@ title: Google Calendar
description: Connect your Google Calendar to SurfSense description: Connect your Google Calendar to SurfSense
--- ---
# Google Calendar Connector # Google Calendar OAuth Integration Setup Guide
Index your Google Calendar events and make them searchable. This guide walks you through setting up a Google OAuth 2.0 integration for SurfSense to connect your Google Calendar.
## Prerequisites ## Step 1: Access the Google Cloud Console
- A Google account 1. Navigate to [Google Cloud Console](https://console.cloud.google.com/)
- Google OAuth configured in SurfSense (see [Prerequisites](/docs)) 2. Select an existing project or create a new one
- Google Calendar API enabled in Google Cloud Console
## Setup ## Step 2: Enable Required APIs
1. Navigate to your Search Space settings 1. Go to **APIs & Services** > **Library**
2. Click on **Add Connector** 2. Search for and enable the following APIs:
3. Select **Google Calendar** from the list - **People API** (required for Google OAuth)
4. Authorize SurfSense to access your Google Calendar - **Google Calendar API** (required for Calendar connector)
5. Select which calendars to index
## What Gets Indexed ![Google Developer Console People API](/docs/connectors/google/google_oauth_people_api.png)
- Event titles and descriptions ## Step 3: Configure OAuth Consent Screen
- Event attendees
- Meeting notes
- Recurring events
## Sync Frequency 1. Go to **APIs & Services** > **OAuth consent screen**
2. Select **External** user type (or Internal if using Google Workspace)
3. Fill in the required information:
- **App name**: `SurfSense`
- **User support email**: Your email address
- **Developer contact information**: Your email address
4. Click **Save and Continue**
The Google Calendar connector supports scheduled syncing to keep your events indexed. ![Google Developer Console OAuth consent screen](/docs/connectors/google/google_oauth_screen.png)
### Add Scopes
1. Click **Add or Remove Scopes**
2. Add the following scope:
- `https://www.googleapis.com/auth/calendar.readonly` - Read Google Calendar events
3. Click **Update** and then **Save and Continue**
## Step 4: Create OAuth Client ID
1. Go to **APIs & Services** > **Credentials**
2. Click **Create Credentials** > **OAuth client ID**
3. Select **Web application** as the application type
4. Enter **Name**: `SurfSense`
5. Under **Authorized redirect URIs**, add:
```
http://localhost:8000/api/v1/auth/google/calendar/connector/callback
```
6. Click **Create**
![Google Developer Console OAuth client ID](/docs/connectors/google/google_oauth_client.png)
## Step 5: Get OAuth Credentials
1. After creating the OAuth client, you'll see a dialog with your credentials
2. Copy your **Client ID** and **Client Secret**
> ⚠️ Never share your client secret publicly or include it in code repositories.
![Google Developer Console Config](/docs/connectors/google/google_oauth_config.png)
---
## Running SurfSense with Google Calendar Connector
Add the Google OAuth environment variables to your Docker run command:
```bash
docker run -d -p 3000:3000 -p 8000:8000 \
-v surfsense-data:/data \
# Google Calendar Connector
-e GOOGLE_OAUTH_CLIENT_ID=your_google_client_id \
-e GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret \
-e GOOGLE_CALENDAR_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/calendar/connector/callback \
--name surfsense \
--restart unless-stopped \
ghcr.io/modsetter/surfsense:latest
```

View file

@ -3,32 +3,81 @@ title: Google Drive
description: Connect your Google Drive to SurfSense description: Connect your Google Drive to SurfSense
--- ---
# Google Drive Connector # Google Drive OAuth Integration Setup Guide
Index your Google Drive files, documents, and shared content. This guide walks you through setting up a Google OAuth 2.0 integration for SurfSense to connect your Google Drive.
## Prerequisites ## Step 1: Access the Google Cloud Console
- A Google account 1. Navigate to [Google Cloud Console](https://console.cloud.google.com/)
- Google OAuth configured in SurfSense (see [Prerequisites](/docs)) 2. Select an existing project or create a new one
## Setup ## Step 2: Enable Required APIs
1. Navigate to your Search Space settings 1. Go to **APIs & Services** > **Library**
2. Click on **Add Connector** 2. Search for and enable the following APIs:
3. Select **Google Drive** from the list - **People API** (required for Google OAuth)
4. Authorize SurfSense to access your Google Drive - **Google Drive API** (required for Drive connector)
5. Select the folders you want to index
## What Gets Indexed ![Google Developer Console People API](/docs/connectors/google/google_oauth_people_api.png)
- Google Docs ## Step 3: Configure OAuth Consent Screen
- Google Sheets
- Google Slides
- PDFs and other documents
- Shared files
## Sync Frequency 1. Go to **APIs & Services** > **OAuth consent screen**
2. Select **External** user type (or Internal if using Google Workspace)
3. Fill in the required information:
- **App name**: `SurfSense`
- **User support email**: Your email address
- **Developer contact information**: Your email address
4. Click **Save and Continue**
The Google Drive connector supports scheduled syncing to keep your content up to date. ![Google Developer Console OAuth consent screen](/docs/connectors/google/google_oauth_screen.png)
### Add Scopes
1. Click **Add or Remove Scopes**
2. Add the following scopes:
- `https://www.googleapis.com/auth/drive.readonly` - Read-only access to Google Drive
- `https://www.googleapis.com/auth/userinfo.email` - View user email address
3. Click **Update** and then **Save and Continue**
## Step 4: Create OAuth Client ID
1. Go to **APIs & Services** > **Credentials**
2. Click **Create Credentials** > **OAuth client ID**
3. Select **Web application** as the application type
4. Enter **Name**: `SurfSense`
5. Under **Authorized redirect URIs**, add:
```
http://localhost:8000/api/v1/auth/google/drive/connector/callback
```
6. Click **Create**
![Google Developer Console OAuth client ID](/docs/connectors/google/google_oauth_client.png)
## Step 5: Get OAuth Credentials
1. After creating the OAuth client, you'll see a dialog with your credentials
2. Copy your **Client ID** and **Client Secret**
> ⚠️ Never share your client secret publicly or include it in code repositories.
![Google Developer Console Config](/docs/connectors/google/google_oauth_config.png)
---
## Running SurfSense with Google Drive Connector
Add the Google OAuth environment variables to your Docker run command:
```bash
docker run -d -p 3000:3000 -p 8000:8000 \
-v surfsense-data:/data \
# Google Drive Connector
-e GOOGLE_OAUTH_CLIENT_ID=your_google_client_id \
-e GOOGLE_OAUTH_CLIENT_SECRET=your_google_client_secret \
-e GOOGLE_DRIVE_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/drive/connector/callback \
--name surfsense \
--restart unless-stopped \
ghcr.io/modsetter/surfsense:latest
```

View file

@ -15,8 +15,6 @@ To set up Google OAuth:
1. Login to your [Google Developer Console](https://console.cloud.google.com/) 1. Login to your [Google Developer Console](https://console.cloud.google.com/)
2. Enable the required APIs: 2. Enable the required APIs:
- **People API** (required for basic Google OAuth) - **People API** (required for basic Google OAuth)
- **Gmail API** (required if you want to use the Gmail connector)
- **Google Calendar API** (required if you want to use the Google Calendar connector)
![Google Developer Console People API](/docs/connectors/google/google_oauth_people_api.png) ![Google Developer Console People API](/docs/connectors/google/google_oauth_people_api.png)
3. Set up OAuth consent screen. 3. Set up OAuth consent screen.
![Google Developer Console OAuth consent screen](/docs/connectors/google/google_oauth_screen.png) ![Google Developer Console OAuth consent screen](/docs/connectors/google/google_oauth_screen.png)