Remove read message from pending email digest
Hi, I have implemented an email workflow with a digest. However, I also have in-app notifications set up and users can see the notifications there and mark them as read. So basically, both workflows are triggered at the same time, except the in-app sends immediately and email digests for X minutes. My issue is that when a creator marks a notification as read in-app while the digest is pending, it's still going to be sent in the email because it was digested when it happened.
Is there a way to only send digested messages which aren't marked as read at the moment of sending?
6 Replies
I suppose you could use a single workflow for both in-app & digest, and check the outcome of previous step condition?
This should avoid adding that notification to the digest. Haven't tested this though..
Step Conditions | Novu Documentation
Create dynamic notification workflows using rule-based conditions. Control message delivery based on subscriber data, payload information, and workflow outcomes.
hey, thanks for the quick reply. I originally had it implemented like that, but IIRC there was an issue with multiple digests. meaning, if I wanted to define in-app digest on specific keys and a separate digest for the email, it didn't quite work.
@basarito
Thanks for sharing the use case.
I think you don't need to add multiple digests
Use this workflow 👇🏻
trigger -> in-app -> digest -> email
add previous step condition on email step

hi @Pawan Jain , thanks for the reply. I still need the two digests because my full use case is:
- if multiple events of the same type (e.g. user liked a post) happen within a minute, I want to send one grouped in-app notification (X users liked your post) instead of many individual ones. that's why I'm digesting in-app as well
- for the email, I only want to send "what's remaining unread" every X minutes and there as well I'm grouping the content in like a summary which is why I'm digesting it. so basically like a follow up to notify users they have pending unread in-app notifications
but perhaps I need to look at it in a different way and use "delay" instead 🤔 but only if I'm able to fetch all unread and digest them manually so to speak
Thanks for sharing the use case. Sharing the feedback with team