Overview
The Google Workspace Connector provides functionality to retrieve files from Google Drive (formerly G Suite) and register them in the Fess index.
This feature requires the fess-ds-gsuite plugin.
Supported Services
Google Drive (My Drive, Shared Drives)
Google Docs, Spreadsheets, Slides, Forms, etc.
Prerequisites
Plugin installation is required
A Google Cloud Platform project must be created
A service account must be created and credentials obtained
Domain-wide delegation must be configured for Google Workspace
Plugin Installation
Method 1: Place JAR file directly
Method 2: Install from admin console
Open “System” -> “Plugins”
Upload the JAR file
Restart Fess
Configuration
Configure in the admin console under “Crawler” -> “Data Store” -> “Create New”.
Basic Settings
| Item | Example |
|---|---|
| Name | Company Google Drive |
| Handler Name | GoogleDriveDataStore |
| Enabled | On |
Parameter Configuration
Parameter List
Script Configuration
Available Fields
| Field | Description |
|---|---|
file.name | File name |
file.description | File description |
file.contents | File text content |
file.mimetype | File MIME type |
file.filetype | File type |
file.created_time | Creation date/time |
file.modified_time | Last modified date/time |
file.web_view_link | Link to open in browser |
file.url | File URL |
file.thumbnail_link | Thumbnail link (valid for short period) |
file.size | File size (bytes) |
file.roles | Access permissions |
For details, see the Google Drive Files API.
Google Cloud Platform Configuration
1. Create a Project
Access https://console.cloud.google.com/:
Create a new project
Enter a project name
Select organization and location
2. Enable Google Drive API
In “APIs & Services” -> “Library”:
Search for “Google Drive API”
Click “Enable”
3. Create a Service Account
In “APIs & Services” -> “Credentials”:
Select “Create credentials” -> “Service account”
Enter a service account name (e.g., fess-crawler)
Click “Create and continue”
Skip role assignment
Click “Done”
4. Create Service Account Key
For the created service account:
Click on the service account
Open the “Keys” tab
Click “Add key” -> “Create new key”
Select JSON format
Save the downloaded JSON file
5. Enable Domain-wide Delegation
In the service account settings:
Check “Enable domain-wide delegation”
Click “Save”
Copy the “OAuth 2 Client ID”
Credential Configuration
Retrieve Information from JSON File
The downloaded JSON file:
Set the following information in parameters:
private_key_id->private_key_idprivate_key->private_key(keep newlines as\n)client_email->client_email
Private Key Format
private_key preserves newlines as \n:
Usage Examples
Crawl Entire Google Drive
Parameters:
Script:
Crawl with Permissions
Parameters:
Script:
Crawl Only Specific File Types
Google Docs only:
Troubleshooting
Authentication Error
Symptom: 401 Unauthorized or 403 Forbidden
Check:
Verify service account credentials are correct:
Is
private_keyformatted with\nfor newlines?Is
private_key_idcorrect?Is
client_emailcorrect?
Verify Google Drive API is enabled
Verify domain-wide delegation is configured
Verify authorization in Google Workspace admin console
Verify OAuth scope is correct (
https://www.googleapis.com/auth/drive)
Domain-wide Delegation Error
Symptom: Not Authorized to access this resource/api
Resolution:
Verify authorization in Google Workspace admin console:
Is the Client ID registered correctly?
Is the OAuth scope correct? (
https://www.googleapis.com/auth/drive)
Verify domain-wide delegation is enabled for the service account
Cannot Retrieve Files
Symptom: Crawl succeeds but 0 files found
Check:
Verify files exist in Google Drive
Verify service account has read permissions
Verify domain-wide delegation is configured correctly
Verify access to target user’s Drive is possible
API Quota Error
Symptom: 403 Rate Limit Exceeded or 429 Too Many Requests
Resolution:
Check quota in Google Cloud Platform
Increase crawl interval
Request quota increase if needed
Private Key Format Error
Symptom: Invalid private key format
Resolution:
Verify newlines are correctly formatted as \n:
Large Number of Files
Symptom: Crawl takes too long or times out
Resolution:
Split into multiple data stores
Distribute load with scheduled crawling
Adjust crawl interval
Crawl only specific folders
Permissions and Access Control
Reflect Google Drive Sharing Permissions
Reflect Google Drive sharing settings in Fess permissions:
Parameters:
Script:
file.roles contains Google Drive sharing information.
Reference Information
Data Store Connector Overview - Data Store Connector Overview
Microsoft 365 Connector - Microsoft 365 Connector
Box Connector - Box Connector
Data Store Crawling - Data Store Configuration Guide