# Обрезание строчки из Google таблицы

<figure><img src="/files/ZwwzHaERG8npeCaK08tW" alt=""><figcaption><p>Начальный текст в Google таблице</p></figcaption></figure>

<figure><img src="/files/JwwTRhrg52c7GZDEobNE" alt=""><figcaption><p>Блок чтения записей из Google таблицы который сохраняет текст в переменную long</p></figcaption></figure>

<figure><img src="/files/ZcnpYFsRItqCO7Kpv0zO" alt=""><figcaption><p>Блок интерпретатор JavaScript который обрезает значение переменной long</p></figcaption></figure>

<figure><img src="/files/3UTaQgGu4pPSoli61h7p" alt=""><figcaption><p>Блок Цепочка сообщений для вывода новой переменной short</p></figcaption></figure>

А вот и сам текст

```
//Записываем переменную long во временную переменную
var long = getContactVariable("long");
//С помощью функции substr достаем первые 100 символов и сохраняем во временную переменную
var short = long.substr(0, 100);
//сохраняем значение временной переменной в локальную переменную пользователя
setContactVariable("short", short);
```


---

# 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://help.watbot.ru/chat-boty/java-script-resheniya/obrezanie-strochki-iz-google-tablicy.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.
