After-Hours Notification Digest Workflow
Queue after-hours CRM notifications and deliver them in one morning digest without duplicate delivery.
Overview
This article explains how to eliminate the pattern of overnight notifications waking an operator one at a time. When CRM notifications arrive between the end of one business day and the start of the next, each one triggers a separate alert, interrupting the on-call operator repeatedly and forcing them to wake or check their phone multiple times per night.
This article is relevant to operations leads, CRM administrators, and engineers who manage notification workflows in systems where alerts are generated outside business hours. It covers the conceptual design, the CRM configuration needed, the workflow logic, and the common failure modes.
After reading, you should be able to implement a single-morning-digest pattern for any notification type that currently fires individually after hours.
Prerequisites
Before implementing this pattern, confirm the following are in place:
- A CRM platform that supports custom objects and workflow automation on record creation (for example, a standard CRM with object-level triggers)
- A way to distinguish business hours from after-hours in the notification source (a timestamp field or schedule check)
- Permission to create a custom object and a workflow in the CRM
- Access to the notification delivery channel (email, SMS, or push) that the digest will use
- An existing notification trigger that fires when the source event occurs
If the notification source cannot attach a timestamp, the workflow must capture the arrival time at the moment the record is created.
Key concepts
Notification queue
A notification queue is a holding area for after-hours notifications that should not be delivered immediately. In this pattern, the queue is a CRM custom object. Each arriving notification creates one record in this object with the details needed to send it later.
Send window
The digest send window is the configured time at which queued notifications are bundled into a single message. In this pattern, the window is a fixed morning time, such as 08:00 on business days.
Sent stamp
A sent stamp is a field on the queue record that records whether the notification has been included in a digest. Before sending, the workflow selects only records without a sent stamp. After sending, the workflow sets the stamp so the same record is never included again.
The queue exists to separate notification receipt from notification delivery. Receipt happens in real time; delivery happens on a schedule.
Digest send window
The send window must be defined in the business's local time zone, because the definition of "morning" is specific to the team that receives the digest.
Sent stamp
Without the stamp, a record can be delivered twice if the workflow is re-run, retried, or triggered by an upstream event that fires more than once.
Design overview
The pattern has three stages:
- Capture — A notification arrives after hours and creates a queue record in the CRM custom object.
- Hold — The record sits in the queue, unsent, until the digest send window.
- Deliver — At the configured morning time, the workflow selects unsent records, bundles them into one message, sends the digest, and stamps each record as sent.
This design ensures the operator receives exactly one notification per after-hours period, regardless of how many individual alerts were generated overnight.
Procedure
Step 1 — Create the notification queue custom object
Create a custom object in the CRM to hold queued notifications. At minimum, the object requires these fields:
| Field | Type | Purpose |
|---|---|---|
notification_type |
Text or picklist | Identifies what kind of event occurred |
notification_details |
Text or long text | The payload of the notification (message, link, reference ID) |
received_at |
Date/time | When the notification arrived |
sent_at |
Date/time | When the notification was included in a digest; empty until sent |
digest_id |
Text | Identifies which digest run included this record; useful for audit |
The sent_at field is the sent stamp. An empty sent_at means the record has not been delivered.
Step 2 — Configure the capture workflow
Create a workflow that runs when the notification source fires. The workflow must:
- Check whether the current time falls inside or outside business hours.
- If inside business hours, deliver the notification immediately through the normal channel.
- If outside business hours, create a record in the queue object with the notification details and the current time in
received_at.
The business hours check is the branch that determines the delivery path. If the notification source cannot evaluate a schedule directly, the workflow can compare the current time against configured start and end times.
Step 3 — Configure the digest workflow
Create a second workflow that runs at the configured morning time. The workflow must:
- Query the queue object for records where
sent_atis empty. - If no records are found, end without sending.
- If records are found, build a single message that combines every unsent record into one digest.
- Send the digest through the configured delivery channel.
- After a successful send, set
sent_aton every included record to the current time and setdigest_idto the identifier for this run.
The order matters. Set the sent stamp only after the send succeeds. If the send fails, the records remain unsent and will be included in the next digest run.
Step 4 — Test with a single notification
Send a single test notification during after-hours and confirm:
- A queue record is created with the expected details.
- No individual alert reaches the operator.
- At the digest time, the digest is sent with exactly one item.
- The
sent_atfield is populated on the queue record after delivery.
Step 5 — Test with multiple notifications
Send several test notifications during after-hours and confirm:
- Each notification creates its own queue record.
- The morning digest contains all of them in a single message.
- After the digest, every included record has a
sent_atvalue. - Re-running the digest workflow sends nothing, because no unsent records remain.
Configuring business hours
Define hours
Business hours are the boundary between immediate delivery and queued delivery. Define them as a start and end time in the team's local time zone.
Digest timing
The digest time should be after business hours start, so the digest arrives at the beginning of the workday rather than before it. If the digest time falls inside business hours, notifications that arrive just after midnight and before the digest time will be queued and delivered in the morning bundle.
Day-of-week logic
The definition of business hours can include day-of-week logic. Notifications on weekends are typically queued and delivered on the next business day. This requires the schedule check to account for both time of day and day of week.
| Setting | Purpose |
|---|---|
| Business hours start | Earliest time at which notifications are delivered immediately |
| Business hours end | Time at which notifications are queued instead |
| Digest time | The configured morning time when queued notifications are sent |
Expected behavior
After implementation, the observable behavior should be:
- An after-hours notification creates a queue record but does not alert the operator immediately.
- Exactly one digest is sent at the configured morning time.
- The digest contains every notification that arrived since the last digest run.
- No notification is delivered twice, because the sent stamp prevents re-selection.
- If no notifications arrive overnight, no digest is sent at all.
An illustrative digest message might look like:
3 notifications received overnight:
1. Order #4821 — Payment failed (01:12)
2. Order #4821 — Payment retry succeeded (02:03)
3. Warehouse #7 — Stock level below threshold (04:47)
Each item includes the reference and the time the original notification arrived.
Troubleshooting
The digest contains duplicate notifications
Duplicates
Likely cause: Records were included in a digest but did not receive a sent stamp, or the digest workflow reads records before the stamp is written.
No digest
Likely cause: The digest workflow is not running, is running at the wrong time, or is filtering records incorrectly.
Individual alerts
Likely cause: The capture workflow is delivering immediately instead of creating a queue record, or the business hours check is evaluating to "inside business hours."
Stamp not applied
Likely cause: The stamp update is conditional on the send result, or the workflow fails between the send and the update.
Check: Inspect the queue records for the affected period and confirm whether sent_at is populated.
Resolution: Ensure the sent stamp is written in the same workflow run that sends the digest, and that selection for the digest queries only records where sent_at is empty. If duplicates exist from a previous run, stamp the affected records manually or delete them.
No digest is sent even though notifications arrived
Check: Verify the workflow schedule, the time zone of the configured digest time, and the query condition on sent_at.
Resolution: Confirm the workflow runs at the intended time in the intended time zone. Check the query filter and confirm the records are visible to the workflow's query scope.
Notifications still alert the operator individually after hours
Check: Review the branch logic in the capture workflow and confirm the schedule values used by the check.
Resolution: Correct the business hours configuration and verify that the workflow routes after-hours notifications to queue creation rather than immediate delivery.
The sent stamp is not applied after a successful send
Check: Review the workflow run history for the digest run and inspect the records that were sent but remain unstamped.
Resolution: Change the workflow so the stamp update is unconditional after a successful send. If a failure interrupted the run, apply the stamp manually to the affected records or allow the next digest run to include them.
Scope and limitations
Integration limit
This pattern assumes the notification source can be intercepted before delivery and redirected into a queue. If the notification source is an external system with no integration point into the CRM, the queue cannot capture the alert and this pattern does not apply.
Single digest time
The digest time is a single global value. If different teams require different digest times, each team needs its own queue object and digest workflow.
Urgent routing
The digest workflow does not handle urgent notifications differently. If certain notification types require immediate attention even after hours, they must be routed around the queue using a severity or type check in the capture workflow.
No read receipt
The sent stamp prevents duplicate delivery but does not provide an in-app read receipt. Tracking whether the operator opened the digest is outside the scope of this pattern.
Security guidance
- Store queue records with the same access controls as the source data they represent.
- Restrict the digest workflow to run under a service account with least-privilege access to the queue object.
- Do not include full credentials, tokens, or secrets in notification details; reference the record instead.
- Retain the
digest_idandsent_atfields for audit so you can trace which records were delivered in which digest.
Related
- Immediately-delivered vs queued notification routing
- Scheduling workflow triggers with business-hour calendars
- Deduplicating workflow runs with state stamps
- Audit trails for automated notification delivery
Was this article helpful? Thanks for your feedback.
Ready to build your first automation?
Get started with Octacer and transform how your team works.
Schedule Consultation