You’re putting templates inside templates. That’s not how templating works. The entire line is a chunk of code. There’s no reason to put the ‘template indicators’ inside a line with template indicators.
I.e.
This is wrong:
{% {{ code }} %}
{{ {% code %} }}
This is correct:
{% code %}
{{ code }}
Also, you’re taking code and turning it into a string.
What variable are you expecting to receive in the script? In your case, you have no variable. variables is a special field for scripts to pass variables. You’re passing nothing essentially. Also, you technically don’t need the vairables field because it’s a bit redundant and it’s legacy functionality. You can just supply the variable itself to the data.
Lastly, data_template is no longer required as long as you’re using the newest version of Home Assistant.
So, assuming that you are trying to pass the msg variable:
Thanks for pointing out the syntax errors. Good to learn as I’m exploring new territories.
However, I still do not the get the value ’ the ‘object_id’ which triggered the action, in the message to notify script.
Basically the trigger has multiple entities [ input_boolean.camera1, …2 …3 etc ] and I’m trying to send a notification, which one triggered the action.