I am working on this right now, and got something working. What really helped me was first creating an automation that gets triggered by the ‘event_type: mobile_app_notification_action’ with ‘action: REPLY’ in data to catch all replies, then just send a test reply, go to ‘Traces’ in the automation and click the tab ‘Changed Variables’. This will show you everything there is to know about the trigger. My guess is that the best way to filter the reply events is by a combination of device id/user id (if there are multiple devices or users involved), message text, tag and/or action title. Filtering by tag has been working for me, but using a tag also means that your notification will be replaced by a new notification with the same tag (which works for my use case, but may not be desired behaviour). Action title is the text on the action/button in your notification. Below is an example of the output shown at ‘Changed Variables’:
this:
entity_id: automation.notification_memo
state: 'on'
attributes:
id: '1728942408707'
last_triggered: '2024-10-16T10:30:50.729325+00:00'
mode: single
current: 0
friendly_name: Notification Memo
last_changed: '2024-10-16T10:34:31.764158+00:00'
last_reported: '2024-10-16T10:34:31.764158+00:00'
last_updated: '2024-10-16T10:34:31.764158+00:00'
context:
id: 01JAAE9FEMNEQQ806VF2JJ0M2T
parent_id: null
user_id: null
trigger:
id: notification_memo_reply
idx: '4'
alias: Reply
platform: event
event:
event_type: mobile_app_notification_action
data:
action_2_title: New Memo
sticky: 'true'
tag: notification_memo_persistent
group: notification_memo_persistent
webhook_id: 4a0e9fe17d489da847affd7c4f7c8d92919b3f8547fff304aadb8f22e01ffa6c
persistent: 'true'
channel: Memo_Persistent
clickAction: noAction
message: Note to self
action_1_title: Disable
action_1_key: notification_memo_disable
action_2_key: REPLY
importance: min
server_id: '2'
reply_text: Test reply 4
action: REPLY
device_id: fb35fa9a18221d4c
origin: REMOTE
time_fired: '2024-10-16T10:34:43.497736+00:00'
context:
id: 01JAAE9TX9MS0H30MG2HGPSS8R
parent_id: null
user_id: f24a8c7c46ea4e6ba34d1334a0920aa4
description: event 'mobile_app_notification_action'
What you want is inside the event: data: section
This is what my automation trigger looks like:
alias: Reply
trigger: event
event_type: mobile_app_notification_action
event_data:
action: REPLY
action_2_title: New Memo
message: Note to self
id: notification_memo_reply
Hope this helps. As I said, I am still figuring this out myself at the moment. I haven’t tested this with multiple automations with reply triggers, but I got a good feeling that this will do the trick.
I tried adding an ‘id’ to the notification like in post #2, but it didn’t show up in the event data. I’m guessing this has something to do with new android notification specifications.
If filtering this way isn’t specific enough, and you have another action besides the reply action, you could ‘hide’ a unique identifier in the other (not REPLY) action key (in my example:
action_1_key: notification_memo_disable_b8f22e01ffa6c
Then, in your automation actions, you could use a template as a condition for an ‘If/Then’ or ‘Choose’ block.
{{ (trigger.event.data.action_1_key) == 'notification_memo_disable_b8f22e01ffa6c' }}
It’s rather hacky, but it seems to work.