
Hex Trigger
CertifiedTrigger a flow when a Hex project run completes
Hex Trigger
Trigger a flow when a Hex project run completes
Polls a Hex project's most recent run at a fixed interval and fires when it reaches the COMPLETED status. Useful when a Hex project is run outside Kestra (manually, or on a schedule configured in Hex) and a Kestra flow should react once that run finishes. To run a Hex project from Kestra itself and wait for it inline, use io.kestra.plugin.hex.projects.Run instead.
Deduplicates on the run ID so the same completed run never fires the trigger twice.
type: io.kestra.plugin.hex.projects.TriggerExamples
Trigger a flow when the most recent run of a Hex project completes.
id: on_hex_run_complete
namespace: company.team
triggers:
- id: dashboard_refreshed
type: io.kestra.plugin.hex.projects.Trigger
apiToken: "{{ secret('HEX_API_TOKEN') }}"
projectId: "00000000-0000-0000-0000-000000000000"
interval: PT1M
tasks:
- id: notify
type: io.kestra.plugin.core.log.Log
message: "Hex run {{ trigger.runId }} completed: {{ trigger.runUrl }}"
Properties
apiToken *Requiredstring
Hex API token
Bearer token for the Hex API. Generate one from your Hex workspace's API key settings and store it as a Kestra secret.
projectId *Requiredstring
Hex project ID
The ID of the Hex project to monitor.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
baseUrl string
https://app.hex.tech/api/v1Hex API base URL
Base endpoint for all requests. Defaults to https://app.hex.tech/api/v1; override only for a self-hosted Hex region.
interval Non-dynamicstring
PT1MdurationPoll interval
How often to check the project's most recent run. Default is 1 minute. The Hex API allows roughly 30 requests per minute, so avoid setting this below a few seconds.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
elapsedTime string
durationElapsed time
Duration of the run, taken from Hex's reported elapsed time or, if absent, computed from startTime/endTime.
endTime string
date-timeEnd time
When the run reached a terminal state. Null while the run has not completed yet.
projectVersion string
Project version
Published version of the Hex project that was run.
runId string
Hex run ID
Identifier of the Hex project run.
runUrl string
Run URL
Link to view this run in the Hex UI.
startTime string
date-timeStart time
When the run started executing.
status string
Run status
Status reported by Hex, e.g. PENDING, RUNNING, COMPLETED, ERRORED, KILLED, or UNABLE_TO_ALLOCATE_KERNEL. When wait is false, this is a snapshot taken right after the run was started or reattached, so it is typically not yet terminal.
traceId string
Trace ID
Identifier Hex uses to correlate this run internally, useful when contacting Hex support.