Hello,
I am trying to set up automation to receive Telegram notifications whenever a Torrents starts or finished downloading. My notification system is working okay, and I can trigger the flow when the event happens.
But I can not pull information from the event so I can include it in the notification.
Namely, I want to send the name of the torrent in the notification.
Basically, the notifications that I get for now are just “Torrent finished! [blank torrent name]”
Because im not sure on how to format the code to pull the name from the event.
How do you do it?
This is my node flow:
[{"id":"ffde9529.e81178","type":"server-events","z":"f26fbf34.385be8","name":"torrent finished","server":"a0018f6b.a40b3","event_type":"transmission_downloaded_torrent","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":120,"y":580,"wires":[["4dbce032.0e733"]]},{"id":"4dbce032.0e733","type":"api-call-service","z":"f26fbf34.385be8","name":"","server":"a0018f6b.a40b3","version":1,"debugenabled":false,"service_domain":"notify","service":"telegram_bot","entityId":"","data":"{\"title\":\"*Torrent finished*\",\"message\":\"joo {{trigger.transmission_downloaded_torrent.data.name}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":540,"wires":[["1cd6b8f2.49f2c7"]]},{"id":"3d979131.f3fa16","type":"server-events","z":"f26fbf34.385be8","name":"torrent started","server":"a0018f6b.a40b3","event_type":"transmission_started_torrent","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":250,"y":700,"wires":[["56b55f68.573e68"]]},{"id":"56b55f68.573e68","type":"api-call-service","z":"f26fbf34.385be8","name":"","server":"a0018f6b.a40b3","version":1,"debugenabled":false,"service_domain":"notify","service":"telegram_bot","entityId":"","data":"{\"title\":\"*Torrent started*\",\"message\":\" jo {{ trigger.transmission_downloaded_torrent.data.name }}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":550,"y":680,"wires":[["1cd6b8f2.49f2c7"]]},{"id":"9b27c782.0e0ac","type":"inject","z":"f26fbf34.385be8","name":"","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":380,"y":620,"wires":[["56b55f68.573e68","4dbce032.0e733"]]},{"id":"1cd6b8f2.49f2c7","type":"debug","z":"f26fbf34.385be8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":580,"wires":[]},{"id":"a0018f6b.a40b3","type":"server","z":"","name":"NewHASSIO","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
And this, is the event information:
{
"event_type": "transmission_downloaded_torrent",
"data": {
"name": "[HorribleSubs] Re Zero kara Hajimeru Isekai Seikatsu - 26 [1080p].mkv"
},
"origin": "LOCAL",
"time_fired": "2020-07-17T06:19:53.536120+00:00",
"context": {
"id": "d778f5a645a04204af0f5d1c4504d516",
"parent_id": null,
"user_id": null
}
}