Get script_id not friendly_name inside script

Hi, i want to store the ID of the running script in an input_value for later use.
But all i find, is a way to get the friendly_name, which is not what i need.
Below is the code as i have it, can anyone help me get that last line correct?

  - action: input_text.set_value
    metadata: {}
    data:
      value: '{{ states("input_text.hkanaal") }}'
    target:
      entity_id: input_text.vkanaal
  - action: input_text.set_value
    metadata: {}
    data:
      value: '{{ this.attributes.friendly_name }}'
value: '{{ this.entity_id }}'

I must have made a mistake, as i tried many options, including this one, and didn’t seem to work.
But now this works, thanks a million!
Would be great if the developers would add this to the documentation.

It’s already in the docs… In the first sentence of the explanation of the variable this, it links directly to the page that describes the available properties of the State Object.

You can also find it empirically by going to your script’s debug Trace, then selecting the Changed Variables tab in the lower section. The first thing shown will be all the values of the this variable for that run of the script: