Removing events from a Scheduled Digest
Does anyone have a recommendation on how to exclude specific events from a Digest after the Workflow has been triggered (still before the digest sends)?
Use case: we want to deliver a weekly digest to users that contains a list of tasks that will be due that week. Ideally, we would like to exclude any tasks that have been completed prior to sending the digest.
Right now the workflow triggers when a new task is created.
Any suggestions y'all may have would be graciously accepted.
Thanks π
3 Replies
Hi @3TreeTee, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Digest Engine
* Digest multiple events in a single notification
* Workflows
* Delay Action
-----------------------------
Answer
To exclude specific events from a Digest after the Workflow has been triggered but before the digest sends, you can use the event cancellation API provided by Novu. This allows you to cancel any event before the digest time completion, ensuring it will not be included in the final digest events array. This would be ideal for excluding completed tasks from your weekly digest of due tasks. Refer to the documentation for more details on how to implement this in your workflow (1) .
@3TreeTee
Triggered event can be cancelled using this API
https://docs.novu.co/api-reference/events/cancel-triggered-event