Activity e-mails / daily summary

Hi friends,

I noticed that quite often, the notification e-mails I receive from my nextcloud instance are less useful than they could be. If I understand correctly, notification emails contain a chronological list of file edits as they were processed by the server. When someone edits a file in the text editor, the list will contain dozens of individual edits. From a user perspective, this information is of questionable significance.

The daily summary on the other hand - again, if I understand correctly - simply truncates the list. Information content is limited, for me it just serves the purpose of saying “Hello user, here I am, it’s your nextcloud”.

Is there an existing solution to create more meaningful and more intuitive e-mails?

For example, I could imagine the following:

  • When a user makes multiple edits in one file, mention only the latest edit.
  • When several users edit one file, show only the latest of all edits, but print the list of users as well.
  • When a user edits several files in the same directory, summarize these edits and mention the parent directory, as well as the file which saw most edits.

These are just ideas - I think some heuristics are needed to have an intuitive summary someone can understand in less than a minute. Is there any approach for it yet? If not, could someone give me a hint which source code files to look at when I want to implement it on my own?

Best
vorti

Edits of files are not mentioned in activity reports anymore in latest Nextcloud versions:

Hi,
I have Nextcloud version 22.2.3 (everything up-to-date) and it does include edits of files in the activity e-mails (if user settings are chosen accordingly).
I did not find any way to customize these e-mails. I would consider implementing something on my own, and - if I achieve something which is usable - possibly commit it. However, I’m not familiar with the Nextcloud software architecture - I don’t really know where to start without breaking something.

Can you share your settings? I’ve been trying to get a movement going to get the activity app back to pre NC20.

Yes, sure.
Here is system config, activity app config and my user settings (user does receive e-mails) - let me know if you want to see anything else.

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "... (removed)"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "22.2.3.0",
        "overwrite.cli.url": "... (removed)",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "session_lifetime": 7200,
        "auto_logout": false,
        "remember_login_cookie_lifetime": 1296000,
        "session_keepalive": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 0
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 1,
        "filelocking.enabled": true,
        "enable_previews": false,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG"
        ],
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "mail_smtpdebug": true,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "activity_use_cached_mountpoints": true,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log"
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.15.0",
            "notify_email_announcementcenter": "1",
            "notify_email_calendar": "0",
            "notify_email_calendar_event": "0",
            "notify_email_calendar_todo": "0",
            "notify_email_comments": "0",
            "notify_email_contacts": "0",
            "notify_email_favorite": "1",
            "notify_email_file_changed": "1",
            "notify_email_file_favorite_changed": "1",
            "notify_email_group_settings": "1",
            "notify_email_public_links": "0",
            "notify_email_remote_share": "0",
            "notify_email_shared": "0",
            "notify_email_spreed": "0",
            "notify_email_systemtags": "0",
            "notify_notification_announcementcenter": "0",
            "notify_notification_calendar": "0",
            "notify_notification_calendar_event": "0",
            "notify_notification_calendar_todo": "0",
            "notify_notification_comments": "0",
            "notify_notification_contacts": "0",
            "notify_notification_favorite": "0",
            "notify_notification_file_changed": "0",
            "notify_notification_file_favorite_changed": "0",
            "notify_notification_group_settings": "0",
            "notify_notification_personal_settings": "0",
            "notify_notification_public_links": "0",
            "notify_notification_remote_share": "0",
            "notify_notification_security": "1",
            "notify_notification_shared": "0",
            "notify_notification_spreed": "0",
            "notify_notification_systemtags": "0",
            "notify_notification_twofactor_totp": "1",
            "notify_notification_twofactor_u2f": "1",
            "notify_setting_batchtime": "3600",
            "notify_setting_self": "0",
            "notify_setting_selfemail": "0",
            "types": "filesystem"
        },
    }
}

My user settings
  - activity:
    - activity_digest_last_send: 13871
    - configured: yes
    - digest: 2021.12.24
    - notify_email_announcementcenter: 1
    - notify_email_calendar: 0
    - notify_email_calendar_event: 0
    - notify_email_calendar_todo: 0
    - notify_email_comments: 0
    - notify_email_contacts: 0
    - notify_email_favorite: 1
    - notify_email_file_changed: 1
    - notify_email_file_downloaded: 0
    - notify_email_file_favorite_changed: 1
    - notify_email_group_settings: 1
    - notify_email_public_links: 0
    - notify_email_remote_share: 0
    - notify_email_shared: 1
    - notify_email_spreed: 1
    - notify_email_systemtags: 0
    - notify_notification_announcementcenter: 0
    - notify_notification_calendar: 0
    - notify_notification_calendar_event: 0
    - notify_notification_calendar_todo: 0
    - notify_notification_comments: 1
    - notify_notification_contacts: 0
    - notify_notification_favorite: 1
    - notify_notification_file_changed: 1
    - notify_notification_file_downloaded: 1
    - notify_notification_file_favorite_changed: 0
    - notify_notification_group_settings: 0
    - notify_notification_personal_settings: 0
    - notify_notification_public_links: 0
    - notify_notification_remote_share: 0
    - notify_notification_security: 1
    - notify_notification_shared: 1
    - notify_notification_spreed: 1
    - notify_notification_systemtags: 0
    - notify_notification_twofactor_totp: 1
    - notify_notification_twofactor_u2f: 1
    - notify_setting_activity_digest: 1
    - notify_setting_batchtime: 86400
    - notify_setting_self: 0
    - notify_setting_selfemail: 0