# Google Drive

## Overview

[Google Drive](https://en.wikipedia.org/wiki/Google_Drive) is a file storage and synchronization service developed by Google. It allows users to store files on their servers, synchronize files across devices, and share files.

Labii has integrated Google Drive to manage and display files.

{% hint style="warning" %}
This widget does not meet the 21 CFR part 11. Please use it with caution.
{% endhint %}

## Configuration

To use the widget, you need the following prerequisites:

* Create a project **Labii** at [Google Cloud Console](https://console.cloud.google.com/). Copy the project number as the GOOGLE\_APP\_ID.
* Select the project and then go to **Credentials**. Click **Create credentials** to add an API Key. Copy the API Key as GOOGLE\_API\_KEY.
* Click the **OAuth consent screen** and add an app. Under **Authorized domains**, set "labii.app". Click "Push Production" to publish the app.
* Go to **Credentials**. Click **Create credentials** to add an OAuth Client ID. Choose Web Application as the Application type. Add "<https://www.labii.app>" as **Authorized JavaScript origins**. Copy the Client ID as GOOGLE\_CLIENT\_ID.
* Click **Library**. Search Google Drive API and Google Picker API, and enable them.

{% hint style="info" %}
Note: replace "<https://www.labii.app>" with your actual server domain for other data centers or dedicated servers for **Authorized JavaScript origins**. For example "<https://eu.labii.app>"
{% endhint %}

Specifically, these 3 keys shall be collected:

* GOOGLE\_APP\_ID - the project number
* GOOGLE\_CLIENT\_ID
* GOOGLE\_API\_KEY

To update these configurations, click the edit icon:

## Authorize

When you start using the widget for the first time, you need to authorize your Google account to display the files in the widget.

Click the **Authorize** button to authorize.

## Add file

Click **Add file** button to load Google Picker. Choose one or many files to insert. You can also use the search box to search.

## File list

Once added, a list of files will be displayed.

* Click the file title or **OPEN** button to open the Doc file
* Click the **LOAD PREVIEW** button to load file preview
* Click the **REMOVE** button to remove a file.

## Updates

The previous G Suite widgets will be replaced with this widget.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.labii.com/widgets/section-widgets/office/google-drive.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
