Where do I define "actions"

I moved to a new house, upgraded all my gear and after several months am starting over with my Home automation.
I have my old configs for HA and Node-red, so using those to re-create some of what I had before. one of the things I can’t seem to remember or find is “actions” when sent in notification.
I will post my JSON that i used before.
you will see “upgrade_ha_yes” and “upgrade_ha_no” are actions created by me and when HA sends me a notification to my mobile phone, I can pick one. what i can’t seem to figure out is where in HA you denfine those actions. I looked through all my old yaml files and all the settings and it isn’t jumping out to me.

{
“title”: “Alert”,
“message”: “A new version of HomeAssistant is available. would you like me to upgrade?”,
“data”: {
“actions”: [
{
“action”: “upgrade_ha_yes”,
“title”: “Upgrade HA Now?”
},
{
“action”: “upgrade_ha_no”,
“title”: “I will upgrade manually”
}
]
}
}

I think the phrase you’re looking for is Actionable Notifications :wink:

Yes that is what I’m looking for but
" they allow the user to add buttons to the notification which can then send an event to Home Assistant once clicked"
where in HA do i define the Event that is to be listened for? the docs tell you how it can be configured. but not where you configure them. that’s what i can’t find or remember.

if i understand your question right… you put it in automations.

so in automation you’d have a trigger like this:

description: ""
mode: single
trigger:
  - platform: event
    event_type: mobile_app_notification_action
    event_data:
      action: upgrade_ha_no
condition: []
action: []

I watched a few youtube videos, appears different than how i remember and is different between node-red and HA
so moving on to testing.
thanks for the reply

Watch out for those YouTube videos. They get out of date really fast.

Don’t get me wrong, they’re a wonderful way to follow instructions if reading docs isn’t your thing, but try to stick to the more recent vids to minimise the risk of out of date info.