I think you are close to a solution.
The point is that the environ variables in the notification systems are prefixed with NOTIFY_
You can use this notification script to get an idea what is available.
OMD[central22]:~$ cat local/share/check_mk/notifications/notify-by-file.sh
#!/usr/bin/env bash
# 00 notify-by-file.sh
printenv | grep -P '^NOTIFY_.+=.+' > /tmp/notify-by-file.$$.log
This documentation is old but still a little helpful:
https://web.archive.org/web/20190531154256id_/https://checkmk.com/cms_notifications.html
More recent docs:
Best explanation currently available is probably this: