Syntax error in actionable notification - trying to load camera stream

I am trying to write a script which will send an actionable notification to my Android phone. When I click the notification I want to be taken to a camera stream.
Can anyone help me to understand why I’m getting this syntax error in my script:

Message malformed: extra keys not allowed @ data['service']

This is the script:

service: notify.mobile_app_ian_galaxy_s24_ultra
data:
  title: "Front Door Motion Detected"
  message: "Check camera feed."
  click_action:
    type: "url"
    url: "/lovelace/0/camera.e1_zoom_hall_fluent" 
service: notify.mobile_app_ian_galaxy_s24_ultra
data:
  title: "Front Door Motion Detected"
  message: "Check camera feed."
  data:
    clickAction: "/lovelace/0/camera.e1_zoom_hall_fluent"

clickAction goes in the data section, type and url is not used. This action is only available to android phones.

https://companion.home-assistant.io/docs/notifications/notifications-basic/#opening-a-url

Thanks for your reply. Unfortunately that syntax gives me exactly the same error:

Message malformed: extra keys not allowed @ data['service']

???

If I prefix the code with sequence: it now passes the validation check.
However, when I click on the notification it doesn’t display the stream from the camera - it just takes me to my Lovelace home page.
Any idea how I can be taken directly to the camera stream?

You’re trying to directly link to the camera entity. Your clickAction link need to be a view or subview. eg clickAction: /lovelace/side-drive-camera

You’ll need to create a lovelace card that displays your camera entity. Then this card must be placed in a view and that view is what you link to in the clickAction using whatever you set in the path parameter of the view.

service: notify.mobile_app_ian_galaxy_s24_ultra

I overlooked this in my first reply. service was changed to action 2024.8.

action: notify.mobile_app_ian_galaxy_s24_ultra

It should still be action instead of service.

https://www.home-assistant.io/docs/scripts/#grouping-actions

Ah Ok thanks. It’s a little messier than I was hoping for but at least it’s possible.