(Наталья) 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
The setup process is the same for all messengers connected to Mavibot.
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.
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)
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)
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)

Finding the platform_id:
You need to have a Telegram bot connected to the project.
The bot must have received at least one message from the account you want to send notifications to.
Move to the "Clients" tab on Mavibot:
Choose the dialog you need from the list.
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
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