Digest Action Step
The digest engine is designed to streamline notifications by accumulating multiple trigger events into one coherent message before delivery to the subscriber.
This function proves beneficial when a user needs to be alerted about numerous triggers, but it’s important to minimize the frequency of notifications. Novu automates this process, batching incoming trigger events according to a unique subscriberId. There is also the option to include a digestKey, providing additional control over event digestion workflows.
Step Interface
Using the digested triggers
The digest function returns an array of triggers that have been digested. You can use this array to perform any necessary actions on the digested triggers. Like Sending and email, or updating a database.
The digest step returns an object with events
array. Each event in the array has the following properties:
id
- Thejob id
of the digested eventtime
- The time when the event was triggeredpayload
- The original payload passed to the event