OptimiDoc Server Help Center

Google Drive

The Google Drive print connector turns a Google Drive folder into a browsable print source. A signed-in user opens the connector at the device panel, browses Drive, and selects a document -- OptimiDoc downloads it on demand (exporting Google Docs, Sheets, and Slides to PDF), and prints it as a job owned by that user. Access is granted once via OAuth 2.0.


https://optimidoc.atlassian.net/wiki/download/attachments/42729558/connector-google-drive.png?api=v2

Screenshot: Google Drive connector configuration

Overview

The Google Drive connector is a browse-on-demand print source, not a background watcher. OptimiDoc does not poll Drive or copy files automatically. The connector appears in the list of print sources on the device; the user browses the folder, picks a file, and only then is it downloaded and printed. The file stays in Drive untouched.


How It Works

  1. The user authenticates at an OptimiDoc-enabled device and opens the Google Drive connector.

  2. OptimiDoc uses the connector's stored OAuth token to list the folder via the Google Drive API.

  3. The user browses and selects one or more documents.

  4. Each file is downloaded on demand. Google-native documents (Docs, Sheets, Slides) are exported to PDF; other files are converted to PDF if needed.

  5. A print job is created, owned by the signed-in user, and released through the rules engine and quota checks.


Configuration

  1. Navigate to Printing > Print Connectors and click Add Connector.

  2. Enter a Name and select Google Drive from the Type dropdown.

  3. On the Configuration tab, complete the settings below.

Configuration Settings

Setting

Description

Client ID

Optional. Leave empty to use OptimiDoc's built-in Google application (limited to files opened or created through OptimiDoc). Supply your own OAuth client to browse the full Drive.

Client Secret

Optional. The secret paired with a custom Client ID. Stored encrypted.

Folder

The Drive folder to browse (e.g. MyFolder). Leave empty to start at My Drive.

Note: From the release following 26.07 the connector form no longer shows a Service Account Email field; Google Drive access uses OAuth 2.0 only. In 26.07 and earlier the form displayed a Service Account Email field that had no effect.

  1. On the Access Rights tab, assign the connector to one or more Groups.

  2. Click Save, then authorise the connection (below).

Custom OAuth Client (optional)

To browse the full contents of a Drive rather than only OptimiDoc-created files, register your own client in the Google Cloud Console: create an OAuth 2.0 Client ID of type Web application, add the OptimiDoc callback to the authorised redirect URIs, enable the Google Drive API, and paste the resulting Client ID and Client Secret into the connector.

Authorising the Connection

  1. Reopen the saved connector by clicking its row.

  2. In the OAuth Authorization card, click Authorize.

  3. Sign in to Google and grant access. The status then shows Authorized.

Use Re-authorize to refresh tokens, or Revoke authorization to clear them locally.


Troubleshooting

Issue

Resolution

Connector shows Unauthorized

Open the connector and click Authorize; use Re-authorize if a previous token was revoked.

Only some files are visible

With the built-in app, only files opened or created via OptimiDoc are accessible. Supply a custom Client ID/Client Secret for full-Drive browsing.

A document will not print

Ensure the Google Drive API is enabled for a custom client. Check the OptimiDoc log for export or conversion errors.


Related articles