> For the complete documentation index, see [llms.txt](https://docs.noqo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.noqo.ai/working-with-tables/tables-csv-xls-google/data-recording-and-modification.md).

# Data recording and modification

In addition to storing and retrieving data from a table, you can also record data to the table and make modifications.

Recording data to the table and making modifications is only possible if your Google Sheet is connected.

Instructions on how to properly prepare a table for upload, the table requirements, and how to upload the table to Noqo can be found in the article [Data retrieval](https://docs.noqo.ai/working-with-tables/tables-csv-xls-google/data-retrieval.md).

Once you have prepared and connected the table in Noqo, you need to enable the **Addition and/or Modification** option.

{% hint style="info" %}
Please note that for successful data modification, the option allowing **Data Retrieval** from the table must be enabled.
{% endhint %}

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FF08vzOF2R2nYmiWxMkgB%2Fimage.png?alt=media&amp;token=876be9f6-ac69-41e5-a2c5-93509d9f8dee" alt=""><figcaption></figcaption></figure>

## Data recording

1. To enable the ability to write data to the table, go to the **Addition** tab and enable the **Allow adding data to the table** option:

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FcbL9koun74zcmQS3jKl0%2Fimage.png?alt=media&amp;token=7f6dbc71-8b44-4558-8b72-e8fa6c2ede0f" alt=""><figcaption></figcaption></figure>

After enabling this option, a function for writing data to the table will become available. You can use it when adding instructions to the main prompt.

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2Fu6qchIrBWecfCGauZa8g%2Fimage.png?alt=media&amp;token=33566670-b239-42ea-80fe-b9dc6c5060ba" alt=""><figcaption></figcaption></figure>

2. After you have uploaded the table and enabled the option that allows data insertion into the table, you need to specify the instructions for the bot.

{% tabs %}
{% tab title="Example of an instruction for data recording" %}
\#DATA RECORDING

Ask the client for their phone number, height, weight, gender, and age.

After the client responds, pass these parameters to the **price\_append\_table** function and thank the user for providing the information.
{% endtab %}
{% endtabs %}

3. You can verify successful data recording in the table by [exporting the dialog](https://docs.noqo.ai/main-settings/system-prompt/best-practices/instruction-debugging.md).

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FeZFaijYlJBgY0A9PVWEH%2Fimage.png?alt=media&amp;token=68c0040f-7ae3-4e9d-a9a6-11d65b7ece72" alt=""><figcaption></figcaption></figure>

## Data modification

1. To enable data modification, go to the Modification tab and select the **Allow modification of table data** optio&#x6E;**:**

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FZy4IfhB103pZCb650Kgm%2Fimage.png?alt=media&amp;token=e4f0d53c-3177-492e-89cd-b536eee5d886" alt=""><figcaption></figcaption></figure>

2. After enabling this option, a function for modifying table data will become available. You can use it when adding instructions to the main prompt.

{% hint style="info" %}
To modify a row, you need to locate it by any available method (for example, by number, name, or any other column). The result will include the row number, which the bot will then use to apply the changes.
{% endhint %}

{% tabs %}
{% tab title="Example of an instruction for data modification" %}
\#DATA MODIFICATION

To update a customer record, specify the phone number and the data to be modified, then pass this information to the **price\_edit\_table** function.
{% endtab %}
{% endtabs %}

3. You can verify successful data recording in the table by [exporting the dialog](https://docs.noqo.ai/main-settings/system-prompt/best-practices/instruction-debugging.md).

<figure><img src="https://1782981877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKvUDH16L29QcaH0CuUhn%2Fuploads%2FFfIcPkw8Tt5qpHsSJVCK%2Fimage.png?alt=media&amp;token=59e08dff-ace7-4954-854f-ba22369b5c99" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The first function finds the raw number, and the second function applies the necessary modificaions.
{% endhint %}
