New to Kestra?
Use blueprints to kickstart your first workflows.
Trigger a Qlik Cloud app reload, classify it by outcome and duration, alert Slack on failure or SLA breach, and log the result.
A Qlik Cloud app's own reload history page shows the last run if someone opens it, but nothing
pages anyone when a dashboard quietly starts reloading three times slower than usual, or fails
outright overnight with nobody watching. This blueprint uses
io.kestra.plugin.qlikcloud.apps.Reload to reload a named app and wait for its terminal
status, classifies the result by both outcome and duration, and alerts on anything but a clean
bill of health.
This blueprint was created by Mohit Jeswani.
reload_app (io.kestra.plugin.qlikcloud.apps.Reload, wait: true) triggers a full
reload of app_id and polls until it reaches SUCCEEDED, FAILED, CANCELED, or
EXCEEDED_LIMIT. The task only ever returns an Output on SUCCEEDED; any other terminal
status, or a timeout past maxDuration, makes it throw instead. allowFailure: true
catches that so the flow can still classify and alert rather than failing outright.evaluate (io.kestra.plugin.core.output.OutputValues) computes the reload's duration
from its own startTime/endTime and compares it to max_reload_minutes. Because
reload_app only returns on success, a missing output already means CRITICAL; a present
output is classified SLOW or OK purely on duration.route (io.kestra.plugin.core.flow.If):summary logs the status, duration and severity, closing the governance cycle.errors alerts Slack if the flow itself fails outside the handled cases.CRITICAL) and slow-but-successful (SLOW) treated as genuinely
different severities, computed from the reload's own timestamps, not a guess.apps.Reload used as a
monitored gate, distinct from a plain fire-and-forget trigger.Triggering a reload from Qlik Cloud's own UI or API answers one moment in time; it does not decide a cadence, classify the result by both outcome and duration, or notify anyone. Kestra supplies the schedule, the OK/SLOW/CRITICAL classification as a first-class branch, and an execution history that shows exactly when an app's reload started failing or slowing down.
This flow calls the Qlik Cloud REST API directly over HTTPS; there is no official local Qlik
Cloud emulator, so reload_app cannot be exercised against a local Docker container, and it
genuinely reloads data on every run. Validate against a non-production app first.
QLIK_API_KEY: the Qlik Cloud API key or OAuth access token used by reload_app. In
Kestra OSS, provide it as the base64-encoded environment variable SECRET_QLIK_API_KEY.SLACK_WEBHOOK_URL: used by alert and the errors block. In Kestra OSS, provide it as
the base64-encoded environment variable SECRET_SLACK_WEBHOOK_URL.| Input | Default | Purpose |
|---|---|---|
tenant_url |
https://<your-tenant>.<region>.qlikcloud.com |
Qlik Cloud tenant root URL |
app_id |
<your-qlik-app-id> |
App to reload and monitor |
max_reload_minutes |
30 |
Duration past which a successful reload is SLOW |
max_wait_duration |
PT1H |
This gate's own wait ceiling, separate from Qlik's ~3h cap |
{{ outputs.reload_app.status }}: SUCCEEDED when present (the only case reload_app
returns normally).{{ outputs.reload_app.startTime }} / .endTime / .duration: timing of the reload.{{ outputs.reload_app.logUri }}: internal storage URI of the reload log, when available.{{ outputs.evaluate.values.severity }}: OK, SLOW, or CRITICAL.app_id at an app where an extra, unplanned reload is unsafe or expensive.reload_app throws the same way on a
timeout as on an outright FAILED result; both are classified CRITICAL here, not
distinguished from each other in the Slack alert.reattach defaults to true. A worker restart or manual Restart of the same execution
adopts the already-triggered reload instead of starting a duplicate one. That is usually
what you want for a scheduled gate; set it to false only if you specifically need a fresh
reload on every retry.QLIK_API_KEY and SLACK_WEBHOOK_URL secrets.tenant_url and app_id to a real, non-production app.compliant logs a duration.max_reload_minutes below the app's real reload time to confirm alert fires with
SLOW.hourly trigger only once you are certain a reload on every run is acceptable
for this app.spaceName + appName instead of appId (both supported directly on Reload)
when the app ID is not known ahead of time.app_id values with io.kestra.plugin.core.flow.Loop to watch a whole
space's apps in one scheduled run, with concurrencyLimit: 1 to avoid triggering every
app's reload at once.outputs.reload_app.logUri in the alert branch to attach or link the actual reload log
when a reload fails, not just the status.