> For the complete documentation index, see [llms.txt](https://docs.mavibot.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mavibot.ai/doc/uk/chatbot/mesendzheri/line_chatbot/api.md).

# Функції калькулятора

## **Як надсилати повідомлення через калькулятор**

```
line_send_message(platform_id, text, buttons, attachments, quote_token, bot_group_id)
```

Функція допомагає надсилати повідомлення до вказаного чату.

<table><thead><tr><th width="310.76171875">Параметри</th><th>Опис</th></tr></thead><tbody><tr><td><mark style="color:$danger;"><strong>!</strong></mark><strong> platform_id</strong></td><td><p><strong>ID чату в LINE.</strong> </p><p>Ви можете передати системну змінну <a href="/pages/a2e137a601430151775a244b60e071f45066c587"><code>platform_id</code>.</a></p></td></tr><tr><td><strong>text</strong></td><td><p><strong>Текст повідомлення.</strong> </p><p>Додатковий параметр, якщо <code>attachments</code> параметр передано.</p></td></tr><tr><td><strong>buttons</strong></td><td><p><strong>Масив кнопок у повідомленні.</strong></p><p><a href="#an-array-of-buttons-in-the-message">Додатковий параметр.</a></p></td></tr><tr><td><strong>attachments</strong></td><td><p><strong>Масив вкладень.</strong></p><p><a href="#an-array-of-attachments">Додатковий параметр.</a></p></td></tr><tr><td><strong>quote_token</strong></td><td><strong>Токен відповіді для реагування на конкретне повідомлення.</strong> Ви можете передати <code>line_quote_token</code> змінну.</td></tr><tr><td><strong>bot_group_id</strong></td><td><p><strong>ID групи бота.</strong></p><p>Може бути вказано, якщо вам потрібно надіслати повідомлення від імені іншого підключеного бота. Додатковий параметр.</p></td></tr></tbody></table>

### **Масив кнопок у повідомленні**

Параметр buttons формується так само, як кнопки в блоці воронки. Щоб спростити формування масиву, можна в блоці воронки створити кнопки за допомогою інтерфейсу та скопіювати сформовані дані.

Крок 1. Створіть кнопки в блоці.

<div data-with-frame="true"><figure><img src="/files/a13831de13637588e7fa575ae9d36d0c2666311b" alt=""><figcaption></figcaption></figure></div>

Крок 2. Скопіюйте розширені налаштування кнопки.

<div data-with-frame="true"><figure><img src="/files/c0178acc116919402ac90db85e97b11c8ef0e458" alt=""><figcaption></figcaption></figure></div>

**Приклад масиву buttons:**

`[{"line":0,"index_in_line":0,"text":"Відвідати сайт","type":"inline","url":"`[`https://google.com","callback_link":false`](about:blank)`}]`

### **Масив вкладень**

Параметр `attachments` є масивом словників, які визначають вкладення, що будуть надіслані.&#x20;

Кожне вкладення в масиві має містити тип вкладення (`attachment_type`) і його URL (`attachment_url`).

Приклад:

attach\_list = \[{"attachment\_type": "image", "attachment\_url": "[https://files.site.com/my\_image.jpg](https://files.mavibot.ai/uploads/message_files/ca31b6d2ff3c2eef9c86bb0cc820412057b0ca004bd6c0e402c8df793c42f17d.jpg)"}]

Можливі значення для `attachment_type`:

* зображення
* відео
* аудіо


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mavibot.ai/doc/uk/chatbot/mesendzheri/line_chatbot/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
