Passing multiline fields to a script

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: ""


Hello Grant,

Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
You can use the </> button like this… How to format your code in forum posts
OR… Here is an example of how to fix formatting from the site FAQ Page.
How to help us help you - or How to ask a good question.

You can pass them all at once, however if you want to retain the carriage returns, you’ll need to do some extra leg work. Templates typically naturally strip whitespace unless you’re going to markdown card.

Done.

Sorry I copied from my post on Reddit & the formatting didn’t come over.