Documentation

Enabling Document Creation and Editing with Google Drive

Liferay DXP provides integration with Google Drive so you can create and edit Google Docs, Sheets, and Slides via the Documents and Media application. When adding or editing one of these document types, you’re redirected to Google’s external editor where you can compose your file.

Create Docs, Sheets, and Slides via Document.

Note

This integration can be enabled globally (i.e., for all portal instances in a DXP installation), or for individual instances. Configurations at an instance level override global configurations.

Prerequisites

Enabling Liferay’s Google Drive integration requires an active Google Project with the Google Drive API enabled and OAuth 2 properly configured. To set up OAuth 2, configure an OAuth consent screen, generate OAuth 2 credentials, and add the Liferay request URIs to the list of authorized URIs for the OAuth Client.

When generating OAuth 2 credentials, ensure you’ve selected Web application for the application type. Once generated, you’ll need the credential’s client ID and client secret for configuring Documents and Media.

Please consult Google Cloud documentation if needed:

Once your Google Project is ready, you can configure Liferay’s Documents and Media application.

Configuring Documents and Media

Follow these steps to enable Liferay’s integration with Google Drive.

  1. Open the Global Menu (Global Menu), click on the Control Panel tab, and go to System SettingsDocuments and Media.

  2. Click on Google Drive under Virtual Instance Scope.

    Click on Google Drive under Virtual Instance Scope.

  3. Enter the Google Project’s OAuth 2 client ID and client secret.

    Note

    The Google Picker API enables users to select photos, videos, maps and documents stored in Google from Liferay. It is only necessary when using Liferay’s Plugin for Google Drive. See Enabling Links to Google Drive Documents for more information.

  4. Click on Save.

Once enabled, authorized users can create Google Docs, Slides, and Sheets via Documents and Media.

Note

To disable this feature, click on the Actions button for Google Drive, and select Reset Default Values.