When to use it
For products where activity happens while the user is away: comments, edits by teammates, new results. A digest gives them a reason to come back on a predictable day without a notification for every change.
How it works
- 1A
digest_dueevent starts a journey. The app sends the first one when the user turns the digest on. - 2
timeWindowholds until Monday between 08:00 and 10:00 in the user’s time zone. - 3The digest email goes out.
- 4Six days later,
sendEvent(e.digest_due)emits the event that starts next week’s journey, and this one ends. - 5If the user switches the digest off (
digest_enabledfalse),exitWhenends the current journey and the cycle stops.
Why it's built this way
No loop: an event edge
A workflow is a tree; it cannot jump back. Each week is its own short journey, and the last step emits the trigger of the next. Every week is then a separate instance with its own history.
Why concurrent
The next digest_due is emitted by the last step, while this journey still runs. Under after_exit it would be dropped, and under never the cycle would stop after one week. concurrent lets it in.
The cooldown is the backstop
With concurrent, a stray extra digest_due (the app sending it twice, say) could start a second weekly cycle. A 6-day cooldown from the previous entry refuses it; the journey’s own event always arrives after six days.
exitWhen stops the cycle
Opting out of the digest topic skips the email, but the weekly journeys would keep running. exitWhen on the profile flag ends them.
Make it yours
- Pick another day and hour in the
timeWindow; it is in the user’s time zone by default. - Make it fortnightly with a 13-day delay and cooldown.
- Skip a week with nothing to report: a
branchon recent activity before the email. - Start the cycle from another workflow’s last step instead of from the app.
What to measure
Sessions on Mondays from digest recipients, and digest unsubscribes.