# Funciones de la calculadora

## **Cómo enviar mensajes mediante la calculadora**

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

La función te ayuda a enviar mensajes al chat especificado.

<table><thead><tr><th width="310.76171875">Parámetros</th><th>Descripción</th></tr></thead><tbody><tr><td><mark style="color:$danger;"><strong>!</strong></mark><strong> platform_id</strong></td><td><p><strong>El ID del chat en LINE.</strong> </p><p>Puedes pasar la variable del sistema <a href="/pages/0ca11fa5259bc247713962502c5ca033574d50e9"><code>platform_id</code>.</a></p></td></tr><tr><td><strong>text</strong></td><td><p><strong>Texto del mensaje.</strong> </p><p>Un parámetro opcional si se proporciona el <code>attachments</code> parámetro.</p></td></tr><tr><td><strong>buttons</strong></td><td><p><strong>Una matriz de botones en el mensaje.</strong></p><p><a href="#an-array-of-buttons-in-the-message">Un parámetro opcional.</a></p></td></tr><tr><td><strong>attachments</strong></td><td><p><strong>Una matriz de adjuntos.</strong></p><p><a href="#an-array-of-attachments">Un parámetro opcional.</a></p></td></tr><tr><td><strong>quote_token</strong></td><td><strong>Token de respuesta para responder a un mensaje específico.</strong> Puedes pasar la <code>line_quote_token</code> variable.</td></tr><tr><td><strong>bot_group_id</strong></td><td><p><strong>ID de grupo del bot.</strong></p><p>Puede proporcionarse si necesitas enviar un mensaje en nombre de otro bot conectado. Un parámetro opcional.</p></td></tr></tbody></table>

### **Una matriz de botones en el mensaje**

El parámetro buttons se forma de la misma manera que los botones en el bloque del embudo. Para simplificar la creación de la matriz, puedes crear botones en el bloque del embudo usando la interfaz y copiar los datos generados.

Paso 1. Crea botones en el bloque.

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

Paso 2. Copia la configuración avanzada de los botones.

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

**Ejemplo de una matriz de botones:**

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

### **Una matriz de adjuntos**

El `attachments` parámetro es una matriz de diccionarios que definen los adjuntos que se enviarán.&#x20;

Cada adjunto de la matriz debe incluir el tipo de adjunto (`attachment_type`) y su URL (`attachment_url`).

Ejemplo:

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

Valores posibles para `attachment_type`:

* image
* video
* audio


---

# 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/doc/es/chatbot/mensajeros/line_chatbot/api.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.
