# Google Tables

{% hint style="warning" %}
This feature is available at the maximum tariff
{% endhint %}

* How to prepare a Google table&#x20;
* How to write a json query&#x20;
* How to Write Lines to Specific Columns&#x20;
* How to Record Data into Specific Cells&#x20;
* How to delete records from specific cells&#x20;
* How to write to the first empty cell in a row&#x20;
* How to read data from the table&#x20;
* How to Find Text in a Table (Output the First Appropriate Row)&#x20;
* How to List All Matches in a Table&#x20;
* How to completely delete a row (with offset)&#x20;
* How to completely remove column (with offset)&#x20;
* How to make buttons to select a sheet in the table&#x20;
* How to work through your account&#x20;
* How to Work with Column Letters&#x20;
* How to Set Variables in Column Names&#x20;
* How to delete from the table&#x20;
* How to add a sheet to a table Potential error Google Table Functions (APIs)&#x20;

In this article let’s look at how bots can interact with Google tables.&#x20;

**To use this  functionality, you need:**&#x20;

* Google table, open to editing by link&#x20;
* URL function&#x20;
* Query options

## How to prepare a Google table&#x20;

!!!

!!!

!!!

## How to write a json query&#x20;

Go to the settings of the block in which we will record. Select the type of POST-json query, insert the URL of the function we want, insert parameters in the JSON POST-parameters field (Figure 5)&#x20;

To see what response comes to your request, write in the Answer {custom\_answer} field, save and go through the chain. Next, you can save each value of the answer to variables in the Save Value from JSON Response field using the syntax:&#x20;

> parameters\_from\_query -> your\_variable If the complex parameters come, then disassemble them as follows:&#x20;

> "cell\_number":{"row":4,"col":2} cell\_number|row -> Row; cell\_number|col -> Column

Now let’s understand in more detail what the bots do with Google tables.

## How to Write Lines to Specific Columns&#x20;

You can collect a lot of data from the user and write them into the first free row in the table. It is done using the **mapping** function.

{% hint style="warning" %}
The heading must be filled in (at least one cell in the first row)
{% endhint %}

URL Functions: [https://store.salebot.pro/function/gsheets ](<https://store.salebot.pro/function/gsheets >)

Query options `{"id": "id table", "mapping":{"a"::"#{variable}", "b": "#{yet}", "c": "#{yet}", "d":"just text"}}}`&#x20;

If you want to write strings not on the first sheet, you should add the list\_name parameter to the query:&#x20;

`{"id": "id table", "mapping":{"a":"just text", "b": "#{variable}"}, "list_name": "Sheet name"}`&#x20;

Where id is the id of your Google table. You can get it from the link to your Google table (what is highlighted in bold in the link below). <https://docs.google.com/spreadsheets/d/1aUbbUaw2SRnJFAavv06Noa1EzumhyShKDm7ie6lYKc4/edit#gid=0>

a, b, c, d are just column names list\_name - the name of your sheet (for example, "File 2")&#x20;

If there is no problem with the query execution, the answer comes {"number\_row":8}. You can save this line number and use it for later work.&#x20;

If you don’t want to risk restricting access to your table to your account, you must pass the creds\_path parameter from the url of your data file.&#x20;

More about this in Work through your account:&#x20;

`{"id": "id table", "mapping":{"a"::"#{variable}", "b": "#{yet}", "c": "#{yet}", "d":just text"creds_": "path"way to your data file for authorization"}}`

## How to Record Data into Specific Cells&#x20;

URL Functions: <https://store.salebot.pro/function/gsheets&#x20>;

Options `{"id": "id table", "write":{"a1"::"#{variable}", "b3": "#{yet}", "c1": "#{yet}", "d20"just text"}}. Recording is done in specific cells that you specify (in our example a1, b3, c1, d20)`&#x20;

{% hint style="warning" %}
Column numbering comes from one.
{% endhint %}

If you want to write strings not on the first sheet, you should add the list\_name parameter to the query:&#x20;

{"id": "id table", "write":{"a1"::"#{variable}", "b3": "#{yet}", "c1": "#{yet}", "d20"just text"}, "list\_name": "File name"}}&#x20;

If there is no problem with the query, no parameters are returned.&#x20;

If you don’t want to risk restricting access to your table to your account, you must pass the creds\_path parameter from the url of your data file.&#x20;

More about this in Work through your account:&#x20;

`{"id": "id table", "write":{"a1"::"#{variable}", "b3": "#{yet}", "c1": "#{more}", "d20"just text}, "cred_name"Sheet name", s_"path": Path to your data file with authorization}`

!!!

## How to delete records from specific cells&#x20;

URL Functions: <https://store.salebot.pro/function/gsheets&#x20>;

`{"id": "id of the table", "remove":[a1", "b3", "c2"]}. Removes values from specific cells you specify (in our example a1, b3, c2)`

{% hint style="warning" %}
Column numbering starts with number one.
{% endhint %}

If you want to remove cells from the first sheet, you should add the list\_name parameter to the query:&#x20;

`{"id": "id of the table", "remove":[a1", "b3", "c2"], "list_name": "File name"}`&#x20;

If there is no problem with the query, no parameters are returned.&#x20;

If you don’t want to risk restricting access to your table to your account, you must pass the creds\_path parameter from the url of your data file. More about this in Work through your account:&#x20;

`{"id": "table id", "remove":[a1", "b3", "c2"], "list_name": "File name","creds_path": "The path to your data file for authorization"}`

## How to write to the first empty cell in a row&#x20;

You can write the data to the specified row, the entry will take place in an empty cell to the right of the last filled cell. It is performed using the append\_in\_row function.&#x20;

URL Functions: <https://store.salebot.pro/function/gsheets&#x20>;

Query parameters {"id": "table id", "append\_in\_row":"8", "value": "written value"}&#x20;

If you want to write rows not on the first sheet, you should add the list\_name parameter: {"id": "id of the table", "append\_in\_row":", "value": "value", "list\_name": "Name of the sheet"} Where is the id of your Google table. You can get it from the link to your Google table (what is highlighted in bold in the link below). <https://docs.google.com/spreadsheets/d/1aUbbUaw2SRnJFAavv06Noa1EzumhyShKDm7ie6lYKc4/edit#gid=0>

append\_in\_row - string number to write&#x20;

value is the value that will be written into the cell&#x20;

If there is no problem with the query execution, the answer comes {"number\_col":10,"col\_name":"J3"}. You can save these numbers and use them for further work.&#x20;

If you don’t want to risk restricting access to your table to your account, you must pass the creds\_path parameter from the url of your data file. For more information, see Work through your account: {"id": "id table", "mapping":"{"a":"#{variable}", "b": "#{more}", "c": "#{more}, "cred"simply text"},"s\_": path to your data with"path}"

## How to read data from the table&#x20;

URL Functions: <https://store.salebot.pro/function/gsheets>

{"id": "id table", "read":{"a1":"a1", "b3": "b4", "c1": "c10", "d20":"a1"}} Set parameters to transmit ranges. In the example "a1":"a1" returns one cell and "c1":"c10" returns 10 values from the column c. The returned hash value from the cell address and values from it.

{% hint style="warning" %}
Column numbering starts with number one.
{% endhint %}

If you want to read values not on the first sheet, you should add the list\_name parameter to the query:&#x20;

`{"id": "id table", "read"::{"a1":"a3", "b3": "b6"}, "list_name": "File  name"}`&#x20;

If there is no problem with the query, the cell name and its contents will be returned:"{"A1":" u043f u0440 u0438 u0432 u0435", "A2":" u043f u0440 u0430"U043U0A"U0A0430." U0440A0A"U0A0430." u0444 u0443 u043d u043a u0446"} If you don’t want to risk restricting access to your table to your account, you must pass the creds\_path parameter from the url of your data file. More about this in Work through your account:

{"id": "id table", "read"::{"a1":"a3", "b3": "b6"}, "list\_name": "Sheet name","creds\_path": "path path path to your data file for authorization"}


---

# 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.mavibot.ai/integrations/google/tables.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.
