Hi. Im trying to make an automation which would make a telegram notification based on a message incoming in JSON data through a webhook.
Unfortunately, with webhooks its hard to debug those automations, as i cannot use template debuger.
Here’s my JSON:
{ "event": "charging" }
And here’s my automation:
- service: notify.notifier_telegram
data_template:
title: "Car battery"
message: "Car engine is now {{ trigger.json.event }}!"
Which fails.
If i remove event from the template:
message: "Car engine is now {{ trigger.json }}!"
the automation works, but the notification is just “Car engine is now” message.
I have tried:
message: "Car engine is now {{ trigger.json.data.event }}!"
message: "Car engine is now {{ trigger.json.data['event'] }}!"
message: "Car engine is now {{ trigger.json['event'] }}!"
But they all fail - no message is sent at all.