Connect to Google Sites

Note: If you want to connect Google Sites to Glean, your company needs to be on a Google Workspace plan that includes Google Vault. Due to API limitations (both on Google Vault and other available Google’s APIs), the navigation link will take editors to the edit page of the Google Site page but for non-editors, this will automatically redirect to the published site. Additionally, as a prerequisite, you will need to have already connected GDrive to Glean.

Connect GDrive to Glean

In order for Glean to be able to search through Google Sites content, you will need to have gone through the GDrive setup and have GDrive as a connected app on Glean. If you have already connected GDrive already, then you can proceed with the next step! If not, please do so first before continuing.

Enable the Vault API

In order for Glean to index Google Sites and respect permissions, you will need to enable the Google Vault API. As an admin, visit the below GSuite Vault API page and enable it.

Add API Scopes

As per the GDrive setup, you will have already created a client for your workspace. Visit the Google Admin Console to Manage OAuth Clients . You’ll need to be signed in as an admin. Select the Client ID that was used for the GDrive setup, click ‘Edit’ on the existing API client and then add the additional scopes below.

https://www.googleapis.com/auth/ediscovery,https://www.googleapis.com/auth/devstorage.read_only

Upon completion, you should verify that the following scopes for the client was granted:

  1. https://www.googleapis.com/auth/ediscovery (allows the client to use Google Vault)
  2. https://www.googleapis.com/auth/devstorage.read_only (allows the client to access the Google Site content from the generated Google Vault exports)

Grant Vault Role

From the GDrive setup, a “Directory Admin Email” was provided. You will need to confirm that user has the appropriate role to use Google Vault. As an admin, visit the Admin Roles page and create (or modify) a role and grant that role the following privileges:

  1. Manage Matters
  2. Manage Searches
  3. Manage Exports

Create a Vault Matter instance and Share it

Visit Google Vault, visit the “Matters” page, and create a Matter instance. Set the matter name to “Glean Matter” and click create. This should take you the search page for that newly created matter. Note the matterId present in the url – you will need to provide this to Glean. Next, you will need to share the newly created matter with the “Directory Admin Email” account. To do this, you will need to:

  1. Navigate to the matter page. Navigate to the matter page. This should be something like https://vault.google.com/matter/<matter-instance-here>/search
  2. Click on the “Share this matter” button near the top right. This should be near the pencil icon.
  3. Under “Invite people”, include the user account email used for GDrive setup. This should be the directory admin user.

Provide Client Information

There are two input boxes you will need to fill out to connect Google Sites to Glean:

  1. Enter the newly created Matter Id into the Google Vault Matter Id input box
  2. Enter the domain of the already connected GDrive instance into the Google Domain input box. (i.e glean.com)
    1. Note that this should match exactly to what is configured for the connected GDrive app on Glean. For the case where one has multiple GDrive instances, provide the domain of the GDrive instance that you want to index Google Sites for. Click Save in Glean. You’re all set!