> For the complete documentation index, see [llms.txt](https://docs.smartbotpro.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartbotpro.io/scripts/integrations/google-tablicy.md).

# Google-таблицы

{% hint style="info" %}
You can interact with your google-sheets through the bot: enter information (in rows and cells), as well as retrieve it. You will need a google account.&#x20;
{% endhint %}

Let's create a suitable action by selecting "Google Spreadsheet" integration from the left additional menu or by right-clicking in an empty area of ​​the screen. Please note that "Actions" and "Integrations" are separate sections.

![](/files/GKzpKrHkegyHzNsnMUd6)

## Linking an account

When we select the desired operation, a block will appear in the center of the screen, and its menu will open on the right. Click on the authorization button to link your Google account to Smartbot Pro.

![](/files/lRl8NVWDP24k1WwBfxLt)

First, you will be prompted to select the desired account.

![](/files/oMe7sL19VDU4jVbxMIYi)

First, you will be prompted to select the desired account.

![](/files/sPgY7flAeWY7pQJ3pelf)

If everything went well, you will see this inscription.

![](/files/9xS2oQRMmakHTPFw3THy)

You can close the tab with it.&#x20;

Let's go to the Google account to create a table and make it available to our bot.&#x20;

Open the account menu in the upper right corner, scroll down a little and select tables.

![](/files/FiVWfCXVk43Ab0fb6Dzw)

You can then select an existing table or create a new one.

![](/files/Ouu2uUgJFn6K6Oj27yUo)

Click on "Access Settings":

![](/files/c5po73XBHrlTPaIuM8W5)

Let's open access to the table by reference. After that, copy it and paste it into our bot.

![](/files/Q8ZBGpUWnenCDDBctosF)

![](/files/nZ4L7sUdTdXBPnFHn4Ba)

## Adding a row to a table

We return to the settings of the Smartbot Pro script, to the Google Tables block.&#x20;

Paste the copied link and hit enter.

![](/files/LLrydU4932zKyHxu2nFd)

New fields will appear.&#x20;

In the case of writing to a table, this will be the choice of a sheet and variables for cells

![](/files/TjiG1wYi3hPaaYRTCsuM)

Now let's make a simple chain: the user writes "Hello", the bot answers and enters the user's data into the table.

![](/files/c7HpOdYwRsJzhVWXOhFN)

![Пишем приветствие в Telegram](/files/7l0zligweYa7ah4htAfl)

![Бот вносит в таблицу указанные переменные: тип канала и id пользователя](/files/RQcqsr3N1OyUQbW6C13o)

## Getting data from a table

Getting data from a table works similarly. We insert a link to the table, select which cell (or range of cells) to read the data from, and indicate in which variable to write this information (in string format).

![](/files/HgBDqFeMirIfczln0UAM)

With the integration with Google Sheets, you can store all the necessary data (for example, phone numbers, addresses, and other information about orders) in one place.&#x20;

Now you know how to use tables in Smartbot Pro!
