gotify cli for notifying me of nextcloud uploads
The Ask I was looking for a way to get notified from nextcloud when files were uploaded to a certain directory. This is because the upload is very spotty due to the physical environment of where the nextcloud client is, and once a file shows up I have a job to do. So I was hoping nextcloud had an easy way to say “if file shows up in X folder, notify me” but I can’t find it… Solution 2 # Since I already use gotify and they provide a DOPE CLI we can write a little bash script to work at the filesystem level rather than the nextcloud level. Permissions # We’ll need to make sure the user running this script has all the right read permissions… In my exact case the file upload happens in a group folder, which is easily found on the filesystem in the Nextcloud volume at. This was owned by on the host, see Add yourself to www-data to view your Nextcloud data on the filesystem if you want but a simple does the trick. The Script # With a little AI magic to spruce up the messaging, the script bas…