New to Kestra?
Use blueprints to kickstart your first workflows.
Snapshot metrics in Hex on every deploy with Kestra. CI calls a webhook, the notebook runs with the release version, and Slack links the snapshot.
Two days after a release, someone asks whether conversion dipped because of the deploy, and the answer depends on whether anyone remembered to capture the numbers at ship time. This blueprint removes the remembering: the CI pipeline calls a Kestra webhook when the deploy finishes, io.kestra.plugin.hex.projects.Run executes the metrics notebook with the release version passed through inputParams, waits for the snapshot to publish, and Slack posts the run link next to the version. Every release gets its baseline, produced by machinery.
deploy_done (io.kestra.plugin.core.trigger.Webhook) exposes a URL your CI job calls after a successful deploy, posting a JSON body that carries the version.snapshot_metrics (io.kestra.plugin.hex.projects.Run) maps that version onto the notebook's release_version input parameter via {{ trigger.body.version ?? inputs.release_version }}, so manual executions fall back to the flow input.wait: true blocks until the snapshot run reaches a terminal state, and the task exposes status, runUrl, and timing as outputs.announce_snapshot posts the version and the run URL to Slack, putting the evidence in the same channel as the release thread.errors block warns the channel explicitly that this release has no metrics baseline yet, which is the failure mode worth being loud about.CI systems can call APIs, but chaining an API call, a poll-until-complete wait, a parameterized notebook, and a notification into a deploy step turns pipelines into shell-script orchestrators. Kestra takes the single webhook call and owns the rest: the version flows from the request body into the notebook's parameters, the run is waited on and recorded, and both success and failure land in the channel where the release is being discussed.
release_version input parameter.HEX_API_TOKEN: Hex API token used to run the project.SLACK_WEBHOOK_URL: Slack incoming webhook URL.HEX_API_TOKEN and SLACK_WEBHOOK_URL secrets to your Kestra namespace, and change the webhook key to a random value.project_id to a notebook with a release_version parameter and execute the flow manually; Slack should link a snapshot for the fallback version.{"version": "<tag>"} to the webhook URL and ship a release.