How to send notification with json data from url?

Hi!
I suppose this one is pretty easy to solve but I can’t figure out how.
I want to read a json structure from an url and then send a push notification with a selected value using a json path.

I have tried this, which do not work. I also need to solve how to extract a single value from the returned json. Now the url returns a json structure, where I only want one of the values.

automation.yaml

- alias: BTC Price
  trigger:
    platform: time
    at: '06:01:00'
  action:
    service: notify.ios_phone
    data_template:
      message: "BTC Price: {{ states('rest_command.btc_price') }} NOK"

configuration.yaml

rest_command:
  btc_price:
    url: "https://api.coinbase.com/v2/prices/BTC-NOK/buy"
    method: 'GET'

I think you want to use a restful sensor.

sensor:
  - platform: rest
    resource: https://api.coinbase.com/v2/prices/BTC-NOK/buy
    name: btc_price
    value_template: '{{ value_json.amount }}'

You may need to tweak the value template.

Then your automation would be

- alias: BTC Price
  trigger:
    platform: time
    at: '06:01:00'
  action:
    service: notify.ios_phone
    data_template:
      message: "BTC Price: {{ states.sensor.btc_price.state) }} NOK"

Thank you, just what I needed