N
Novu7mo ago
flc

access digested notifications data

Hello, I have a doubt about digested notifications. I successfully implemented digesting and I know that step variables like (step.digest, step.events) can be accessed while in a workflow step. But once the digested message is accessed via NotificationCenter it seems that there are no data (payload essentially) from the other digested notifications. So is there any way to access data from all digested messages while in using NotificationCenter?
7 Replies
Ask Inkeep
Ask Inkeep7mo ago
Hi @flc, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question. ----------------------------- While I generate an answer, here are some sources that might be helpful: * How to Add Digest to Email Notifications * How to Add Digest to In-App Notifications * Digest Action Step * Digest Engine ----------------------------- Answer To access data from all digested messages while using NotificationCenter, you will need to ensure that you configure your digest templates correctly to include all relevant data. Here are some important points: 1. Digest Templates: Ensure that your digest templates are set up to include all events within the digest period. You can access properties like step.events which will contain the array of all events aggregated under the digest (1) (2) . 2. Payload in Templates: Use the Handlebars syntax to include the digested data in your notification content. For example:
Total events in digest: {{step.total_count}}
{{#if step.digest}}
{{#each step.events}}
{{name}}
{{/each}}
{{else}}
Not a digested template
{{/if}}

Total events in digest: {{step.total_count}}
{{#if step.digest}}
{{#each step.events}}
{{name}}
{{/each}}
{{else}}
Not a digested template
{{/if}}

Ask Inkeep
Ask Inkeep7mo ago
This will render all the events included in the digest (1) . 3. Notification Center Limitations: Currently, the Notification Center component may not show all digested events directly due to how it processes incoming notifications. You might have to customize the rendering logic to display all aggregated events properly (3) . 4. API Usage: If the Notification Center doesn't meet your needs, you could use the API to fetch and render notifications manually. This allows you to access the payload and other details directly from the response and construct the UI as needed (4) (3) . By ensuring you set up the digest templates to handle and display all events and making use of the API where necessary, you should be able to access and display all digested notification data effectively.
Ask Inkeep
Ask Inkeep7mo ago
Got it. Tagging @Support for additional help.
Pawan Jain
Pawan Jain7mo ago
@flc Currently it is not possible to use digest events payload with digested message in in-app notification center. This feature request is in our backlog. We will plan this soon I will keep you updated about this
flc
flcOP7mo ago
thank you very much @Pawan Jain for the information. is there any way I can keep track of this feature?
sumitsaurabh927
sumitsaurabh9277mo ago
Hey @flc I'd suggest keeping an eye on our PRs
flc
flcOP7mo ago
I'll keep an eye. thank you!
Want results from more Discord servers?
Add your server