Google Shared Drives Integration
Purpose: Display a list of files on a case that are 1) in the agency's specified Google Shared Drive (formerly Team Drive), and 2) match either the client's first and last name or the case number. (A new, as of 2022-01-07, option allows matching only on the case number.)
Cost: $2,200.00 one time setup fee.
Google Workspace Setup
* if you haven't enabled the Google Developer Console, this needs to be enabled first in Google Workspace.
Overview of Setup Steps
Create a "project" in your organization's Google API Console.
Create credentials in this project that LegalServer can use to access your Team Drive. This will include the creation of a "service account".
Download a file containing the details of the credentials that you have created.
Share your Team Drive with the service account that you have created.
Create a project in the Google API Console
If you don't have any projects created yet, there will be a blue button "Create Project":
If you do have one or more projects, then you should click on the project name dropdown at the top next to the search bar, and then click "NEW PROJECT" in the popup.
In the "New Project" form, fill out the "Project Name" field, with something like "LegalServer Team Drive" and click "CREATE".
The creation process isn't immediate. There will be a progress notification in the upper right. Once it says complete, you can click on it to be taken to the new project's dashboard.
The first step in creating credentials is to enable the Google Drive API for your new project. Click on the navigation menu icon (three stacked lines) in the upper left, then click on "APIs & Services" in the sidenav that pops out.
At the top, click "ENABLE APIS AND SERVICES". You'll be taken to a page headed "API Library". In the search box at the top, type "google drive". One of the results will be the "Google Drive API". Click on that item, then click the blue "ENABLE" button.
Create Credentials for the API project
- Account Type: Service account
- Role: Service Account - Token Creator
Click on the service account name once it has been created. That will take you to the details of the service account.
Then click on the header for "Keys" and click "Add Key" and then "Create New Key". Select "JSON" as the Key Type.
Download the .json file that contains the credentials you just created.
It will look something like this:
Information from some of these fields will be needed to configure the Team Drive list view on LegalServer.
Share the Google Team Drive with the service account email. For example, the drive would need to be shared with "firstname.lastname@example.org" above.
Add the Google Team Drive Documents list view on a profile.
Grab your "Team Drive ID" (which is found at the end of the URL for the Team Drive) in Google Workspace.
Get the Credentials for the Drive API project you created by opening the .json file you downloaded above.
Note: You may see several '\n' characters in the private key, and those must be manually removed before they are pasted into the list view configuration.
While removing the "\n" characters, do not remove the ----BEGIN PRIVATE KEY---- or -----END PRIVATE KEY----- lines.
Copy and paste your Team Drive ID into the list view configuration. You can skip the two OAuth fields. And copy and paste the information from each of the fields in the JSON file into the corresponding fields in "Google Drive Configuration" section.
Admins can configure their site to show results that either match the case number only or both the case number or the client's first and last names. By default, the search is more inclusive.
Here is a suggested Instruction element to place above the list view element:
Cut and paste this in the instruction if you find it useful:
<img width="39" alt="Google Drive icon (2020)" src="https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Google_Drive_icon_%282020%29.svg/128px-Google_Drive_icon_%282020%29.svg.png"><b>GSuite Team Drive Documents</b> <br> (below are all Team Drive docs created after the date the case was opened and that contain the First and Last Name of this client OR this case number in the document text or title)
Which displays similar to this on the profile:
Add a document to your Team Drive that contains either the first and last name of a client or a case number, then visit that case in LS. The name search looks for one of three options: "First Last", "Last, First" or "First" AND "Last".
To get quicker results, put the name or case number in the file's title/name. There is often a delay with Google's API picking up a file based on content versus the title.
Notes, Issues, Questions
Can I connect to multiple Team Drives?
The answer is that we haven't tested this. You may run into performance or rate limiting issues with Google.
Having multiple Team Drives linked on a case profile may not work because of credential caching. Having different Team Drives on different case profile views should work. For example, if you have the list view on the Main Profile connecting to one Team Drive, but a "DV Case Profile" that connects to a different Team Drive. In other words, you don't have two instances of the list view on the same profile or profile view.
We welcome feedback on what works, or doesn't, if you try this.