Google Drive

Connect Google Drive to browse, attach, preview, and manage cloud-hosted files directly inside Labii records.

Specs

Label
Value

Version

1.0.0 (updated on 2021-10-27)

Developer

Labii Inc.

Type

Section

Support Configuration

Yes

Overview

The Google Drive widget connects a Labii record to files stored in Google Drive, allowing laboratory teams to browse cloud documents, insert selected files into a section, and preview linked content without leaving the record page. It is useful when protocols, reports, spreadsheets, or supporting documents already live in a Google Workspace environment and need to be referenced from an ELN or LIMS workflow.

Use Cases

  • Protocol References: Link SOPs, work instructions, and external protocol documents stored in Google Drive to an experiment or quality record.

  • Collaborative Reporting: Attach Google Docs, Sheets, or Slides that multiple team members maintain outside Labii while keeping the files visible from the record.

  • Project Documentation: Centralize project files in Google Drive and surface the relevant subset inside Labii records for easier review.

  • File Preview Workflows: Load previews of linked files during experiment review without downloading or re-uploading the originals.

  • Cloud File Reuse: Reuse existing Google Drive content instead of duplicating attachments across multiple records.

Interface

Read-only View

The read-only view displays the list of Google Drive files that have already been attached to the section. Each item includes the file title and available actions for opening or previewing the linked file. This makes it easy for reviewers and collaborators to access the latest Google-hosted document directly from the record.

  • File Display: Shows attached Google Drive file titles in a section-level list.

  • Open Access: Use Open to launch the selected file in Google Drive.

  • Preview Loading: Use Load Preview to render a preview of supported files inside the widget.

  • Record Context: Keeps externally managed documents associated with the current Labii record.

Edit View

The edit view adds controls for authorization and file selection. Users can connect their Google account, launch Google Picker, search for files, and add one or more selections to the section. The same view also provides removal controls for cleaning up outdated links.

  • Authorization: Click Authorize the first time you use the widget to grant access to your Google Drive files.

  • File Selection: Click Add file to open Google Picker and search or browse available files.

  • Bulk Insert: Select one or multiple files in Google Picker and add them to the record in one action.

  • Cleanup: Remove outdated or incorrect file links directly from the section.

Configuration

Initial Setup

1

Create or open a Google Cloud project for your Labii deployment in Google Cloud Console

2

Open Credentials, create an API key, and save it as GOOGLE_API_KEY

3

Configure the OAuth consent screen, add labii.app as an authorized domain, and publish the app to production

4

Create an OAuth Client ID for a Web application, add your Labii domain to Authorized JavaScript origins, and save the client ID as GOOGLE_CLIENT_ID

5

Enable both Google Drive API and Google Picker API, then copy the project number as GOOGLE_APP_ID

6

Open the Google Drive widget configuration in Labii, enter the three values, and click Save

Required Settings

  • GOOGLE_APP_ID: The Google Cloud project number used by Google Picker.

  • GOOGLE_CLIENT_ID: The OAuth client ID for the web application authorized to access Google Drive.

  • GOOGLE_API_KEY: The API key used to load Google APIs for the widget.

Replace https://www.labii.app with your actual Labii domain when configuring Authorized JavaScript origins for regional data centers or dedicated servers, such as https://eu.labii.app.

Advanced Configuration

1

Review the Google OAuth consent screen and verify that the published app domain matches the Labii domain your users access

2

If users work across multiple Labii environments, create separate OAuth client configurations so each environment has the correct JavaScript origin

3

After updating Google Cloud settings, reopen the widget and re-authorize if Google prompts for renewed consent

Additional Functions

Authorize Google Access

The first time a user interacts with the widget, they must authorize their Google account so Labii can display Google Drive files through the widget.

1

Open a record that contains the Google Drive widget

2

Click Authorize in the widget toolbar

3

Sign in with the Google account that matches your intended Google Drive workspace and approve access

Add Files

Use Add file to launch Google Picker and attach existing Drive files to the current section.

1

Click Add file in the Google Drive widget

2

Search for files or browse folders in Google Picker

3

Select one or more files and confirm the selection to insert them into the section

Preview, Open, and Remove Files

  • Open: Opens the selected file directly in Google Drive.

  • Load Preview: Loads an inline preview of supported files within the widget.

  • Remove: Removes the file reference from the section without deleting the original file from Google Drive.

Best Practices

Access and Governance

  • Use service ownership rules in Google Workspace so critical project files remain available even if an individual account changes.

  • Restrict widget use to teams that already manage collaborative documents in Google Drive to avoid fragmented file storage practices.

Record Integrity

  • Link finalized or review-ready documents to Labii records instead of frequently changing drafts when stable references are required.

  • Confirm that file sharing permissions in Google Drive align with your Labii project membership before relying on the widget during collaboration.

Configuration Management

  • Maintain separate Google Cloud credentials for production and testing environments.

  • Revalidate OAuth origins whenever your Labii domain changes, such as after moving to a regional data center or dedicated server.

Migration Note

The previous G Suite widgets are being replaced by the Google Drive widget. Update older templates and record layouts to use Google Drive when you need a single section for linking and previewing Google-hosted files.

Last updated