
Google Drive
Cloud storage and file management
✅ Ready📖 Documentation Available
Configuration Guide
Enterprise Setup
Enterprise Setup
Overview
The Google Drive connector allows you to access, manage, and synchronize files and documents stored in Google Drive.Google Drive is Google’s cloud storage service that provides access to files, folders, and documents including Google Docs, Sheets, and Slides. This connector enables synchronization of Drive content and associated documents.Authentication
The Google Drive connector uses OAuth 2.0 for authentication. This requires users to grant permission for the application to access their Google Drive data within the scopes specified.How to configure and enable the Google Drive Connector
Step 1: Create a Google Cloud Project & Set Up Admin Access
-
Sign in as Super Administrator:
Log in to the Google Cloud Console using an account with super administrator privileges. -
Create a New Project:
- Click on the project dropdown at the top of the console and select New Project
- Enter a project name and (optionally) assign it to a folder or organization
- Click Create

Only the project creator has full control by default. It is recommended to add at least one additional administrator (using the IAM settings) to ensure continued access even if the original creator leaves your organization.
Step 2: Enable Required APIs
- Navigate to APIs & Services > Library in the Cloud Console
-
Search for and enable the following APIs required for Google Drive sync:
- Google Drive API (required for Drive file access)
- Google Docs API (required for Google Docs files)
- Google Sheets API (required for Google Sheets files)
- Google Slides API (required for Google Slides files)
- Admin SDK API (required for domain-wide delegation)

Step 3: Create a Service Account
- Navigate to IAM & Admin > Service Accounts in the Cloud Console
- Click Create Service Account

- Enter a Service Account Name and an optional Description
- Click Create and Continue, then Done

- Copy the Unique ID for use in the next step

Step 4: Delegate Domain-Wide Authority
- Sign in to the Google Admin Console with a super administrator account
- Navigate to Security > Access and data control > API controls
- Click Manage Domain Wide Delegation
- Click Add new and paste the service account’s client ID
- Add the following OAuth scopes required for Google Drive sync:
These scopes are required for Google Drive synchronization:
drive.readonly: Read-only access to Drive filesdrive.metadata.readonly: Read-only access to Drive file metadatadrive.metadata: Access to Drive file metadatadrive.file: Access to files created by the appdrive: Full access to Drive filesdocuments.readonly: Access to Google Docs filesspreadsheets.readonly: Access to Google Sheets filespresentations.readonly: Access to Google Slides files- Admin scopes: Required for domain-wide delegation
- Click Authorize
Domain-wide delegation lets your service account impersonate users within your domain. Make sure that both the service account and the end user email belong to the same domain.
Step 5: Create a JSON Key for the Service Account
- In the Service Accounts list, select your newly created service account
- Click on the Keys tab
- Click Add Key and select Create new key
- Choose JSON as the key type and click Create
- Save the automatically downloaded JSON key file
It might be that while creating the key you get the error:
In this case, follow the steps given under the heading Enable Service Account Key Creation.
If your key was successfully created and downloaded, you can use that key in the enterprise search application.

If your key was successfully created and downloaded, you can use that key in the enterprise search application.
Configuring and enabling connector
- Navigate to Workspace Settings > Under Workspace section in sidebar > Connectors in your application.

- Search for the Drive Workspace connector and click on Setup to configure a connector instance.

- In the configuration dialog that opens:
- Enter an Instance Name for your connector (e.g., “Company Drive”)
- Enter the Admin Email (Admin user’s email with which you created the Google Cloud credentials)
- Select the JSON key file to upload
- Click on the Next button to save the configuration and move to configure connector settings page. You can learn about the connector settings in the Connector Settings section.

- After configuring connector settings, you can click on Save Configuration.

Enable Service Account Key Creation
If you encounter an error while creating the service account key due to organization policy constraints, follow these steps:1. Switch to the Organization Context
At the top of the Google Cloud Console (where the project name is shown), click the drop-down to see a list of organizations and projects.Select your organization rather than a specific project.If you don’t see an organization listed, make sure you’re signed in with an account that has access to the organization.2. Add Organisation Policy Administrator Role
Navigate to IAM & Admin > IAM in the Cloud ConsoleFind the current user and Click on the Pencil icon.Click on the Add another role button.Search for the Organisation Policy Administrator role.Click on the Add button.
3. Disable the Service Account Key Creation constraint
Navigate to IAM & Admin > Organization Policies in the Cloud ConsoleSearch for"iam.disableServiceAccountKeyCreation"Select the policyClick on the Manage Policy buttonIn Policy source, Select Override parent’s policy. Add a rule and set the enforcement to “Off”Click on the Save buttonAfter completing these steps, return to Step 5 and try creating the service account key again.Google PubSub Configuration
PubSub setup enables real-time updates for Google Drive content. While optional, it’s highly recommended for maintaining up-to-date content in Enterprise search.Step 1: Set Up a Cloud Pub/Sub Topic
- Navigate to Pub/Sub > Topics in the Cloud Console sidebar
- Click Create Topic
- Enter a unique name (e.g.,
projects/your-project-id/topics/drive-webhook-topic) - Check “Add a default subscription”
- Click Create to confirm

Step 2: Configure the Subscription
- Go to Pub/Sub > Topics
- Select the subscription created with the topic
- Click Edit
- Change Delivery type to “Push”
- Set Endpoint URL as “your_base_url/drive/webhook”
- Adjust Expiry Period as needed
- Click Update
Step 3: Set Topic Permissions
- In Pub/Sub > Topics, select your topic
- Open the Info Panel (right side)
- Click Add Principals
- Add
drive-api-push@system.gserviceaccount.com - Assign the Pub/Sub Publisher role

- Click Save
If you encounter an organizational policy constraint error, modify the policy in organizational policies to allow the given domain. Allow 5-10 minutes for changes to propagate.
Individual Setup
Individual Setup
Overview
The Google Drive connector allows you to access, manage, and synchronize files and documents stored in Google Drive.Google Drive is Google’s cloud storage service that provides access to files, folders, and documents including Google Docs, Sheets, and Slides. This connector enables synchronization of Drive content and associated documents.Authentication
The Google Drive connector uses OAuth 2.0 for authentication. This requires users to grant permission for the application to access their Google Drive data within the scopes specified.Step 1: Create a Google Cloud Project
- Access the Google Cloud Console
- Create a project (if you don’t have one)
- Note your project ID for later use
Step 2: Enable Required APIs
- Navigate to APIs & Services > Library in the Cloud Console
- Search for and enable the following APIs required for Google Drive sync:
- Google Drive API (required for Drive file access)
- Google Docs API (required for Google Docs files)
- Google Sheets API (required for Google Sheets files)
- Google Slides API (required for Google Slides files)

Step 3: Configure OAuth Consent Screen
- Navigate to APIs & Services > OAuth consent screen in the Cloud Console
- Configure the OAuth consent screen with your application details
- Add the required scopes (see Step 5)
Step 4: Create OAuth Client ID
- Navigate to APIs & Services > Credentials in the Cloud Console
- Click Create Credentials and select OAuth client ID
- Select Web application as the application type
- Set the Authorized redirect URI to:
or for HTTPS:
- Click Create and note your Client ID and Client Secret
Redirect URI must match exactly your frontend URL. For example: if your app is
running on https://f7f0-240.ngrok-free.app then redirect URI should be
https://f7f0-240.ngrok-free.app/connectors/oauth/callback/Drive
in Google Cloud Console.
Step 5: Configure OAuth Scopes
- In the OAuth consent screen, navigate to the Scopes section
- Add the following OAuth scopes required for Google Drive sync:
https://www.googleapis.com/auth/drive.readonly- Read-only access to Drive fileshttps://www.googleapis.com/auth/drive.metadata.readonly- Read-only access to Drive file metadatahttps://www.googleapis.com/auth/drive.metadata- Access to Drive file metadatahttps://www.googleapis.com/auth/documents.readonly- Read Google Docs fileshttps://www.googleapis.com/auth/spreadsheets.readonly- Read Google Sheets fileshttps://www.googleapis.com/auth/presentations.readonly- Read Google Slides fileshttps://www.googleapis.com/auth/drive.file- Access to files created by the apphttps://www.googleapis.com/auth/drive- Full access to Drive files
These scopes allow the connector to:
- Access and read files from Google Drive
- Access file metadata for indexing and search
- Access Google Docs, Sheets, and Slides files stored in Drive
Configuring and enabling connector
- Navigate to Workspace Settings > Under Personal section in sidebar > Your Connectors in your application.

- You will see a list of connectors with Individual Setup.

- Search for the Drive connector and click on Setup to configure a connector instance.
-
In the configuration dialog that opens:
- Enter an Instance Name for your connector (e.g., “My Drive”)
- Enter the Google Client ID from your Google Cloud Console
- Enter the Google Client Secret from your Google Cloud Console
-
Click on the Next button to save the configuration and move to Authorize page.

Configuring OAuth App can only be performed by Admins. If you are not an Admin, you must request an Admin to configure the OAuth App for you. You can then access configured OAuth Apps via a dropdown menu.
-
In the Authorize page that opens:
- Click on Authenticate Drive to Proceed button
- You will be redirected to Google’s consent screen where you need to sign in and grant permission for Google Drive and related document access

- After giving consent, you can click on Continue to configuration to configure connector settings. You can learn about the connector settings in the Connector Settings section.
- After configuring connector settings, you can click on Save Configuration.

For setting up Google PubSub notifications, see the Google PubSub Configuration section earlier in this Enterprise Setup guide.
Connector Settings
Connector Settings
Sync Settings
Sync settings allow you to control how the connector syncs data from Google Drive.Sync Strategy:- Scheduled - The connector will automatically sync data from Google Drive at the scheduled interval.
- Manual - The connector will sync data from Google Drive only when Admin manually triggers the sync from the connector settings page.
Sync Filters
Sync filters control which files are fetched from Google Drive. Files that don’t match are skipped entirely. The Created Date, Modified Date and Sync Files with Extensions filters always let folders through, so the folder structure is kept. Folder IDs works the other way: see below.Folder IDs
Syncs only the folders you list, and everything inside them. Anything outside the listed folders is skipped, including other folders and everything under them. To find a folder’s ID, open the folder in Google Drive: the ID is the last part of the address,drive.google.com/drive/folders/<FOLDER_ID>.Before each sync, the connector checks that each listed folder can be read:- A folder that was deleted, that the connected account can’t see, or that Google refuses with a known permission error, is left out, and the rest of the sync carries on.
- A quota or rate-limit error that outlasts the retries, a Google outage, a network error or another HTTP error fails that sync run instead of quietly leaving the folder’s files out. The next run starts from the same point.
- An access error (HTTP 403) that gives no reason PipesHub recognises is counted. On runs 1 to 4 in a row it fails the sync, and the next run tries again. On the fifth, the folder is left out of that run’s scope and the rest of the sync carries on, once no other listed folder is still on its first four runs. Your saved Folder IDs list isn’t changed: the folder is tried again on every later run, new changes inside it sync once it can be read, and a full sync brings in what it already held. On Workspace, a folder only fails a run, or counts toward the five, when no synced user can read it. See the FAQ below for details.
Created Date
Filters files by when they were created. Accepts operators likeLast 365 Days, Is After, Is Before, or Is Between for a specific range.For example, set Last 365 Days to fetch only files created in the last year.Modified Date
Same as Created Date but filters by the file’s last modified timestamp. UseLast 30 Days or Is After to limit sync to recently updated files.Sync Files with Extensions
Filters files by type. It supports 2 options:In (only sync the listed types) or Not In (sync everything except the listed types). After choosing the option, pick the types from the list: google docs, google sheets and google slides for Google’s own formats, and file extensions such as .pdf or .docx for everything else. Folders are always synced, whatever you pick.Unsupported extensions are excluded under
In and allowed through under Not In.Indexing Filters
Indexing filters control which synced files are made searchable. Unlike sync filters, these don’t prevent files from being fetched — files are still recorded in the system but their indexing status is set to Manual Indexing.They can be manually indexed later from the All Records section.Manual Indexing
When enabled, files are synced but not automatically indexed. They won’t appear in search results until explicitly indexed.This can allow you to explicitly control which files and folders are indexed for search, by going to the All Records section and indexing the records manually.To index records manually go to the All Records section, go to a record, click on the 3 dots > Start Indexing.Index Shared Items
When enabled, files shared with others are indexed alongside personal files. Disable this to exclude shared content and index only files that are not shared with others.Index Shared with Me
When enabled, files that others have shared with the user are indexed. Disable this to exclude externally shared content and index only files the user owns or created. (Only available for Enterprise setup)Index Shared by Me
When enabled, files the user has shared with others are indexed. Disable this to exclude content the user has shared outward and index only their private or unshared files. (Only available for Enterprise setup)FAQ
What's the difference between Drive Connector and Drive Toolset?
What's the difference between Drive Connector and Drive Toolset?
Example: Use Drive Connector to search and retrieve document content. Use Drive Toolset to let agents create folders and manage file organization.
Sync keeps failing on one folder that Google Drive refuses. What happens?
Sync keeps failing on one folder that Google Drive refuses. What happens?
Sometimes Google Drive refuses a folder with an access error (HTTP 403) that gives no reason PipesHub recognises. This can happen to a folder you listed under Folder IDs, or to a folder shared with one of the synced users. Normally a failed check fails the sync so that no files are skipped for good. An unrecognised 403 that keeps coming back is the one exception: PipesHub doesn’t let one such folder stop the connector for good.Runs 1 to 4: nothing is skipped, and the next run tries again from the same point. What stops depends on the folder:
- On a personal Drive, any refused folder, whether under Folder IDs or shared with you, fails the whole sync run.
- On Workspace, a folder under Folder IDs is tried by the other synced users too. The run fails, and the folder counts a run, only if none of them can read it.
- A folder shared with one user on Workspace stops only that user’s sync. Everyone else’s files sync and their progress is saved.
- When several folders are refused in the same run, they are counted together.
- A folder under Folder IDs is left out of that run’s scope; your saved Folder IDs list isn’t changed. The folder is tried again on every run. Once it can be read, new changes inside it sync again, and a full sync brings in the files it already held.
- A folder shared with a user is kept as a folder, but its contents aren’t synced. It isn’t tried again on later runs, which stay incremental. To bring its files in, check that it is still shared with that user, then start a full sync of the connector. If Google still refuses the folder, that full sync starts the five runs again.
Queries not returning results. What could be wrong?
Queries not returning results. What could be wrong?
There are three common causes:
-
Email mismatch - The email used during connector authentication doesn’t match your PipesHub account email. This causes permission issues preventing you from accessing synced data.
- Fix: Reconfigure the connector and authenticate using the same email as your PipesHub account.
-
Records show in “All Records” but not in search - Documents display in the All Records section but don’t appear in search query results.
- Fix: Verify sync filters in the connector settings and ensure indexing has completed. Check that the data matches your search query criteria.
-
Data not yet indexed - The connector is still syncing or hasn’t completed the initial indexing process.
- Fix: Go to Settings > Connectors, check the sync status, and wait for indexing to complete.
Ready to Get Started?
The Google Drive connector is fully operational and ready for use. Follow the configuration guide above for your setup type (Enterprise or Individual), or reach out to our support team if you need assistance.