> 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/chatbot/messengers/line_chatbot/api.md).

# Calculator functions

## **How to send messages via the calculator**

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

The function helps you send messages to the specified chat.

<table><thead><tr><th width="310.76171875">Parameters</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:$danger;"><strong>!</strong></mark><strong> platform_id</strong></td><td><p><strong>The chat ID in LINE.</strong> </p><p>You can pass the system variable <a href="/pages/HwLzIZtqgTmsMHThPbXE"><code>platform_id</code>.</a></p></td></tr><tr><td><strong>text</strong></td><td><p><strong>Message text.</strong> </p><p>An optional parameter if the <code>attachments</code> parameter is provided.</p></td></tr><tr><td><strong>buttons</strong></td><td><p><strong>An array of buttons in the message.</strong></p><p><a href="#an-array-of-buttons-in-the-message">An optional parameter.</a></p></td></tr><tr><td><strong>attachments</strong></td><td><p><strong>An array of attachments.</strong></p><p><a href="#an-array-of-attachments">An optional parameter.</a></p></td></tr><tr><td><strong>quote_token</strong></td><td><strong>Reply token for responding to a specific message.</strong> You can pass the <code>line_quote_token</code> variable.</td></tr><tr><td><strong>bot_group_id</strong></td><td><p><strong>Group ID of the bot.</strong></p><p>Can be provided if you need to send a message on behalf of another connected bot. An optional parameter.</p></td></tr></tbody></table>

### **An array of buttons in the message**

Параметр buttons формируется также как кнопки в блоке воронки. Чтобы упростить формирование массива, можно в блоке воронки создать кнопки с помощью интерфейса и скопировать сформированные данные.

Step 1. Create buttons in the block.

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

Step 2. Copy the Advanced button settings.

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

**Example of a buttons array:**

`[{"line":0,"index_in_line":0,"text":"Visit site","type":"inline","url":"`[`https://google.com","callback_link":false`](about:blank)`}]`

### **An array of attachments**

The `attachments` parameter is an array of dictionaries that define the attachments to be sent.&#x20;

Each attachment in the array must include the attachment type (`attachment_type`) and its 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)"}]

Possible values for `attachment_type`:

* image
* video
* audio


---

# 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/chatbot/messengers/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.
