New to Kestra?
Use blueprints to kickstart your first workflows.
Audit Azure Logic App workflow runs for failures with a server-side status filter and alert Slack before anyone notices.
A Logic App that is triggered on a schedule or by an external event can
start failing every single run with nobody watching, especially for
workflows that do not have a human checking the run history regularly.
This blueprint lists recent runs filtered server-side to Failed
status and alerts Slack with the count the moment any exist.
periodic_failure_check (io.kestra.plugin.core.trigger.Schedule) runs every 30 minutes, explicitly passing azure_subscription_id, resource_group_name, workflow_name, and max_runs_to_check through its own inputs: block so the flow is self-contained when the trigger fires. Shipped disabled so a manual run can be verified first.probe_failed_runs (io.kestra.plugin.azure.logicapps.ListRuns) lists up to max_runs_to_check runs filtered server-side to statusFilter: "Failed", returning total.evaluate_failed_runs (io.kestra.plugin.core.flow.If) branches on whether total > 0.then (FAILURES_DETECTED): alert_failed_runs reports the failed run count to Slack.else (HEALTHY): log_workflow_healthy records a clean check.log_audit_complete always runs last, printing the failed run count regardless of which branch fired.errors block alerts Slack separately if the flow itself fails outright - an unreachable Azure API or bad credentials must not read as HEALTHY.maxRuns) so a workflow with a long failure history cannot turn a routine health check into an unbounded API call.io.kestra.plugin.azure.logicapps.ListRuns's statusFilter property, used exactly as the plugin's own documentation example shows it, wired into a real alerting flow instead of a bare log statement.ListRuns driving a real governance decision, not just a log statement.Logic Apps itself has no cross-workflow alerting primitive for "this workflow has started failing" beyond what you wire up per-workflow inside Azure Monitor - and that is a separate configuration surface from the flow that actually needs to react. Kestra supplies the schedule, the HEALTHY/FAILURES_DETECTED classification as a first-class branch, and an execution history that shows exactly when a workflow started failing and how many runs were affected.
azure_subscription_id, resource_group_name, workflow_name).tenantId, clientId, clientSecret) with Microsoft.Logic/workflows/runs/read permission (the built-in Logic App Contributor or Reader role covers this).This blueprint has no local, account-free testing path. io.kestra.plugin.azure.logicapps.ListRuns calls Azure's Resource Manager (control-plane) API with AzureEnvironment.AZURE hardcoded in the plugin's own source - unlike Azure Storage, which Azurite emulates at the data-plane level, there is no official local emulator for Logic Apps workflow-run management calls. A real Azure subscription is required, the same baseline prerequisite every other Azure/AWS/GCP-targeting blueprint in this repository assumes.
AZURE_TENANT_ID / AZURE_CLIENT_ID / AZURE_CLIENT_SECRET: service principal credentials used by io.kestra.plugin.azure.logicapps.ListRuns.SLACK_WEBHOOK_URL: Slack incoming webhook used by alert_failed_runs and the errors block.SECRET_, base64-encoded - for example SECRET_AZURE_CLIENT_SECRET=$(echo -n '<your-client-secret>' | base64) - and read back in flows with {{ secret('NAME') }}.| Input | Type | Default | Allowed values |
|---|---|---|---|
azure_subscription_id |
STRING | <your-azure-subscription-id> |
Valid Azure subscription GUID |
resource_group_name |
STRING | my-resource-group |
Resource group containing the Logic App |
workflow_name |
STRING | my-logic-app |
Target Logic App workflow name |
max_runs_to_check |
INT | 50 |
Any positive integer |
{{ outputs.probe_failed_runs.total }}: number of runs matching statusFilter: "Failed" this check.{{ outputs.probe_failed_runs.runs }}: list of matching run records (id, name, status, code, startTime, endTime, correlationId, error, outputs).AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and SLACK_WEBHOOK_URL secrets.log_workflow_healthy fires.alert_failed_runs fires with a count of at least 1.periodic_failure_check once you trust the check against your real workflow.workflow_name values with io.kestra.plugin.core.flow.Loop to audit every critical Logic App in a resource group in one run.runs[].error payloads in the Slack message (rather than only the count) once the alert volume is low enough for that level of detail to be useful in-channel.io.kestra.plugin.azure.logicapps.Run to automatically re-trigger the workflow from its last good input once a human has reviewed and approved the failure.ListRuns hits Azure's control-plane Resource Manager API, which (unlike Azure Storage's data-plane APIs, which Azurite emulates) has no official local emulator - a real Azure subscription is required even for a first manual test run.statusFilter accepts only the exact status strings Azure's own WorkflowStatus enum recognizes (for example Failed, Succeeded, Cancelled) - verified from ListRuns's own source, which maps the input string through that enum before building the server-side filter; an unrecognized value fails before the API call is made.maxRuns caps how many failed runs this blueprint sees, not the true failure count. If the real number of failed runs exceeds max_runs_to_check, total reports the capped value, not the actual total.ListRuns and RunRecord properties and output fields are taken verbatim from the plugin's own source on main - but no Kestra engine was run to execute this flow end to end.