What this automation does
Instead of 40 separate alert messages during an incident, the on-call channel gets one grouped summary with the evidence linked, and quieter issues roll into a morning digest.
- Receive. Alerts from CloudWatch, Azure Monitor, Google Cloud Monitoring, error trackers and uptime checks arrive at one webhook.
- Group. Code groups alerts by service, environment and time window, and deduplicates repeats, so a cascade of related alerts becomes one alert group.
- Gather context. For each group, the workflow runs a predefined log query for the affected service and window, keeps the most frequent error signatures and a small sample of lines, and fetches recent deploys and config changes from GitHub.
- Redact. Secrets, tokens, emails, IP addresses and card-like numbers are masked by pattern before anything is sent to a model.
- Summarize. The model writes a short summary: what is failing, since when, scale, what changed recently, and up to two hypotheses clearly labeled as such, with links to the dashboards, log queries and commits.
- Deliver. Critical groups post to the on-call channel in Slack or Teams within a minute or two. Warnings and low-priority alerts go into a daily digest with trends.
When it is worth building
Build it when alert fatigue is real: people mute the alerts channel, or on-call engineers spend the first 15 minutes of every incident working out which alerts are related. It is especially useful for small teams and managed service providers watching several clients’ systems, where nobody knows every service deeply.
Do not build it to compensate for bad alerts. If most alerts are noise, tune thresholds and delete useless alerts first; summarizing noise produces tidy noise. And if your observability platform already offers AI incident summaries that you are happy with, use that and spend the effort on tuning instead. The same grouping idea applies to end-user IT noise; for that side, see automating IT helpdesk requests.
Architecture
| Layer | What we use | Why |
|---|---|---|
| Alert intake | A webhook endpoint fed by SNS HTTPS subscriptions, Azure Monitor action groups, Google Cloud notification channels and error trackers | One entry point regardless of source |
| Orchestration | n8n, often self-hosted inside your cloud account | Keeps log data in your environment; built-in Slack, Teams and GitHub nodes |
| Grouping | Code with a fingerprint per service, environment and error type | Deterministic grouping is debuggable; model-based grouping is not |
| Log context | Saved queries against CloudWatch Logs Insights, Log Analytics or Cloud Logging APIs | Bounded, reviewed queries instead of free-form log access |
| Redaction | Regex and allowlist-based masking before the model call | Secrets and personal data never reach the prompt |
| Model | Claude Haiku 5.5 for routine groups, Claude Sonnet 5.5 for critical incidents | Cheap for volume, stronger reasoning when it matters |
| Delivery | Slack or Microsoft Teams channel, plus a daily digest | Where on-call engineers already are |
How to build it
- Audit your alerts. List every alert rule, its volume over the last month and whether anyone acted on it. Remove or retune the worst offenders before automating.
- Route alerts to one webhook. Configure each source to post to the endpoint, and normalize payloads into one schema: source, service, environment, severity, title, timestamp, link. If log data must stay in your network, run n8n in your own cloud account (see n8n Cloud vs self-hosted).
- Write the grouping logic. Fingerprint alerts and group within a sliding window, with an update to the existing message instead of a new post when a group grows.
- Prepare saved log queries per service. Each query returns error counts by signature and a capped sample of lines for the window. Cap the bytes returned, not just the rows.
- Build redaction and test it. Run it against real log samples and look for anything that slipped through, especially tokens in URLs and headers.
- Write the summary prompt. Fix the format: impact, timeline, recent changes, evidence links, hypotheses. Tell the model to say “unknown” rather than guess, and never to recommend destructive actions.
- Add the digest. Summarize non-urgent groups once a day with counts and week-over-week trends.
The downloadable starter template below covers webhook intake, grouping, a CloudWatch log query, redaction, the summary call and Slack delivery.
What breaks in production
- Confident wrong root causes. The model blames the latest deploy because it is the only change it can see, while the real cause is an upstream provider. Label hypotheses, show evidence links, and track how often hypotheses were right.
- Secrets in the prompt. A token sits in a query string, and a new log format bypasses the redaction pattern. Redact by allowlist for known-safe fields where possible, and review samples monthly.
- Token blowups. A stack trace repeated 10,000 times fills the context. Deduplicate by signature and cap sample size before the model call.
- Summaries lagging the incident. The summary posts three minutes after the page, by which time the engineer has already started. Post the grouped alert immediately and edit in the summary when ready.
- Alert storms overwhelming the workflow. A full outage fires hundreds of alerts per minute. Queue intake, group first, and rate-limit model calls per group.
- Source payload changes. A monitoring vendor changes its webhook format and grouping breaks quietly. Validate payloads and alert on parse failures.
Timeline and cost
A setup with three to five alert sources, grouping, saved log queries for your main services, redaction and Slack or Teams delivery usually takes two to four weeks. Lumeor builds this in the range of $5,000 to $12,000, depending on the number of sources and services, the redaction requirements, and whether you need per-client separation as an MSP. Model costs are typically modest because only filtered samples are summarized. For ongoing tuning, see what it costs to run an AI system each month.
How to measure success
- Alert messages per incident in the on-call channel, before and after grouping
- Time from first alert to acknowledgment
- Share of summaries rated useful by the on-call engineer (a one-click rating on each post)
- Share of hypotheses later confirmed as the actual cause
- Redaction misses found in monthly prompt audits (target zero)