How to input/set values through a messenger like Telegram?

I’m getting stuck/just don’t understand what I’m doing here, so hopefully someone can fix my script!

My house has district heating with a dumb meter. I would like to manually record (log) the meter every so often. For convenience (and having a long term history) I would send my HA bot a message over Telegram, like: “meter 171.30”
I think I mostly fail at understanding how I could trigger my script when a keyword is sent with a variable after that, and how I could use the variable afterwards.

alias: "Energy meter logging through Telegram"
description: "Manually record energy meter (for later conversion to m3 gas equivalent to add to Energy dashboard)"
  - platform: event
    event_type: telegram_text
      text: meter
condition: []
  - service:
      message: Hello world!
  - service: notify.notify
      title: "\"Meter\" value will be set"
      message: "current value was: {{input_number.warmth}}"
  - service: input_number.set_value
      value: "{{ trigger.event.message.text.split()[1] }}"
      entity_id: input_number.warmth
mode: single

Thanks in advance for sharing your knowledge!