Scripting with service_template problem - one script to notify them all!

so… I am building one “simple” script, to perform notifications - based on input_booleans switched on or off in the frontend. just to have one thing that displays info on different platforms, for different family members.
tried, and failed at first attempt :wink:

my “notification_script.yaml” contents:

sequence:
- service_template: >-
    {% if is_state('input_boolean.bln_notifyjoin', 'on') %}
      data_template:
        title: "{{ var_temat }}"
        message: "{{ var_tresc }}"
        data: {"icon":"{{ var_ikona }}"}
    {% endif %}
  entity_id: notify.ntf_join
<...and here goes more service_templates build in a same way>

all the var_* are texts in variables.
after running that script I’ve got this error: ERROR (MainThread) [homeassistant.helpers.service] Template rendered invalid service: and the whole data_template: contents goes here.

what I did wrong?