# Google Sheets

### **Google Sheets** <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2F3hHFqLXyEDXTObXdYnIt%2Fsheets.svg?alt=media&#x26;token=02c1407b-8f3e-40d8-98a2-f91cb36b7a9d" alt="" data-size="line">

To use Google Sheets as sources, you must [link your Google Sheets account](https://docs.botdistrikt.com/business-tools/google-sheets).

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FIChCXT1jeJHlNH2m72zT%2FScreenshot%202024-05-27%20at%203.29.56%E2%80%AFPM.png?alt=media&#x26;token=78be1ab2-2111-4248-b90a-190d58f76294" alt=""><figcaption><p>Unlinked Google Sheets Dashboard</p></figcaption></figure>

1. After linking your Google Sheets account, you can add a Google Sheets source by clicking on **New Google Sheet**.

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FwnXoPCEyRAPK6jXZMIZU%2FScreenshot%202024-05-27%20at%203.32.58%E2%80%AFPM.png?alt=media&#x26;token=6b235d9e-6459-481f-a27e-bb9d1d3a962e" alt=""><figcaption><p>Google Sheets as Sources</p></figcaption></figure>

2. Search for your spreadsheet and a dropdown field will appear allowing you to select a sheet to be used from that spreadsheet. Click on **Select Sheet** once a sheet has been chosen.

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2F3hDGdwCIH87uQhaDOkUR%2FScreenshot%202024-05-27%20at%203.34.49%E2%80%AFPM.png?alt=media&#x26;token=275e80da-4c03-4784-86af-90ffecda8235" alt=""><figcaption><p>Google Sheets Dropdown</p></figcaption></figure>

3. Similarly, you will be able to view the uploaded Google Sheet chunking settings and output.

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FjjlY9OqQO5I4SvvTlule%2FScreenshot%202024-05-27%20at%203.38.35%E2%80%AFPM.png?alt=media&#x26;token=d274ce84-b898-4a2d-8662-9086ffc618bf" alt=""><figcaption><p>Google Sheets Chunk Settings</p></figcaption></figure>

4. Click on **Train AI** to use that Google Sheet as a source.

**Troubleshooting**:

* If a file is stuck at queued, ensure that your account has not exceeded the respective tier Response Repo limit.
* If a file is stuck at the training phase, click on **Resync Source** <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FU41jarhBLhyl7dWei5H2%2FScreenshot%202024-05-27%20at%203.11.01%E2%80%AFPM.png?alt=media&#x26;token=7c0aa2e4-1580-435a-bc4e-31fe2e665edd" alt="" data-size="line">
* If embeddings are not created, ensure that your AI integrated account has not exceeded its token limit.

## GWS Label Lock

The GWS Label Lock feature secures and facilities the approval process by ensuring that only files with the designated labels are used for knowledge sourcing.

Feature available on request.

### **How to use the label lock**

1. On <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2F1ZJqpY3UTIR6Wa2Bwz4o%2Fimage.png?alt=media&#x26;token=17136de0-b084-419a-a930-4697ffad5c65" alt="" data-size="line">, ensure that you have the necessary admin privileges to utilise the Labels feature, see [Drive Label Admin](https://support.google.com/a/answer/9292382?hl=en).
2. Create a [Google Drive Label](https://support.google.com/a/answer/13127870?hl=en). This is required for the "Label Lock" field to appear. Next, designate **one** **label option** to indicate that the file is ready to be used as a knowledge source. In this example, the designated label option is <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FNCu7nzqsCJQ1A6kFZGOA%2Fapprove.png?alt=media&#x26;token=ec2003fd-ae03-4012-a086-a66aa8f3dfd2" alt="" data-size="line">.

{% hint style="info" %}
For the **Apply Label Lock** feature to show, the label type on Google Drive must be a Badged label.

<img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FmdkKBErOkXGgL1WTAwNs%2FScreenshot%202024-07-22%20at%206.19.45%E2%80%AFPM.png?alt=media&#x26;token=e15eb591-fb7b-42bb-a302-8c833acd68f6" alt="" data-size="original">
{% endhint %}

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FTkGm2NVjaXIikitdwict%2FScreenshot%202024-07-22%20at%205.46.35%E2%80%AFPM.png?alt=media&#x26;token=bdd8b2db-852b-4043-8d10-40b4cf05cfe4" alt=""><figcaption><p>Badged Label Title</p></figcaption></figure>

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2F89ZpBpNapTJAbKcEvN7U%2FScreenshot%202024-07-22%20at%205.36.50%E2%80%AFPM.png?alt=media&#x26;token=8dd761f1-aa40-439f-9a06-31d706fbb8db" alt=""><figcaption><p>Badged Label Options </p></figcaption></figure>

3. [Apply the Label](https://support.google.com/drive/answer/13495216?hl=en\&co=GENIE.Platform=Desktop) on a Google Sheet. If the selected file has a label other than the designated label for syncing, i.e. <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FiGObD1zDXX7QUpFr7WTN%2Fdraft.png?alt=media&#x26;token=f3a09cd1-beff-4b7d-a4ff-007fe278e7b9" alt="" data-size="line"> then the file cannot be synced so the current sources of the chatbot won't change.
4. If the GWS Label Lock feature is enabled, you will see the **Apply Label Lock** checkbox when [creating a new Google Sheet](https://docs.botdistrikt.com/features/sources). Enabling this would allow the file to be used as a knowledge source as long as the label on the file is <img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FNCu7nzqsCJQ1A6kFZGOA%2Fapprove.png?alt=media&#x26;token=ec2003fd-ae03-4012-a086-a66aa8f3dfd2" alt="" data-size="line">.

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FUMK0mUWJBYtDMarYfvmT%2Fimage.png?alt=media&#x26;token=5e156b61-6520-4ba3-8fc3-5356c767309c" alt=""><figcaption><p>Apply Label Lock Checkbox</p></figcaption></figure>

**Troubleshooting**:

* If the initial labels are not applied, you will get a Sync error and the new content will not be synced for embeddings on the chatbot.

<figure><img src="https://2535542804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LirAdLo22OkAW9w3tvY%2Fuploads%2FxpQgL4ymywEvhDMm8yoI%2Fimage.png?alt=media&#x26;token=ececc3e2-8687-496f-ba9b-71ea88ab6c4d" alt=""><figcaption><p>Sync Error</p></figcaption></figure>
