Alfresco Documentation
Published on Alfresco Documentation (https://docs.alfresco.com)

Home > Alfresco Content Services 5.2.7 > Installing > Installing integrations > Installing and configuring Google Docs Integration

Installing and configuring Google Docs Integration

Google Docs Integration allows you to use Google Docs to edit document content stored in Alfresco Content Services, as an alternative to the online and offline editing capabilities in Alfresco Share.

When you use the setup wizards to install Alfresco Content Services, the Google Docs Integration feature is applied and enabled for supported content in an installation.

If you install manually, you need to apply the Google Docs AMP files separately to enable the feature.

With Google Docs Integration, you'll see new actions for creating documents, spreadsheets, and presentations. Also, you'll see an action called Edit in Google Docs on all supported document types.

Note: When configuring Google Docs Integration with Alfresco Content Services, you don't need to identify a 'system' Google account.
  • Installing Google Docs Integration manually [1]Google Docs Integration is installed by default when you install Alfresco Content Services using the setup wizards. If you are installing manually, use these steps to install Google Docs Integration.
  • Configuring Google Docs Integration [2] There are two ways to configure the Google Docs Integration: modify the properties in alfresco-global.properties or update the settings in the Google Docs Console of the Admin Console (Enterprise-only).
  • Google Docs supported document types [3]Google Docs restricts the formats of files or documents that can be uploaded or created.
Parent topic: Installing integrations [4]

Installing Google Docs Integration manually

Google Docs Integration is installed by default when you install Alfresco Content Services using the setup wizards. If you are installing manually, use these steps to install Google Docs Integration.
  1. Browse to the Support Portal [5], and download the following files:

    alfresco-googledocs-repo-3.0.4.x-ent.amp This AMP contains the Google Docs functionality that is applied to the core repository. The AMP should be applied to the tomcat/webapps/alfresco directory.
    alfresco-googledocs-share-3.0.4.x-ent.amp This AMP file contains the additional Google Docs functionality that is applied to an existing Alfresco Share user interface. The AMP should be applied to the tomcat/webapps/share directory.
  2. Change into the root of the Alfresco Content Services installation directory. Directories specified in the following procedures are relative to this directory (<installLocation>).
  3. Move the alfresco-googledocs-repo-3.0.4.x-ent.amp file to the amps directory.
  4. Move the alfresco-googledocs-share-3.0.4.x-ent.amp file to the amps_share directory.
  5. Stop the Alfresco Content Services server.
  6. Delete the tomcat\webapps\alfresco and tomcat\webapps\share folders in the installation directory.
  7. Use the Module Management Tool (MMT) to install the AMP files into the relevant WAR file:

    For Alfresco Content Services repository:

    java -jar <installLocation>\bin\alfresco-mmt.jar install <installLocation>\amps\alfresco-googledocs-repo-3.0.4.x-ent.amp <installLocation>\tomcat\webapps\alfresco.war

    For Alfresco Share:

    java -jar <installLocation>\bin\alfresco-mmt.jar install <installLocation>\amps_share\alfresco-googledocs-share-3.0.4.x-ent.amp <installLocation>\tomcat\webapps\share.war  

    Alternatively, if your installation is running in the Tomcat application server, you can use the <installLocation>\bin\apply_amps command to apply all AMP files that are located in both the amps and amps_share directories.

    Install both Google Docs AMP files at the same time by using the apply_amps command:

    • Linux: bin/apply_amps.sh
    • Windows: bin\apply_amps.bat

    The apply_amps command checks the version of Alfresco Content Services so that you install the relevant AMP package to the correct version.

  8. Start the server.
Parent topic: Installing and configuring Google Docs Integration [6]

Configuring Google Docs Integration

There are two ways to configure the Google Docs Integration: modify the properties in alfresco-global.properties or update the settings in the Google Docs Console of the Admin Console (Enterprise-only).

Enterprise-only releases: For advanced configuration, you can customize how Google accounts are authenticated. See Authenticating Google accounts with Alfresco Content Services [7] for more information.

  • Configuring Google Docs using properties [8] The following properties can be configured for Google Docs Integration in the alfresco-global.properties file.
  • Configuring Google Docs using Admin Console [9] The Google Docs Console provides the settings for enabling and controlling Google Docs Integration.
  • Authenticating Google accounts with Alfresco Content Services [7] In Enterprise-only releases, you can register a custom Google configuration for API access.
Parent topic: Installing and configuring Google Docs Integration [6]

Configuring Google Docs using properties

The following properties can be configured for Google Docs Integration in the alfresco-global.properties file.
googledocs.enabled
Enables the Google Docs functionality. By default, this property is set to true. If you set this option to false, the Edit in Google Docs action will not be available. Documents that are currently being edited will still be available using the Resume editing in Google Docs action until they are saved or discarded.
googledocs.idleThresholdSeconds
Sets the idle time threshold in seconds. Additional Google users that you invite to collaborate on the document will be considered to be 'idle' after this period. The period is measured from the time when the user last made a change to the document. When saving documents back to Alfresco Content Services, or discarding changes, you must confirm that you want to disconnect any non-idle users before the action completes.
Note: Enterprise-only releases: You can also set these properties in the Admin Console. See Configuring Google Docs using Admin Console [9] for more.
Parent topic: Configuring Google Docs Integration [2]

Configuring Google Docs using Admin Console

The Google Docs Console provides the settings for enabling and controlling Google Docs Integration.
  1. Open the Admin Console.
  2. In the Consoles section, click Google Docs Console.
  3. Set the properties:

    Google Docs property Example setting What is it?
    googledocs.enabled true Enables the Google Docs functionality.

    If you set this option to false, the Edit in Google Docs action will not be available. Documents that are currently being edited will still be available using the Resume editing in Google Docs action until they are saved or discarded.

    googledocs.idleThresholdSeconds 600 Sets the idle time threshold in seconds.

    Additional Google users that you invite to collaborate on the document will be considered to be 'idle' after this period. The period is measured from the time when the user last made a change to the document. When saving documents back to Alfresco Content Services, or discarding changes, you must confirm that you want to disconnect any non-idle users before the action completes.

  4. Click Save to apply the changes you have made to the properties.

    If you do not want to save the changes, click Cancel.

Parent topic: Configuring Google Docs Integration [2]

Authenticating Google accounts with Alfresco Content Services

In Enterprise-only releases, you can register a custom Google configuration for API access.

When this configuration is added to the Google Docs Integration, you can define the OAuth flow by creating your own web application configuration in the Google API Manager.

  1. Place google-auth-return.html [10] on a web server that's accessible by all users.

    This file lets users authenticate their Google account with Alfresco Content Services.

  2. Register the Google Docs Integration from the Google API Manager: https://console.developers.google.com [11].

    Check that you have enabled the Google Drive API.

  3. Click Library in the left-hand navigation, select Drive API, and then Enable.

    This allows your registered application to access the Drive API.

  4. Click Credentials, select Create Credentials, and then pick OAuth client ID from the list.
  5. Click Configure consent screen, complete the required fields, and then select Save.
  6. Select Web Application as the application type.
  7. Enter a name for your application.

    This is what the application will be known as in your users Google Account.

  8. Enter a path in the Authorized redirect URIs field.

    This is the path to the google-auth-return.html page.

  9. Click Create.

    You may be see a popup showing your Client ID and Secret. If so, click OK.

  10. Navigate to your registered application by selecting the name.
  11. Click Download JSON.

    Next, use the Repository Administration Console to add your custom configuration.

  12. Open Alfresco Share, and click Admin Tools on the toolbar, then select Repository Administration Console.
  13. In the Consoles section, click Google Docs Console.
  14. Copy the content of the JSON file into the Google Docs OAuth Config field.
  15. Click Save.

    Important: Before completing these steps, be aware that:
    • If there are files currently being edited in Google Docs when changing this configuration, it will cause users to lose the ability to use the Check in action to bring those files back into Alfresco Content Services. We recommend that all files are checked back into Alfresco Content Services before switching the configuration.
    • Switching the integration repeatedly between different configurations can corrupt the Google authentication store in Alfresco Content Services for your users. If this happens, users will need to remove access to the integration from their Google Account so that their connection can be set up again.
Parent topic: Configuring Google Docs Integration [2]

Google Docs supported document types

Google Docs restricts the formats of files or documents that can be uploaded or created.

The following table shows the file format restrictions for content that integrates with Google Docs.

File type Description
DOC A Microsoft Word 97-2003 document.
XLS A Microsoft Excel 97-2003 Workbook.
PPT A Microsoft PowerPoint 97-2003 Presentation.
DOCX An XML-based Microsoft Word document.
XLSX An XML-based Microsoft Excel Workbook.
PPTX An XML-based Microsoft PowerPoint presentation.
Note: You can edit the DOC, XLS, and PPT formats in Google Docs but when you save the content back to Alfresco Content Services, you must confirm that these formats will be converted to the equivalent Microsoft Office 2007 (OOXML) formats.

Google places further restrictions on the size and complexity of documents that can be edited in Google Docs. The Edit in Google Docs action is not available for documents or spreadsheets larger than 2 MB and presentations larger than 50 MB. Google also prevents editing of other documents that exceed their published limits. See the published Google size limits [12].

Parent topic: Installing and configuring Google Docs Integration [6]

Source URL: https://docs.alfresco.com/5.2/concepts/googledocs-intro.html

Links:
[1] https://docs.alfresco.com/../tasks/googledocs-amp-install.html
[2] https://docs.alfresco.com/../concepts/googledocs-configuration.html
[3] https://docs.alfresco.com/../concepts/googledocs-filetypes.html
[4] https://docs.alfresco.com/../concepts/install-integrations-overview.html
[5] http://support.alfresco.com
[6] https://docs.alfresco.com/../concepts/googledocs-intro.html
[7] https://docs.alfresco.com/../tasks/googledocs-config-auth.html
[8] https://docs.alfresco.com/../concepts/googledocs-props.html
[9] https://docs.alfresco.com/../tasks/adminconsole-googledocs.html
[10] https://raw.githubusercontent.com/Alfresco/googledrive/master/google-auth-return.html
[11] https://console.developers.google.com
[12] https://support.google.com/drive/answer/37603?hl=en