New to Kestra?
Use blueprints to kickstart your first workflows.
Kestra flow that validates a webhook payload in Python, runs a PowerShell VM healthcheck, creates a ServiceNow incident with the results, and escalates failures.
Give edge and retail operations teams a self-service healthcheck endpoint that always ends in a ticket. This Kestra blueprint exposes a secured webhook: callers POST a small JSON request describing a VM and the checks they want, Python validates and enriches the payload, PowerShell collects disk capacity metrics, and the results land as a properly categorized ServiceNow incident assigned back to the requester. If anything in the pipeline breaks, the errors branch opens a priority 1 incident and notifies Slack, so a failed healthcheck can never disappear silently.
webhook trigger (io.kestra.plugin.core.trigger.Webhook) accepts a POST secured by HEALTHCHECK_WEBHOOK_KEY. Manual executions fall back to inputs.defaultWebhookPayload so you can test without a caller.validate_payload task (io.kestra.plugin.scripts.python.Script) enforces required fields, whitelists the requested checks, maps priority to a ServiceNow severity via PRIORITY_TO_SEV, sanity-checks the requester email, stamps receivedAt, and publishes everything with Kestra.outputs().run_powershell_commands task (io.kestra.plugin.scripts.powershell.Script) reads the validated payload, enumerates fixed drives with System.IO.DriveInfo (works on Windows and Linux), computes size, free space, and percent free per volume, derives an advice string when any volume drops under 15 percent free, and writes healthcheck_report.json as an output file.create_servicenow_incident task (io.kestra.plugin.servicenow.Post) files an incident on the incident table with the VM name, store id, request id, advice, the requester as caller_id, and the mapped priority.errors tasks handle failure: create_servicenow_incident_on_error (io.kestra.plugin.servicenow.Post) opens a priority 1 incident with errorLogs() and a deep link to the execution, and send_slack_notification_on_error (io.kestra.plugin.slack.SlackExecution) pings the on-call channel with allowFailure: true so a Slack outage never masks the original error.healthcheck_report.json artifact stored with the execution.Wiring a webhook receiver, a script host, and the ServiceNow API together normally means custom middleware with its own auth, logging, and failure handling. Kestra collapses that into one declarative flow: the webhook trigger handles ingress with a secret key, Python and PowerShell run as first-class script tasks with dependency management and output files, and the errors branch gives you guaranteed escalation. Every request is an execution with full logs, so when a store manager asks what happened to their healthcheck, the answer is one click away.
incident table.serviceNowInstance variable to your instance name.HEALTHCHECK_WEBHOOK_KEY: shared secret guarding the Webhook trigger.SERVICENOW_USERNAME, SERVICENOW_PASSWORD: credentials used by both Post tasks.SLACK_WEBHOOK: Slack incoming webhook URL for the on-error notification.serviceNowInstance.healthcheck_report.json.ALLOWED_CHECKS and the PowerShell script.healthcheck_report.json to the incident or store it in S3 for trend analysis.io.kestra.plugin.core.flow.ForEach over a CMDB query.io.kestra.plugin.jira.issues.CreateIssue.