This isn’t really a problem, but more of a question. On the Raspberry PI where I installed Nextcloud, I also run an instance of ntfy, among other things. I use this to receive notifications from various system services. Other devices in the house also use this instance to send me various notifications/log files, etc.
I have only been using Nextcloud for a few weeks. So this is a new addition. Nextcloud now also has various notifications that I can see in the WebGUI. They are also sent to me by email if I do not respond to them within one day.
Can I also have these notifications sent to the ntfy instance? In theory, a simple curl command would suffice. Presumably, this can be done via these workflows, but I have no idea how to proceed. All I have seen so far about the workflows is that I can download additional workflows from the store. However, there is no ready-made workflow for ntfy available there yet.
The Nextcloud app doesn’t receive notifications on my device because it wasn’t installed from the Play Store. Delivering them via ntfy would be a great alternative.
I have not found a build in solution, but i created now a small PHP Script. This runs every 5 minutes and checks via /ocs/v2.php/apps/notifications/api/v2/notifications if there are unread notifications. If so, I send the notification to a ntfy instance. To not send a double notification, i cache the send notifications in a small json file, so that i don’t send the same message twice.
With that, i have only the overhead on the server itself, to check periodically, if new messages are available and send only a new push, when needed.
If someone is interested, i can publish the code here. Its just a simple script. Maybe someone can make a NC app out of this. This is a little bit beyond my NC knowledge, since i startet with NC not long ago.
Awesome! I would be interested in your script since the solution via Nextcloud’s Push-Proxy seems quite convoluted to me. Also, it again is reliant on a third party server..
Sorry, I was on vacation for the last few days. Here is the script. I run it every 30 minutes using a systemd timer unit. Crontab or similar are also OK.
There are probably still some bugs in it, but at least it has been working without any problems here so far.