Sending alert - comments recieved since last login

In our app, users make requests to the admin. Both the user and admin can pull up the details of this request and leave notes for each other to help process the request.

Requests have their own type and messages is a separate type so that when a note is added, a message is added to the request.

What I need to add now is an alert system for notes which have been received since the last time the user logged in. It would look similar to this.

Screenshot from 2019-12-21 08-06-26

So I have the elements worked out to make this happen, but I am unsure how to structure the search in order to get the count correct → “notes received since last user login”

Any assistance would be greatly appreciated. Thanks

You need to have a data field on the messages to select read or not read. You need to set up a way to update that field when the message has been read. Some of the ways I update the field is to think about all the ways a user can navigate to a message and on any of those add the workflow that when the message is opened, the “is_read” field is updated.

Then you just do a search: messages is read = no : count

In terms of drawbacks, I don’t have a native bubble workaround if you are concerned about a non-active user still signed in on the message screen and a new message sent. In my set up currently the user would get recognized as having read the message when quite possibly not.

There are plugins for detecting a users status of on site or not that would help with that issue.

In terms of recognizing a user as active in a thread or conversation, I use workflows that when they are part of a list of active users in the thread or conversation ( i.e. signed in and on the message screen ) then the users is added to a list of users who have not read the message.

Thanks for the detailed response. I will work on setting up a way to track flow to the messages.