Google Drive Connector
Connector Configuration
The Google Drive connector synchronizes documents accessible by a Google service account to Wikit Semantics.
| Field name | Format / Type | Required | Comment |
|---|---|---|---|
Service account email (serviceAccountEmail) | ✅ | Email address of the Google service account (e.g. wikit-sync@my-project.iam.gserviceaccount.com) | |
Private key (key) | Long text (PEM key) | ✅ | Private key of the service account (private_key field from the JSON key file) |
Shared Drive IDs (sharedDriveIds) | List of texts | ➖ | List of Shared Drive IDs to synchronize. If empty, all accessible Shared Drives are scanned |
Paths to include (pathsToInclude) | List of texts | ➖ | Restricts synchronization to specific paths (format: Drive/Folder/Subfolder) |
Paths to exclude (pathsToExclude) | List of texts | ➖ | Excludes specific paths from synchronization |
MIME types to exclude (excludedMimeTypes) | List of texts | ➖ | MIME types to ignore (e.g. image/png, application/zip) |
💡 Fields marked ✅ are required for the connector to work.
Prerequisites
Before configuring the connector in Wikit Connect:
- A Google Cloud project with Google Drive API enabled.
- A service account dedicated to synchronization.
- A JSON key for that service account.
- Read access to the Drive content that must be synchronized.
Get the Required Information from Google Cloud
1) Create or select your Google Cloud project
- Open Google Cloud Console.
- Select an existing project or create a new one.
2) Enable Google Drive API
- Go to APIs & Services > Library.
- Search for Google Drive API.
- Click Enable.
3) Create the service account
- Go to IAM & Admin > Service Accounts.
- Click Create Service Account.
- Set a clear name (e.g.
wikit-google-drive-sync) and confirm. - You can leave Google Cloud IAM roles empty for this use case (actual access is granted by Drive sharing).
4) Generate the JSON key and extract values for the connector
- Open the created service account.
- Go to the Keys tab.
- Click Add Key > Create new key > choose JSON.
- Download the JSON file.
- In this JSON file:
client_email-> value to put inserviceAccountEmailprivate_key-> value to put inkey
5) Grant Google Drive access to the service account
- Copy the service account email (
client_email). - In Google Drive, share folders/files/Shared Drives with this email.
- Grant at least Viewer access.
6) Get sharedDriveIds (optional)
- Open a Shared Drive in Google Drive.
- Copy its identifier from the URL.
- Put this ID in
sharedDriveIdsif you want to limit synchronization to specific Shared Drives.
7) Quick validation before connector setup
- Check that Google Drive API is enabled in the correct project.
- Check that the JSON key belongs to the expected service account.
- Check that the service account is shared on all required content.
How the Connector Works
The Google Drive connector runs in smart synchronization mode (smart sync):
- Change detection: it inserts, updates, or removes documents by comparing current Drive content with already indexed content.
- Scanned scope:
- if Shared Drives are accessible, the connector scans them (or only those listed in
sharedDriveIds), - otherwise, it scans all files accessible to the service account (for example items shared in "My Drive").
- if Shared Drives are accessible, the connector scans them (or only those listed in
- Path filters:
pathsToIncludeandpathsToExcludelet you narrow the indexed scope. - MIME filter:
excludedMimeTypeslets you ignore specific file types. - Google Workspace export:
- Google Docs ->
.docxexport - Google Sheets ->
.xlsxexport - Google Drawings ->
.pdfexport
- Google Docs ->
- Unsupported types: some file types are ignored (e.g. Google Forms, Google Sites, Google Maps, MP4, PPTX, MS Project).
FAQ
How can I find a Shared Drive ID?
Open the Shared Drive in Google Drive. The ID is visible in the URL, after /drives/.
Example: https://drive.google.com/drive/folders/xxxxxxxx?driveId=0AEXAMPLEabcUk9PVA
The expected ID is usually the driveId value (or the identifier after /drives/, depending on the displayed URL format).
What format should I use for include/exclude paths?
Use readable paths without a leading slash, for example: HR Team/PoliciesIT Department/Procedures/Run
Paths are matched by folder names, including subfolders.
Why do I get no documents even if the connection test is successful?
Check the following:
- Files/folders are actually shared with the service account email.
- Configured
sharedDriveIdsare correct and accessible by this account. pathsToInclude,pathsToExclude, orexcludedMimeTypesdo not exclude your whole scope.- Expected files are not part of unsupported file types.