Hello
I'm trying to send a traceroute Report to the Telegram here is the script:
:local chat_id
:local bot_token
:local destination "8.8.8.8" # or any other IP address or domain name
:local output [/tool traceroute $destination]
:local timestamp [/system clock get value-name=time]
:local message "Traceroute to $destination (run at $timestamp):\n\n$output"
/tool fetch url=("https://api.telegram.org/bot$bot_token/ ... t=$message") mode=https
The script working correctly but the problem is here [/tool fetch url=("https://api.telegram.org/bot$bot_token/ ... t=$message") mode=https] I can't send the result ($message) which means Telegram URL doesn't accept variable , but when I change to static text it's work
also I tried to encode the output like that :
:local message [/urlencode $output]
instead of using
:local message "Traceroute to $destination (run at $timestamp):\n\n$output"
the same problem
Thanks