Weekly zero-result search digest in Slack and Sheets
Every Monday at 9am, get the top 25 site searches that returned nothing in Slack, with a running history logged to Google Sheets.
Every Monday at 9am, run a weekly zero-result search digest. This is a deterministic code workflow with no reasoning step. The query shape, ranking, and destinations are all fixed.
Trigger: cron, every Monday at 9am in the workflow owner's local timezone.
Step 1. Pull zero-result events from Elasticsearch. Use the Elasticsearch Search Documents (Query Index) operation against a configured search-events index (index name should be a workflow input, default to something like `search-events-*`). Use a date range filter on the event timestamp for the last 7 days (gte now-7d/d, lt now/d). Filter to events where the result count field equals 0 (assume the field is `hits_total`, but expose it as an input in case the user's schema uses a different field like `result_count` or `total_hits`). Aggregate by the query-string field (assume `query.keyword`, also expose as an input) with a terms aggregation, size 25, ordered by doc_count descending. Set the top-level `size` to 0 since we only need the aggregation buckets, not raw hits.
Step 2. Format the top 25 buckets into a ranked table with three columns: rank (1 through 25), query text, count. Compute the human-readable date range string (e.g. `May 19 to May 25, 2026`) from the trigger time so it can be stamped on both outputs.
Step 3. Post the table to Slack via the Slack Bot Send a Message operation. Channel is a workflow input. Use Slack mrkdwn formatting: a short header line that includes the date range ("Zero-result searches, May 19 to May 25, 2026, top 25") and the table rendered as a fixed-width code block so columns line up. If there are fewer than 25 zero-result queries that week, post however many exist and note the count. If there are zero, post a brief "No zero-result searches this week" message instead of an empty table.
Step 4. Append the same rows to Google Sheets via the Append Values operation. The spreadsheet id and tab name are workflow inputs. Append one row per ranked query with these columns in order: run_date (the Monday the workflow runs, ISO date), period_start, period_end, rank, query, count. Use valueInputOption USER_ENTERED so the dates are stored as real dates. Do not write a header row; assume the user has set the header up once when they configured the sheet.
Workflow inputs to expose: Elasticsearch index pattern, query-string field name, result-count field name, Slack channel, Google Sheets spreadsheet id, Google Sheets tab name.
Use the `elasticsearch` integration for the search step, the `slackbot` integration for the Slack post, and the `google-sheets` integration for the append. No AI/reasoning node is needed anywhere in this workflow.
Additional information
What does this prompt do?
- Pulls the last seven days of search events from your Elasticsearch index and isolates the queries that returned zero results.
- Ranks the top 25 zero-result queries by how often shoppers or users typed them, with the date range stamped on the report.
- Posts the ranked table to a Slack channel so product, search, and merchandising teammates see the misses without opening Kibana.
- Appends the same rows to a Google Sheet so you build a week-over-week history and can spot trending content or synonym gaps.
What do I need to use this?
- An Elasticsearch cluster that already logs site search queries with a result count, and a read-only API key for the index.
- A Slack workspace and the channel name where you want the weekly digest posted.
- A Google Sheet with a tab dedicated to the history log, and edit access for the connected Google account.
How can I customize it?
- Change the schedule. Move the run to a different day or time, or shift to a daily cadence if your search volume is high.
- Adjust the cutoff. Show the top 10, 50, or 100 zero-result queries instead of 25, or filter to queries that appeared more than a minimum number of times.
- Swap the destinations. Post to a different Slack channel, send to a private DM, or write to a different Sheet or tab without touching the rest of the pipeline.
Frequently asked questions
What is a zero-result query and why should I care?
Do I need a special index for this to work?
Can I change which Slack channel it posts to?
Will the Google Sheet build up history over time?
Do I need a reasoning model in the loop?
Stop letting zero-result searches go unseen.
Connect Elasticsearch, Slack, and Google Sheets once, and Geni delivers the weekly miss report every Monday at 9am.