Skip to content

Google Drive Connector

Connector Configuration

The Google Drive connector synchronizes documents accessible by a Google service account to Wikit Semantics.

Field nameFormat / TypeRequiredComment
Service account email (serviceAccountEmail)EmailEmail 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 textsList of Shared Drive IDs to synchronize. If empty, all accessible Shared Drives are scanned
Paths to include (pathsToInclude)List of textsRestricts synchronization to specific paths (format: Drive/Folder/Subfolder)
Paths to exclude (pathsToExclude)List of textsExcludes specific paths from synchronization
MIME types to exclude (excludedMimeTypes)List of textsMIME 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:

  1. A Google Cloud project with Google Drive API enabled.
  2. A service account dedicated to synchronization.
  3. A JSON key for that service account.
  4. 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

  1. Open Google Cloud Console.
  2. Select an existing project or create a new one.

2) Enable Google Drive API

  1. Go to APIs & Services > Library.
  2. Search for Google Drive API.
  3. Click Enable.

3) Create the service account

  1. Go to IAM & Admin > Service Accounts.
  2. Click Create Service Account.
  3. Set a clear name (e.g. wikit-google-drive-sync) and confirm.
  4. 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

  1. Open the created service account.
  2. Go to the Keys tab.
  3. Click Add Key > Create new key > choose JSON.
  4. Download the JSON file.
  5. In this JSON file:
    • client_email -> value to put in serviceAccountEmail
    • private_key -> value to put in key

5) Grant Google Drive access to the service account

  1. Copy the service account email (client_email).
  2. In Google Drive, share folders/files/Shared Drives with this email.
  3. Grant at least Viewer access.

6) Get sharedDriveIds (optional)

  1. Open a Shared Drive in Google Drive.
  2. Copy its identifier from the URL.
  3. Put this ID in sharedDriveIds if you want to limit synchronization to specific Shared Drives.

7) Quick validation before connector setup

  1. Check that Google Drive API is enabled in the correct project.
  2. Check that the JSON key belongs to the expected service account.
  3. 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").
  • Path filters: pathsToInclude and pathsToExclude let you narrow the indexed scope.
  • MIME filter: excludedMimeTypes lets you ignore specific file types.
  • Google Workspace export:
    • Google Docs -> .docx export
    • Google Sheets -> .xlsx export
    • Google Drawings -> .pdf export
  • 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:

  1. Files/folders are actually shared with the service account email.
  2. Configured sharedDriveIds are correct and accessible by this account.
  3. pathsToInclude, pathsToExclude, or excludedMimeTypes do not exclude your whole scope.
  4. Expected files are not part of unsupported file types.