New to Kestra?
Use blueprints to kickstart your first workflows.
Index product updates into Typesense the moment a PIM webhook fires with Kestra. One DocumentIndex upsert makes edits searchable in milliseconds.
Nightly rebuilds keep a search index correct; webhooks keep it current. This blueprint closes the gap between saving a product in the PIM and seeing the change in storefront search. The PIM POSTs the changed product to a Kestra webhook, io.kestra.plugin.typesense.DocumentIndex upserts a single document into the products collection, and Discord confirms which product landed. Because the document id is the product identifier, repeated updates overwrite the same document instead of duplicating it.
pim_update trigger (io.kestra.plugin.core.trigger.Webhook) accepts a POST from the PIM, secured by the webhook key. Replace change-me-strong-webhook-key with a strong random value before exposing the URL.upsert_product (io.kestra.plugin.typesense.DocumentIndex) builds the document map field by field. Each value prefers the webhook body via {{ trigger.body.field ?? inputs.field }}, so the same flow serves webhook-driven upserts and manual runs; flow inputs with defaults act as the fallback and as living documentation of the expected payload shape.confirm posts the product id and name to Discord, and the errors block posts a distinct alert when the upsert fails, because a lost PIM edit is invisible until a customer searches for it.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.
A webhook receiver for one document sounds like a ten-line service, until it needs authentication, retries, an audit trail, and someone to notice when it breaks. Kestra provides the keyed webhook endpoint, keeps every received payload in the execution history, retries transient Typesense errors, and alerts on failure, all in declarative YAML next to the rest of your search pipelines.
products collection whose schema matches the document fields; the nightly catalog index blueprint contains the curl call that creates it.TYPESENSE_HOST: hostname or IP of the Typesense node or load balancer.TYPESENSE_API_KEY: an admin API key with write access to the collection.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.key with a strong random value.https://your-kestra/api/v1/executions/webhook/company.team/typesense-instant-product-upsert/<your-key> with a JSON body containing product_id, name, brand, category, price, popularity, and in_stock.document map after adding them to the collection schema.If task that skips indexing for draft or unpublished products based on a webhook body field.