A couple of years ago I followed smart home junkie’s tutorial to set up a notification script (code below). Set it up for a couple of notifications that went to me and my wife (When she had the app) and forgot about it. Having just changed my phone & trying to update any automations that send notifications to use the script instead I have a couple that use click actions & channels so if i was to use the script for these I would need to pass the data block which has multiple lines.
e.g.
data:
clickaction: <someurl>
tag: alerts
channel: Urgent
Is there a way to pass this in a single field or would i need to add optional fields to the script for each option I want to pass in?
Notification script
sequence:
- action: notify.mobile_app_grant_op13
metadata: {}
data:
message: "{{ message }}"
title: "{{ title }}"
alias: Notify Grant
mode: restart
icon: mdi:account
fields:
title:
selector:
text: null
name: title
description: Enter message title
required: true
message:
selector:
text: null
name: message
description: Enter message
required: true
description: ""