my solution to this is to only deal with the UPS in proxmox. it shuts down everything if the battery goes below a certain level.
I think you can configure nut to run a few scripts when something changes around the UPS. you could have a script that sends an alert through ntfy, and/or the web services that you want to use for this, but I’m not familiar with the notification system of nextcloud and truenas
one more thing I remembered when re-reading the title: I think you can send messages to the VM using the qm command. it stands for qemu monitor, basically its a management tool