I am trying to send emails to users who have unread messages/notifications, but I am struggling to find a way to do it. I was thinking of a system that keeps track of messages/notifications and if they are unread for an hour, then it would send email to the user that will inform them of the messages.
What I found: With cloud scheduler, I will be able to send emails every hour to users that have unread notifications. However, if the user got a notification a minute ago, they will still get an email and that will be annoying for them.
Sending email notification with every message/notifications, with firestore onUpdate
will be even more annoying.
Does anyone know if there is a way to do this by tracking notifications/messages as I described on the top? Is there any other way of doing this, that I missed?