Skip to content

Google Drive

Who can do this: repository admins, and a Google Workspace super admin.

The Google Drive connector reads Google Workspace shared drives and users’ My Drives. Available on every plan. It only ever reads; Drive’s sharing plays no part in who sees what here.

Plan Every plan
Reads Google Workspace shared drives the crawl user is a member of, and users’ My Drives (read as their owner) in the bound domain; Docs, Sheets, Slides and Drawings as DOCX, XLSX, PPTX and PDF
Does not read Forms, Sites, maps and shortcuts; consumer Google accounts; users of other domains; files whose owners blocked downloads; Drive sharing
Reaches it through ContentSurface’s own service account, authorized by your super admin under domain-wide delegation with read-only scopes, within the domain a super admin bound by signing in with Google
Limits Google exports at most about 10 MB per Google file. No key of yours is created or held

Limits common to every connector — indexed text per document, file size for extraction, OCR — are in Connectors.

ContentSurface’s client ID, shown on the connection page, authorized under domain-wide delegation with these two scopes, both required:

https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/admin.directory.user.readonly

The first reads Drive. The second confirms that the person who binds your domain is a super admin, and re-checks it every hour. It also lists your users’ My Drives, which Google allows the crawl user only with contact sharing on (Admin console, Directory → Directory settings → Sharing settings). It is off in new Workspaces and can take a few hours to apply. Otherwise you type the owner’s address.

You create no Google Cloud project and no key.

  1. Create a crawl user, such as cs-crawler@yourdomain.com, with no admin role, and add it as a Viewer to each shared drive to connect. Shared drives it is not a member of stay out of reach. A My Drive is read as its owner.
  2. Once the connection exists: in the Admin console, Security → Access and data control → API controls → Manage Domain Wide Delegation → Add new, paste the connection page’s client ID and the scopes.

A Google Drive connection’s Google Workspace section: crawl user, client ID, scopes and the bound domain

  1. Connections → New connection: Google Drive, a name and the crawl user.
  2. Copy the client ID and the scopes from the connection page into the delegation (above).
  3. Bind with Google: a super admin of the Workspace signs in with their own Google account. The domain is taken from that sign-in; the crawl user must belong to it. You may pass the sign-in link to the super admin; it works for 30 minutes.
  4. Check.
  5. New mount point: a shared drive or a user’s My Drive from the list, a folder in it, or a folder’s Drive address. A My Drive not in the list is typed as its owner’s address (owner@yourdomain.com), a folder in it as owner@yourdomain.com/<folder address>.
  6. Mount it, preview, and activate.

The connection’s Next steps track these steps and show the Workspace steps until the check passes; a shared drive the crawl user is not a member of shows there as a mount folder whose location is empty or not found. Several workspaces may bind the same Google domain, each by its own super admin’s sign-in.

Docs, Sheets, Slides and Drawings are delivered as DOCX, XLSX, PPTX and PDF, up to about 10 MB each. Changes are picked up every few minutes.

Check says Fix
No domain bound (connection.binding_missing) A super admin binds it: Bind with Google.
Binding lapsed (source.binding_lapsed) The super admin who bound the domain was deleted, suspended or is no longer a super admin. A current super admin binds it again.
Delegation missing The client ID is not yet authorized for both scopes.
Authentication failed The crawl user does not exist. A suspended crawl user is still accepted by Google.
Settings invalid The crawl user is not in the bound domain.

A binding sign-in that does not complete says why on the connection page: an account that is not a super admin, another domain than the crawl user’s, a suspended account, or the delegation missing.

Files whose owners blocked downloads for viewers (Share → ⚙, Commenters and viewers unticked) show as access denied. Google may refuse a new Google file for a while after it is created; it is tried again later by itself.

Remove the client ID from domain-wide delegation: no ContentSurface workspace reads your Drive any more. Unbind or delete the connection to stop just that one. Either takes full effect within an hour, as Google keeps access it has already granted until it expires. Suspending the crawl user does not stop it. There is no key to delete.

In the API

The Portal does this through these calls; an integration can make them directly.

OperationCall
Creates a connection; its connector type and source location are fixed.POST /v1/admin/connections
A Google Drive connection's domain binding, with the client ID and scopes to authorize under domain-wide delegation.GET /v1/admin/connections/{id}/binding
A Google sign-in link with which a super admin of the Workspace binds its domain to a Google Drive connection; valid for 30 minutes.POST /v1/admin/connections/{id}/binding
Unbinds a Google Drive connection's Workspace domain: the connection stops reading until a super admin binds it again.DELETE /v1/admin/connections/{id}/binding
Tests reachability and authentication of the source.POST /v1/admin/connections/{id}/check
Where browsing starts: the connector's source roots.GET /v1/admin/connections/{id}/source-roots
The child containers of a source location, for choosing a mount point.GET /v1/admin/connections/{id}/browse
Validates a location through the connector and creates a mount point on it.POST /v1/admin/connections/{id}/mount-points