This Telegram script is Not working Ros V7.22.1

Hi,

This Telegram script is working fine on Ros V6, but not working on Ros v7.22.1

:local sub1 ([/system identity get name])
:local sub2 ([/system clock get time])
:local sub3 ([/system resource get uptime])
:local sub4 ([/system resource get cpu-load])
:local sub5 ([/system resource get board-name])
:local sub6 ([/system resource get version])
:local sub7 10.11.24.15:3035
:local sub8 ([/system health get temperature])
:local sub9 ([/system health get voltage])

{/ tool fetch "https://api.telegram.org/bot585388xxxx:AAGsQNsZbO57gc7o-PQMeU9vk12Qxxxxxyw/sendMessage?chat_id=-86348xxxx&text=$sub1 %0A------------------------------------ %0AStatus: Running ok \E2\9C\85  %0ADevice time: $sub2 %0AUptime: is $sub3 %0ACPU use: is $sub4% %0ACPU Temp: $sub8 C %0ACPU Volt: $sub9 V %0ADevice Model:$sub5 %0ASoftware Version: $sub6 %0AIP: $sub7"
}
/file remove number=[find where name~"send"]

Now this is not working on Ros V7.22.1

Log showing this errors.

  • executing script Details from winbox failed, please check it manually.

  • syntax error (line 8 column 34)

  • Download from api.telegram.org FAILED: cannot open file: Filename too long

I have tryed lots of modify, but failed.

Please help me .

try this

:local sub8 ([/system health get [find name="temperature"] value])

:local sub9 ([/system health get [find name="voltage"] value])

Now getting error.

  • executing script Details from winbox failed, please check it manually.
  • failure: cannot open file: Filename too long (/tool/fetch; line 13)

Screenshot 2026-04-13 081745

Sorry to say, thats not the effective way of doing it.
If you read about the fetch command you can see that you can use the http-data and http-header-field to send the data, instead of sending the data trught the url.
Do you have the request command how it's should be done with curl maybe ?
I have seen this forum a curl to fetch converter.

And maybe set the output=none, so you don't want to save the output to file with that long filename. :grinning_face:

this to error?

:local sub1 ([/system identity get name])

:local sub2 ([/system clock get time])

:local sub3 ([/system resource get uptime])

:local sub4 ([/system resource get cpu-load])

:local sub5 ([/system resource get board-name])

:local sub6 ([/system resource get version])

:local sub7 10.11.24.15:3035

:local sub8 ([/system health get [find name="temperature"] value])

:local sub9 ([/system health get [find name="voltage"] value])


/ tool fetch url="https://api.telegram.org/bot585388xxxx:AAGsQNsZbO57gc7o-PQMeU9vk12Qxxxxxyw/sendMessage?chat_id=-86348xxxx&text=$sub1 %0A------------------------------------ %0AStatus: Running ok \E2\9C\85 %0ADevice time: $sub2 %0AUptime: is $sub3 %0ACPU use: is $sub4% %0ACPU Temp: $sub8 C %0ACPU Volt: $sub9 V %0ADevice Model:$sub5 %0ASoftware Version: $sub6 %0AIP: $sub7" keep-result=no

it must work

Ok, Thanks.

Its working…:+1: