New to Kestra?
Use blueprints to kickstart your first workflows.
Sweep Typesense for out-of-stock products with Kestra. Filter in_stock:false, sort by popularity, and send the hit count to Slack so ops fixes top sellers.
Most storefronts hide out-of-stock products from customers, which also hides them from the people who could fix availability. This blueprint keeps them visible to ops. A scheduled io.kestra.plugin.typesense.Search sweeps the products collection with filter: in_stock:false and sortBy: popularity:desc, so the stored result is not just a list of gaps but a priority list: the most popular unavailable products come first. Slack gets the count every morning.
sweep_out_of_stock (io.kestra.plugin.typesense.Search) runs a match-all query (query: "*", queryBy: name) narrowed by filter: "in_stock:false" and ordered by sortBy: "popularity:desc".{{ outputs.sweep_out_of_stock.totalHits }} as a scalar hit count and stores the full ordered result set in internal storage at {{ outputs.sweep_out_of_stock.uri }}.notify_ops posts the count to Slack and points at the execution's Outputs tab for the ordered list; only the scalar is interpolated into the JSON payload.errors block posts a distinct Slack alert when the sweep fails, because a missing availability report is itself an availability blind spot.Schedule trigger runs the sweep daily at 07:00.The connection uses the Typesense default port 8108 as a plain value and https: false for a local or private-network cluster; set https: true when your production cluster terminates TLS.
The filter query takes milliseconds; the discipline of running it every morning, keeping each day's list, telling the right channel, and noticing when it breaks is the hard part. Kestra provides the schedule, the per-execution stored result for day-over-day comparison, the notification, and the failure alert in one flow you can read in a minute.
products collection whose schema includes in_stock (bool, faceted) and popularity (float); the nightly catalog index blueprint creates it.TYPESENSE_HOST: hostname or IP of the Typesense node or load balancer.TYPESENSE_API_KEY: an API key with search access to the collection.SLACK_WEBHOOK_URL: Slack incoming webhook URL.disabled: false on the daily trigger.If task that escalates to an on-call channel when totalHits crosses a threshold.filter: "in_stock:false && category:footwear".{{ outputs.sweep_out_of_stock.uri }} into a Python task that renders the top ten products into the Slack message.