Find Cold-Chain Temperature Excursions in Fridge and Freezer Sensor Logs
Daily review of temperature logger data in DuckDB that turns raw readings into excursions with duration and peak, flags sensor gaps and bad data, and alerts on Slack.
Search X for a brand or keyword, alert Slack when the mention count spikes past a threshold, and log the result for comms and SRE teams.
A spike in public mentions of a product name, outage keyword, or incident hashtag is often the first signal something is wrong, well before a ticket lands in a support queue or a status page gets updated. X has no built-in alert for "mentions just spiked"; this blueprint runs the search itself on a schedule and turns the count into a Slack page the moment it crosses a threshold you set.
This blueprint was created by Mohit Jeswani.
search_mentions (io.kestra.plugin.xquik.tweets.Search) searches X for search_query
within the last since_hours, capped at limit results. Read-only; nothing is posted or
changed. allowFailure: true covers an API or auth error without failing the flow outright.evaluate (io.kestra.plugin.core.output.OutputValues) compares the returned size
(a best-effort count of matching posts) against max_mention_count. A failed search is
also CRITICAL.route (io.kestra.plugin.core.flow.If):summary logs the count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example an expired API key.from:/to: operators.tweets.Search used as a
threshold-based governance check.X surfaces the posts; it does not decide a cadence, compare the volume to a baseline you
control, or notify a specific Slack channel. Kestra keeps max_mention_count and
since_hours as flow inputs, turns a search into a Slack page naming the exact count, and
keeps a full execution history of every check.
max_mention_count
against real traffic rather than guessing.This flow calls the Xquik API directly over HTTPS; there is no official local Xquik or X
emulator, so search_mentions cannot be exercised against a local Docker container.
XQUIK_API_KEY: the Xquik API key used by search_mentions. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_XQUIK_API_KEY.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
search_query |
<your-brand-or-keyword> |
X search query to watch |
query_type |
Latest |
Latest (chronological) or Top (engagement-ranked) |
since_hours |
1 |
Lookback window in hours |
limit |
100 |
Max posts requested; the reported count never exceeds this |
max_mention_count |
50 |
Mention count that triggers the Slack alert |
{{ outputs.search_mentions.size }}: best-effort count of matching posts, capped at limit.{{ outputs.search_mentions.body }}: the raw search response.{{ outputs.evaluate.values.severity }}: OK, VOLUME_SPIKE, or CRITICAL.size is capped at limit, not a true total match count. If the real mention volume
exceeds limit, size reads exactly limit and you cannot tell "there were exactly this
many" from "there were at least this many." Set limit well above max_mention_count so a
genuine spike is distinguishable from a capped result.max_mention_count has no universal correct value; a brand with high everyday mention
volume needs a much higher threshold than a niche product. Tune it against your own real
traffic before enabling the schedule.sinceTime bounds the search window but this task does not paginate with cursor
automatically; a very active query within a short since_hours window can still be capped
by limit well before the window's true volume is reflected.XQUIK_API_KEY and SLACK_WEBHOOK_URL secrets.search_query set to something with known, real volume and
read the count in summary.max_mention_count below that observed count to confirm alert fires.max_mention_count to a value above your normal baseline.hourly trigger once the threshold reflects real traffic, not a guess.from:/to: query operators to watch a specific account's mentions instead of a
general keyword.outputs.search_mentions.body in a downstream task to extract and post the most
engaged individual posts, not just the count.