try using telegram
Here is an example of a RouterOS script that sends a Telegram message when a new device connects to a MikroTik device's network:
# Create a new script to send the Telegram message
/system script add name=send-telegram-message source="# Send a Telegram message
:local message \"New device connected to the network: $address\"
/tool fetch url=\"https://api.telegram.org/bot<TOKEN>/sendMessage?chat_id=<CHAT_ID>&text=\$message\"
Replace <TOKEN> with your Telegram bot's token and <CHAT_ID> with the chat ID of the recipient.
Next, create a firewall rule to trigger the script when a new device connects to the network:
# Create a new firewall rule to trigger the script
/ip firewall filter add chain=input connection-state=new action=jump jump-target=send-telegram-message
This script creates a new script called "send-telegram-message" that sends a Telegram message to a specified chat ID. It then creates a firewall rule that triggers the script when a new connection is detected on the "input" chain (which handles incoming traffic).
When a new device connects to the network, the firewall rule will be triggered and the script will execute, sending a Telegram message to the specified chat ID with the new device's IP address.
Overall, this script demonstrates how to use RouterOS to send a Telegram message when a new device connects to a MikroTik device's network. You can customize the script and the firewall rule to meet your specific needs and requirements.