Ping Slack when Algolia zero-result searches spike
Every weekday morning we check yesterday's Algolia search health against a 14-day baseline and only post to Slack when the zero-result rate is really off.
Every weekday at 8am, check my Algolia search health and only ping Slack when something is actually off.
Pull yesterday's total search count and top zero-result searches from Algolia analytics for my index. Also pull the same figures across the trailing 14 days so you have a baseline to compare against.
Compare yesterday's zero-result rate against the trailing 14-day baseline. If yesterday's rate is materially above the baseline (expose the spike threshold as a configurable knob, defaulting to somewhere around 1.5x the baseline rate or +2 percentage points, whichever is larger), or if a brand new zero-result query cracked yesterday's top 10 by search volume, that counts as an anomaly worth flagging. Algolia's own guidance is that a no-results rate above 3-5% is not optimal and teams should target under 2%, so use that as a sanity check on whether the baseline itself is already unhealthy.
When there is an anomaly, draft a concise Slack message to the configured channel (also a knob) that names each offending query, its search count for yesterday, and a suggested fix. Pick one of: add a synonym for a likely misspelling or alternative phrasing, create a query rule to steer the result, or flag it as a content gap the catalog does not cover. Keep the message short and skimmable, do not paste raw analytics tables.
If yesterday's numbers look normal, post nothing at all. The channel should stay quiet on healthy days so people actually pay attention on the days you do speak up. This runs alongside the existing weekly Monday recap, which fires unconditionally, so anything routine belongs there, not here.
Additional information
What does this prompt do?
- Checks yesterday's Algolia search volume and zero-result queries against a trailing 14-day baseline every weekday morning.
- Posts to Slack only when the zero-result rate spikes past your threshold or a brand-new failing query breaks into yesterday's top 10 by volume.
- Names each offending query, its search count, and suggests a concrete fix such as adding a synonym, creating a rule, or flagging a content gap.
- Stays silent on healthy days so the alert channel doesn't become background noise you learn to ignore.
What do I need to use this?
- An Algolia account with analytics access to the index you want to monitor.
- A Slack workspace and the channel you want the alerts to land in.
How can I customize it?
- Change the spike threshold (default: yesterday's zero-result rate materially above the 14-day baseline).
- Pick which Slack channel the alerts go to.
- Adjust the schedule if you want a different cadence than weekdays at 8am.
Frequently asked questions
What counts as a spike?
Will this spam our Slack channel?
What if a single query goes bad but the overall rate looks fine?
Does it suggest fixes or just report the problem?
Can I run this weekly or hourly instead of daily?
Related templates
Catch broken searches before your customers do.
Get a Slack ping only when your Algolia search health actually needs attention, and stay quiet the rest of the time.