Hi all. Hope you are all doing great.
I am just beginning to dive in Mikrotik scripting and found a roadblock that’s preventing me from doing what I want - I need to be able to execute commands using a script and in turn prints the output of the command to a webhook
E.g.,
/tool fetch mode=https url=“https://xxxxx” http-method=post http-data=“payload={"attachments": [ { "title": "Outage Alert", "text": "[Device.Name] ([Device.FirstAddress]) is [Device.Status]", "color": "danger" } ] }”
The above prints the correct Device.Name from The Dude as they are variables. I wanted to do the same using RouterOS terminal and instead paste command output on the webhook
/tool fetch mode=https url=“https://xxxxxx” http-method=post http-data=“payload={"attachments": [ { "title": "Test Print Script", "text": "do=[:execute {/system history print}]", "color": "good" } ] }”
Obviously, it prints /system history print as is on the Webhook channel.
How do I go to print command outputs to a webhook integration?
Any help would be appreciated!