Quiet-hours alert digest
Non-urgent alerts are held overnight and delivered as one digest at the hour you pick. Urgent ones — your rules say which — pass straight through.
- alertId
- AL-SAMPLE-1
- severity
- low
- source
- Sample monitor
- message
- Sample alert: disk at 70%
Sample result: Held for the morning digest (not urgent). Digest delivered at your chosen hour with 3 held alerts.
What each step does
Step 1 · Rule check
Your written rules are checked against what arrived. A tripped rule is named, with its reason in plain words.
Step 2 · Sort by the check
The run takes one of two paths, decided by the check before it — never by guessing.
Step 3 · Write it back
The outcome is posted back through the connection you name. The secret stays sealed; the step carries the name only. Runs when the check before it matched.
Step 4 · Shape the note
The wording of the note is shaped from the fields picked below. Runs when the check before it did not match.
Step 5 · Paths join
The two paths join here, and the run continues as one.
Step 6 · The result
This is what the run hands back, written into the run's record where you can read it.
What you'll fill in
These are the only things the template asks of you. Examples teach the shape — they are never values your flow runs on; what you type (or the stated starting value) is what gets used.
| Field | What to put in it | Example |
|---|---|---|
| Digest hour | The hour the morning digest is delivered (0–23). | 7 |
| Send urgent alerts through | The connection, by name, urgent alerts pass through. Optional — leave unset and urgent alerts stay in your runs record only. | A connection you name — never a key pasted here |
Set it up
- Fill in the fields below.
- Name the connections it needs — by name only.
- Look at the trigger preview: what would start a run, counted before anything is armed.
- Review the steps, the rules, and every place a person is asked.
- Create it — then run it once yourself, and read the run's record.
Use this template
The definition
The whole mechanism, before you take it. Package checksums: sha256:420b9609a51d… · sha256:225e2bf01e21… · sha256:d37c9ad3b1f3…. A flow made from this template carries this template's name and version in its record, and exports in the standard bundle with that provenance.
Advanced · the three files, as written
{
"trigger.json": {
"template": {
"slug": "quiet-hours-alert-digest",
"version": 1,
"name": "Quiet-hours alert digest",
"category": "checks-alerts",
"outcome": "Non-urgent alerts are held overnight and delivered as one digest at the hour you pick. Urgent ones — your rules say which — pass straight through.",
"outputName": "Morning digest",
"fits_when": [
"alerts"
],
"needs": []
},
"trigger": {
"type": "webhook.received",
"source": "webhook",
"manifestFields": {
"alertId": "string!",
"severity": "string!",
"source": "string!",
"message": "string!"
}
},
"inputConvention": "envelope",
"variables": [
{
"name": "digestHour",
"kind": "int",
"label": "Digest hour",
"instruction": "The hour the morning digest is delivered (0–23).",
"example": 7,
"default": 7
},
{
"name": "notifyConnection",
"kind": "connection",
"label": "Send urgent alerts through",
"instruction": "The connection, by name, urgent alerts pass through. Optional — leave unset and urgent alerts stay in your runs record only.",
"optional": true
}
],
"sample": {
"input": {
"alertId": "AL-SAMPLE-1",
"severity": "low",
"source": "Sample monitor",
"message": "Sample alert: disk at 70%"
},
"output": "Held for the morning digest (not urgent). Digest delivered at your chosen hour with 3 held alerts."
}
},
"flow.json": {
"name": "Quiet-hours alert digest",
"inputConvention": "envelope",
"clefIn": [
{
"ruleset": "alert-intake-starter",
"ids": [
"alert-has-message"
]
}
],
"steps": [
{
"type": "rulecheck",
"rules": [
{
"ruleset": "alert-intake-starter",
"ids": [
"alert-has-message"
]
}
]
},
{
"type": "branch",
"path": "input.payload.severity",
"op": "eq",
"value": "urgent"
},
{
"type": "http",
"method": "POST",
"url": "https://example.com/alerts/urgent",
"when": "matched",
"connectionFromVariable": "notifyConnection",
"body": {
"segments": [
{
"text": "Urgent alert: "
},
{
"field": {
"source": "trigger",
"name": "message",
"label": "Alert · Message"
}
}
]
}
},
{
"type": "transform",
"when": "not-matched",
"template": {
"segments": [
{
"text": "Held for the morning digest: "
},
{
"field": {
"source": "trigger",
"name": "message",
"label": "Alert · Message"
}
}
]
}
},
{
"type": "end"
},
{
"type": "output",
"value": {
"segments": [
{
"text": "Alert handled: "
},
{
"field": {
"source": "trigger",
"name": "alertId",
"label": "Alert · ID"
}
}
]
}
}
]
},
"rules.json": {
"rulesets": [
{
"name": "alert-intake-starter",
"version": 1,
"rules": [
{
"id": "alert-has-message",
"on": "step.payload.message",
"op": "missing",
"action": "block",
"msg": "An alert without a message cannot be routed."
}
]
}
],
"permissions": {
"approvals": {
"approveBeforeSteps": [],
"rejectRequiresComment": true,
"dueSeconds": 259200,
"onExpire": "continue"
},
"connections": {
"required": [],
"optional": [
{
"nameFromVariable": "notifyConnection",
"usedBySteps": [
2
]
}
]
}
}
}
}