This is general-purpose article. You can use a more specific articles
How to send alerts from Discord to MetaTrader 4/5
How to send alerts from MetaTrader 4/5 to Discord
How to send alerts from Telegram to MetaTrader 4/5
How to send alerts from MetaTrader 4/5 to Telegram
How to send alerts from TradingView to MetaTrader 4/5
Import AdvancedNotificationsLib.dll
#import "AdvancedNotificationsLib.dll"
void AdvancedAlert(string key, string text, string instrument, string timeframe);
#import
Send the telegram message by calling AdvancedAlert
AdvancedAlert(AlertKey, message, Symbol, "m1");
You can find a real-world example here: MT4 Engulfing Pattern with Telegram alerts