How to call a service from a notification?

I’ve just started getting into Home Assistant and trying to create a notification to my phone if the garage door is left open (1 minute for testing purposes). So far I can get it to notify me with the action button but the action never plays out. Also is there a way to make this a “critical” notification for ios? Here’s my automation:

alias: "Notification: Garage Door Left Open"
description: ""
trigger:
  - type: opened
    platform: device
    device_id: REDACTED
    entity_id: binary_sensor.garage_door_tilt_contact
    domain: binary_sensor
    for:
      hours: 0
      minutes: 1
      seconds: 0
condition: []
action:
  - service: notify.mobile_app_jasons_iphone
    data:
      message: Garage door is left open!
      title: Garage Door
      data:
        actions:
          - service: cover.close_cover
            title: Close Garage Door
mode: single

I was able to get it work by rewriting the automation like this

alias: Garage Door Notification
description: ""
trigger:
  - platform: device
    device_id: REDACTED
    domain: cover
    entity_id: cover.garage_door
    type: opened
    for:
      hours: 0
      minutes: 5
      seconds: 0
action:
  - service: notify.notify
    data:
      message: Garage left open!
      title: Garage Door Open
      data:
        actions:
          - action: CLOSE_GARAGE_ACTION
            title: Close garage door
  - wait_for_trigger:
      - platform: event
        event_type: ios.notification_action_fired
        event_data:
          actionName: CLOSE_GARAGE_ACTION
    timeout:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
    continue_on_timeout: false
  - service: cover.close_cover
    target:
      entity_id: cover.garage_door
    data: {}
mode: single