I would like to refer to the link I gave here. There are all the necessary man-pages and even a WIKI with sample scripts.
Maybe Iâll do a how-to on occasion, but thatâs not very Nextcloud related anymore.
Nextcloud has its own services that brings messages to your mobile phone about everything. Simply install the Nextcloud Android app and the âNextcloud Servicesâ app from the Droid Appstore. Then you can use the notification app (enabled by default) to send your server messages to the nextcloud notifications, which are then visible everywhere, in all clients.
Here is a thread where that is explained
and â this is a great example script â from how it works. You can learn a lot from the latter.
Much luck!