I’m curious about a data explorer custom action for notifying all @staff or @admin group every time one of them reads the contents of a user private message, or notifies by creating a post in our #staff category. I’m new to Data Explorer, but it does seem awesome!
I think that what you are looking for would be to have an entry added to the staff action logs (found on your Admin / Logs / Staff Actions page) if the results of a Data Explorer query show a user’s personal message.
If a staff member views a user’s email address through the UI, an entry is added to the staff action logs. If the log personal messages views site setting is enabled and an admin views a PM through the Discourse UI, an entry is added to the staff action logs. If the same data is viewed by running a Data Explorer query, no entry is added to the staff action logs. I’m not sure if there’s a good solution for this, but it’s something I’ve wondered about in the past.