> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/google-drive/getting_started/labels.md).

# Enable Google Drive Labels

Learn how you can enable Google Drive Labels in Nightfall for Google Drive.

Labels in Google Drive support various business operations by adding additional metadata to files. Nightfall leverages Google Drive labels to identify sensitive data in Google Drive files and apply automated actions based on labels. To learn more about Google Drive labels, refer to this [Google document](https://support.google.com/a/answer/9292382?hl=en\&ref_topic=13128179\&fl=1\&sjid=13080326729164278818-NC).

To enable Google Drive labels, you must perform the following prerequisite actions.

[#adding-scope-of-google-drive-labels-api](#adding-scope-of-google-drive-labels-api "mention")

[#enabling-google-drive-labels-api](#enabling-google-drive-labels-api "mention")

## Adding Scope of Google Drive Labels API

{% hint style="info" %}
The scope list shown during Google Drive setup already includes `drive.admin.labels`. You only need this section if your domain-wide delegation entry was created before label support. See [SaaS App Permissions Reference](/nightfall_integrations/saas-app-permissions-reference.md) for the full scope list.
{% endhint %}

To use Google Drive labels, Nightfall admins must perform the following configurations in your Google Workspace account. You must have the client ID of your Google Workspace.

1. Log in to Google Workspace as an admin.
2. Navigate to [Domain wide delegations](https://admin.google.com/ac/owl/domainwidedelegation).
3. Click **Add a filter**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FNkCHew9kr5QQyAMCnAnx%2Fimage.png?alt=media&amp;token=4debf74d-cbf3-496a-8c63-2f6de0c4a040" alt=""><figcaption></figcaption></figure>

4. Select **Client ID**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2F5GNGw700MC5Ul5AuJzzU%2Fimage.png?alt=media&amp;token=09c2d4f4-2f1e-470a-86bb-4b7b1a83e94e" alt=""><figcaption></figcaption></figure>

5. Enter the client ID and click **Apply**.

{% hint style="info" %}
You can use the Client ID stored during the installation of Nightfall for Google Drive integration. The details can be found in this [Nightfall documentation](/google-drive/getting_started/installation.md) (step 4).
{% endhint %}

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FKporFWvApjz4S6VD9TeV%2Fimageedit_10_8177390576.jpg?alt=media&amp;token=f7abffe2-bc0b-4f52-8c86-aff49ba55a6b" alt="" width="375"><figcaption></figcaption></figure>

The matching account is displayed.

6. Hover your mouse to the right and click **Edit**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FNp0GINJTeWlrZmXTlZa4%2Fimageedit_3_4818604503.jpg?alt=media&amp;token=9ebfe815-5853-49cf-af9a-f9acc6995d5f" alt=""><figcaption></figcaption></figure>

7. In the **OAuth scopes** field, enter the following scope and click **Authorize**.

```http
https://www.googleapis.com/auth/drive.admin.labels
```

### Enabling Google Drive Labels API

Once the scope is added, Nightfall admins must enable the Google Drive Label API. Nightfall recommends you to read this [Google documentation](https://developers.google.com/workspace/guides/enable-apis) on enabling APIs before proceeding with this section.

1. Navigate to the Google Drive Labels API from the GCP console that can be found [here](https://console.cloud.google.com/apis/library/drivelabels.googleapis.com).
2. Click the **Select a Project** menu.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fclqb17CLTdaRgqXJgEge%2Fimage.png?alt=media&amp;token=95a214c3-c86a-466f-baeb-b36a5de5b10f" alt="" width="563"><figcaption></figcaption></figure>

The list of Google projects is displayed.

3. Select a Project that has the Service Account, used to install the Nightfall Google Drive integration

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FmjWjLo9aY5QiMpWFprIK%2Fimage.png?alt=media&amp;token=3b4b6d50-46da-4455-a2aa-765ae63c92ae" alt="" width="563"><figcaption></figcaption></figure>

3. Click **Enable**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FyXOGDr1v79FGl60zFbEx%2Fimage.png?alt=media&amp;token=bec50e77-c0ce-45dc-899f-d7338c3d5270" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
**Important**

Before using Google Drive Labels in Google Drive policies, ensure that you have created the appropriate Google Drive Labels. To learn more about creating Google Drive labels, refer this [Google Document](https://support.google.com/a/answer/13127870?hl=en).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/google-drive/getting_started/labels.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
