/tool fetch problem

Good day
I really hope someone can help with this, I have been trying on and off for 5 days now to get this working.

I want to send my total traffic to a webhook on a daily basis, I have the traffic total sorted out, but the /tool fetch command is driving me crazy.
Here is the code that I have been trying to get going, please note that the data is just a sample to have something to send. It does not even matter if the data is not in the correct format.

When I execute the script I get the info of the $arr, but the webhook is not receiving any data and the last “End” echo is not executed. My assumption is that the webhook call has failed, but how do you see the reason. Also note that I have tested the URL in a normal browser address bar, even without sending any data the webhook still receives the call.
(Note this url will be discarded, only for testing).

Code:
:local arr {“mac”=“aa:bb:cc:dd:ee:ff”;“ip”=“192.168.100.80”};
log info $arr
/tool fetch http-method=post http-header-field=“Content-Type: application/json” http-data=$arr url=“https://flow.zoho.com/794429131/flow/webhook/incoming?zapikey=1001.8cf935500409ed8bb785ad21afd3c8c6.3df061ea8262b69d073005d67d9666ce&isdebug=false
:log info “End”

Lastly, if I cannot get this command working, what would be the best option to get a daily log of the data consumed? This is for home use and I do not have a server / PC that is running all the time on the internal network.

Thanks in advance.

A Mikrotik array is not JSON. Either use the :serialise function in newer versions of RouterOS v7, or construct a data variable containg valid JSON. For example:
:local jsondata “{"mac":"aa:bb:cc:dd:ee:ff","ip":"192.168.100.80"}”

True. But the English lost the Z wars, it’s “:serialize” :wink:
For example,

:local jsondata [:serialize to=json {"mac"="aa:bb:cc:dd:ee:ff";"ip"="192.168.100.80"}]