New to Kestra?
Use blueprints to kickstart your first workflows.
Build a weekly merchandising digest from Typesense facet counts with Kestra. FacetSearch by brand posts assortment coverage to Discord.
Merchandisers plan against the catalog they think they have; the search index is the catalog customers actually see. This blueprint reads the assortment straight from Typesense every week. io.kestra.plugin.typesense.FacetSearch runs a match-all query over the products collection with facetBy: brand, producing the searchable product count as a scalar and the per-brand distribution as a stored file. Discord gets the headline before the Monday merchandising sync.
facet_by_brand (io.kestra.plugin.typesense.FacetSearch) sends query: "*" with queryBy: name and facetBy: brand against the products collection. Typesense returns facet counts per brand alongside the match count.{{ outputs.facet_by_brand.totalHits }}, the number of searchable products, as a scalar, and writes the full result including the facet distribution to internal storage at {{ outputs.facet_by_brand.uri }}.digest posts the headline count to Discord and points readers at the execution's Outputs tab for the per-brand breakdown; only the scalar is interpolated into the JSON payload.errors block posts a distinct Discord alert when the search fails, so a missing Monday digest is a signal, not a mystery.Schedule trigger runs the report every Monday at 08: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 facet query is one API call; the report is everything around it. Kestra schedules the call, stores the full facet result durably per execution, feeds the scalar into a notification, alerts when the query fails, and keeps a week-over-week history you can scroll back through. Changing the audience from Discord to email or Slack is a task swap, not a rewrite.
products collection whose schema facets brand; 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.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.disabled: false on the weekly trigger.category or by both fields with facetBy: brand,category to widen the overview.filter such as in_stock:true so the digest reflects sellable assortment only.{{ outputs.facet_by_brand.uri }} into a Python task that renders the top brands into the message itself.