Run icon
SlackIncomingWebhook icon
Schedule icon

Morning Hex Analytics Refresh with Slack Confirmation

Schedule a morning Hex notebook refresh with Kestra. Wait for the run, confirm in Slack with the run URL, and page the channel when the notebook fails.

Categories
BusinessData

A morning dashboard has two failure modes, and the silent one is worse: the refresh that fails at 06:30 and nobody notices until someone presents stale numbers at 09:00. This blueprint schedules io.kestra.plugin.hex.projects.Run on weekday mornings, waits for the notebook to finish, and makes both outcomes loud, a Slack confirmation with the run URL and elapsed time on success, and a page through the errors block the moment the run fails.

How it works

  1. A Schedule trigger (disabled by default) fires at 06:30 on weekdays, before the first meeting reads the dashboard.
  2. refresh_notebook (io.kestra.plugin.hex.projects.Run) calls the Hex API with the project ID and polls every ten seconds; wait: true means the task only succeeds when the run itself does.
  3. confirm posts the run's status, elapsedTime, and runUrl outputs to Slack, so the confirmation carries a link to the exact run behind today's numbers.
  4. If the notebook errors or the API call fails, the flow skips the confirmation and the errors block pages the same channel with an explicit stale-dashboard warning.

What you get

  • A refresh that either confirms with evidence or pages, never a silent failure discovered mid-meeting.
  • Elapsed time in every confirmation, so a notebook that is slowly getting slower is visible weeks before it times out.
  • An execution history of every morning run, with status and timing, for free.
  • A pattern that turns any Hex project into a monitored scheduled job by changing one input.

Who it's for

  • Analytics teams whose stakeholders open the same Hex dashboard every morning.
  • Data engineers asked "is the dashboard fresh" often enough to want the answer posted automatically.
  • Anyone who has watched a meeting derail because the numbers on screen were a day old.

Why orchestrate this with Kestra

Hex's own scheduler runs the notebook, but confirming success and escalating failure to the team's channel is outside its lane. Kestra treats the refresh as a pipeline step: wait: true gives it a real exit status, outputs carry the evidence into Slack, and the errors block guarantees failures interrupt someone before the dashboard's audience arrives. Later, the same flow can grow a data-load dependency or an SLA timeout without changing the notebook.

Prerequisites

  • A Hex project and its project ID.
  • A Hex API token with permission to run the project.
  • A Slack incoming webhook posting into the channel the dashboard's audience reads.

Secrets

  • HEX_API_TOKEN: Hex API token used to run the project.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.

Quick start

  1. Add the HEX_API_TOKEN and SLACK_WEBHOOK_URL secrets to your Kestra namespace.
  2. Set the project_id input and execute the flow once manually; check the Slack confirmation and its run link.
  3. Enable the every_morning trigger and adjust the cron to land before your first meeting.

How to extend

  • Chain the refresh behind your warehouse load instead of a fixed time, as shown in the refresh-after-warehouse-load blueprint.
  • Add a tight maxDuration so a hanging notebook pages as an SLA breach, as shown in the notebook SLA guard blueprint.
  • Pass inputParams to pin the notebook to the current reporting date on each run.
  • Add more projects as additional Run tasks, or loop over project IDs with ForEach for a whole morning suite.

Links

Orchestrate with Kestra
Orchestrate Slack with Kestra
Share this Blueprint
See How

New to Kestra?

Use blueprints to kickstart your first workflows.