Error in script?

Can someone explain me what is wrong in this script?

    - service: notify.telegram
        title: '**-- GDrive Backup HASSIO --**'        
        message: &check_sync >-
          {% if is_state("input_boolean.gdrive_sync_completed", "off")  -%}
            ERRORE nel Gdrive backup!
          {%- else -%}
            Backup su GDrive completato alle {{states('sensor.time')}}
          {%- endif %}

I get NO notification from telegram bot.

get rid of the invalid anchor

Sorry, it means?

You’re trying to create an anchor here on a single field that doesn’t result in a dictionary. I.E. It’s invalid.

So the solution is simply to remove that?
That script is part of a package…

Yes but after looking at yaml documentation, that might be valid.

Yes i checked me too, but why i don’t get the notification?

Try executing a normal service through the service caller