Notify if WAN IP changes?

I have been trying to get this to work with no luck. What I would like is if my WAN address changes Node Red will send me a message saying from and to. I have it sending a message now but it will not fill in the IP address in the message.

Found this example on the forums to make a HA automation but don’t know how to put it in Node Red.

    platform: state
    entity_id: sensor.myip
    service: notify.mobile_app_dave_iphone8
      message: 'Public IP changed from {{ trigger.from_state.state }} to {{ trigger.to_state.state }}'
          sound: "Attention.wav"

I’m using a trigger state node into a call service node with a JSON of:

    "message": "Public IP changed from {{ old_state }} to {{ trigger.to_new.state }}"

you can use data.event.old_state.state and data.event.new_state.state