(Наталья) Sending requests to messengers and email

Sending notifications/requests on WhatsApp, Telegram, Viber, 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

Note: Sending notifications to messengers is available only with a Premium subscription plan.

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

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)

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)

How to send requests on Telegram

VIDEO OVERVIEW

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

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)

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:

  4. Choose the dialog you need from the list.

  5. And copy this number:

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

This functionality works for any subscription plan!

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

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

Last updated