# Sending requests to messengers and email

* [How to format the text request](#how-to-format-the-text-request)&#x20;
* [How to send requests to messengers](#how-to-send-requests-to-messengers)&#x20;
* [How to send requests/notifications to an email](#how-to-send-requests-notifications-to-an-email)

All bots created on Mavibot can send requests not only to email addresses but also to various messengers.

## How to format the text request

You can use the built-in variable #{order} as the text, or create your own custom text.

## How to send requests to messengers

{% hint style="success" %}
The setup process is the same for all messengers connected to Mavibot.
{% endhint %}

{% hint style="info" %}
Note: Sending notifications to messengers is available only with a **Premium subscription plan**.
{% endhint %}

To send requests to messengers, use this function:

**message(client\_id, text, message\_id)**

Parameters:

**client\_id** — the client’s ID on Mavibot to whom you want to send the message.

![You can find the client’s id in the Clients section on MaviBot by clicking on the dialogue with them](https://lh3.googleusercontent.com/PCVBME36gUZTy1Fd_0fLbmY6Mpp3Wty6SuvsOc4KDqW8MwRw69t-3zdVerijzieT7O-uezR67Ix5qqeNcsi9S-ct8-d1Zbx6bCx8YgDCe_GW756kex6rdROB7aCcVGU4fu3kJ7S4eLA609iorQ)

**text** — the message text. You can use a variable (please configure it beforehand) or write text in quotation marks

**message\_id** —  the sending block ID (optional parameter)

![message(client\_id, text, message\_id)](https://lh4.googleusercontent.com/wNVsVlkSW-bm5Y3DNNS-XclSssK0OI9Ket7XPxxC7rfRMZQ7zcOswU-EDNq41vHXLjiiSRQWnSlOMnR8LU4Ms7EfIJGROnZCY4C8hcJWlTls2hc8JbY2Sehuxsf6_-1Aqo4dTr8gN0qh5V4t5w)

### Sending messages via WhatsApp

To send the message on WhatsApp through a phone number, use this function:

**whatsapp\_message(phone, text, message\_id)**

Parameters:

**phone** — phone number in brackets

**text** — the message text. You can use a variable (don’t forget to set it up first) or you can write the text in quotation marks

**message\_id** — the sending block ID (optional parameter)

![whatsapp\_message(phone, text, message\_id)](https://lh3.googleusercontent.com/cBcUfqvTmvDPCrP4THIbtWcC8TzaDFcrNF5ztW5Au9iZAJsJuRlxHhnjvOUIGBGKQ7yVCwlQ865dV2ZL_vKFquHxRb_ASNMK8JObuai_vMzH_7Na7dAdZApb_EuvLvBgTU31YPvcmV501p2IHQ)

### How to send requests on Telegram

VIDEO OVERVIEW

The parameter client\_id has to be changed to the client’s id in the editor

![](https://lh3.googleusercontent.com/PCVBME36gUZTy1Fd_0fLbmY6Mpp3Wty6SuvsOc4KDqW8MwRw69t-3zdVerijzieT7O-uezR67Ix5qqeNcsi9S-ct8-d1Zbx6bCx8YgDCe_GW756kex6rdROB7aCcVGU4fu3kJ7S4eLA609iorQ)

You have to use this function:

**tg\_send\_message(platform\_id, text, client\_message\_id, reply\_markup, parse\_mode)**

Parameters:

**platform\_id** — id on Telegram of the person you need to notify

**client\_message\_id** — the message ID you need to quote (optional parameter)

**reply\_markup** — buttons settings (optional parameters)

**parse\_mode** — text format (bold/cursive) (optional parameter)

![tg\_send\_message(platform\_id, text, client\_message\_id, reply\_markup, parse\_mode)](/files/mMsHXsofPymkN8gRHogX)

#### Finding the platform\_id:

1. You need to have a Telegram bot connected to the project.
2. The bot must have received at least one message from the account you want to send notifications to.
3. Move to the "Clients" tab on Mavibot:\
   ![](https://lh6.googleusercontent.com/3XzgtMFU-z0H83wARE7TgmeCLEw6r5wz6o_HTKYBxYB54K0wUUCIlWeWcKupLSqnxeJByvF5B0dLf7RZckBiJBtaoT1uifD987kxLJC9uWXLYMOOnzXIeUt7tY8On127RLqrAVFiZp_Rocxc3A)
4. Choose the dialog you need from the list.
5. And copy this number:

![](https://lh4.googleusercontent.com/KG6e0lnti9hUhXOUvxg50OJvXpShHkha4px94_ToHlKYnQn-0OqmctfsM-fOQkeoXqkyIgfF8MpXH1gcCkDy3mD0B4oWYptzHRU19pqA1TAKxoMS7tcIZkGWPOc8yF3EROcGok8PYudsDmikmg)

Paste it in the `platform_id` parameter of the function.

To send the message to multiple Telegram accounts, duplicate the function and replace `platform_id` with a different ID for each recipient.

## How to send requests/notifications to an email

{% hint style="info" %}
This functionality works for any subscription plan!
{% endhint %}

Move to the project’s setting and paste your email address in the "Email" field.

![](https://lh6.googleusercontent.com/NrmcYWDJL4Q5RzKVJ76klxcvSImEYdtRfMzGA2Q-uE3pDCj1nZ99_os9Ds8IOS9XShQi3r6p3TV0PQnUqxSiTf4SKNchHk3UYd2xWlSGi7CdB41-sa0jlM2JIUEXCM1eRihpRGnTWfJXcbhJUQ)

After that, all requests from the red block ("End of data collection") will be sent to your email. You can learn how to create this block in [this article](https://docs.salebot.ai/the-basics-how-to-use-salebot.ai/creating-blocks-and-the-types-of-them#block-end-of-data-collection)


---

# 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/special-features/sending-requests-to-messengers-and-email.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.
