Skip to navigation

Creating a Workflow with Digest

Digest Notifications work by collecting multiple trigger events, aggregating them into a single message, and delivering it to the user. This becomes useful when a user needs to be notified of a large number of events and you want to avoid sending too many notifications.

How Digest works

One digest per window

Creates a digest for each specified time window.

Starts on the first event

The window starts from the first event trigger.

Sends when the window ends

The message is sent when the digest window ends.

Best for:

  • Consistent communication intervals
  • Periodic updates
  • Non-urgent, informational notifications

This approach ensures regular updates without overwhelming users, regardless of activity levels or triggers.

Example

PartDetails
ScenarioA user has 5 SIPs scheduled on the 1st of every month, and all SIPs failed due to insufficient balance.
ProblemSending a notification for every SIP failure could spam the user.
SolutionUse digest notifications: collect SIP failures over a set period (for example, 1 hour) and send one summary notification.

Digest collecting 5 SIP failures into one notification

Reduces notification fatigue
Provides a comprehensive overview

This approach keeps users informed without overwhelming them, enhancing their experience with your app.

Steps to set up a Digest

This use case can be implemented with the below steps.

1

Create the workflow

Create a Workflow with Webhook as the trigger. You can read how to create it here.

2

Add a Digest node

After you add a Digest node in the workflow editor, each node below it is triggered only once in the specified digest interval.

Nodes you add before the Digest node are still triggered in real time, so you can send some messages right away and digest the rest.

3

Set the Digest Key

Provide a unique key to identify the user. This helps the workflow digest the notifications for that user. In this case, the user’s profile_id in your system is the Digest Key.

4

Set the Time Period

Specify how long you want to digest the notifications, from a minimum of 1 second to a maximum of 7 days.

5

Sum digest data (optional)

Select this checkbox if you want to add up a value across all digested events. For example, use it to calculate the total SIP amount across all the SIPs that failed.

  • Custom Variable: The variable you will use in your template. For example, if you add SIPAmount, your digest variable will be $digest.sum.SIPAmount.
  • Digest Key: Select the key whose values you want to add up.
6

Add a Notification Event

Add a Notification Event after the Digest node, depending on the communication you want to send.

Notification event settings

Click the settings icon at the top right of the Notification Event panel to open these tabs:

How to use Digest data in a Template?

In the template editor, you will find the system variables on the left.

For example, to notify users with the list of failed SIPs, you can do it as shown:

VariableWhat it gives you
$digest.headThe first 5 payloads, by default. You can see the payload in the Logs section.
$digest.tailThe last 5 payloads, by default. You can see the payload in the Logs section.
$digest.countThe total count of payloads received.
$digest.sum.<variable>The total of the value set in Sum digest data, for example $digest.sum.SIPAmount.

In this example, $digest.head.SIP_name gives you the SIPs which failed.

How to see logs for Digest?

You can see the Digest logs in Logs → Workflows. Sample logs below

  • Summary - You will see the Digest Key and count will show the no of requests digested. Total time taken will be updated once the Digest is completed and shows the total time taken.
  • Head - It will show the first 5 payloads received for Digest
  • Tail - It will show the last 5 payloads received for Digest

How to receive delivery reports?

Fyno allows you to forward delivery reports to your own system or integrate them with third-party analytics tools like Mixpanel and Amplitude. This feature enables you to track and analyze the success of your notification deliveries seamlessly.

You can read more about it here.

How to configure Idempotent Key?

Workflows now supports idempotency, ensuring you can safely retry requests without the risk of performing the same operation twice. This feature proves invaluable in scenarios where an API call gets interrupted in transit, leaving you without a response.

You can read more about it here.

How to configure overrides?

Fyno allows you to override pre-configured values within an Integration, enabling you to use different values for specific notifications in a Workflow. This flexibility is useful when you need to customize the sender information or other details based on the requirements of each notification.

You can read more about it here.