hi <@ULVA73B9P> I want to send notification email...
# ask-marvin
s
hi @Marvin I want to send notification emails to my users summarizing a set of activities. Rather than sending an individual email for each activity, I want to batch them together. The requirements are as follows: The system must trigger an email flow as soon as either condition is met • If the user receives 10 activities before the 1-minute window elapses, an email is sent immediately. • If fewer than 10 activities occur within the minute, the email is sent once the minute is over. Once an email is sent, the batch of activities is cleared. New activities will start accumulating in a fresh batch, restarting the fixed time interval and activity count conditions. can you send me a sample implementation for my requirement? Note: I want to store the activities list as a variables (not in any queue or in memory)