Sent Message Delivery Confirmation Gate
React to signed Sent webhook events in real time, alert Slack when a message's own status has not reached DELIVERED, and log a governance audit trail.
Query ServiceNow for active problems open past a threshold, alert Slack with the count, and log the result for ITIL problem management.
Incident management gets the dashboards and the SLA clocks; problem management, the ITIL
process meant to find and fix the root cause behind repeat incidents, usually does not. A
problem record can sit in "Root Cause Analysis" for months with nobody noticing, because
ServiceNow has no default alert for problem age the way it does for incident SLA breach. This
blueprint reads the problem table directly and turns age into a governance signal.
This blueprint was created by Mohit Jeswani.
get_aging_problems (io.kestra.plugin.servicenow.Get) queries the problem table with an
encoded query: active=true, sys_created_on older than max_open_days, and optionally a
priority ceiling. Read-only; nothing in ServiceNow is changed.evaluate (io.kestra.plugin.core.output.OutputValues) compares the matched count (size)
against max_count.route (io.kestra.plugin.core.flow.If):summary logs the count and severity, closing the governance cycle.errors alerts Slack if the flow itself fails, for example expired credentials.active field, so it works without hardcoding this
instance's specific problem-state labels.Get with an encoded
sysparm_query, against the problem table specifically - distinct from this repo's
existing ServiceNow blueprints, all of which read or write incident, change_request, or
cmdb_ci_* tables.ServiceNow has SLA definitions and notifications built for incidents, but nothing out of the
box pages anyone when the problem backlog itself grows stale. Kestra keeps max_open_days and
the priority ceiling as flow inputs, turns the query into a single Slack number on a schedule,
and keeps a full execution history of every check, not just whatever the last person to open
the problem list happened to notice.
clientId/clientSecret) with
read access to the problem table.This flow calls the ServiceNow Table API directly over HTTPS; there is no official local
ServiceNow emulator, so get_aging_problems cannot be exercised against a local Docker
container. AbstractServiceNow's own uri property can point this task at a mock HTTP server
implementing the same Table API shape for contract testing, but proving max_open_days against
real aged records needs a real (ServiceNow Developer Program) instance.
SERVICENOW_USERNAME / SERVICENOW_PASSWORD: Basic Auth credentials used by
get_aging_problems. In Kestra OSS, provide them as the base64-encoded environment variables
SECRET_SERVICENOW_USERNAME / SECRET_SERVICENOW_PASSWORD.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 |
|---|---|---|
domain |
<your-instance> |
ServiceNow subdomain |
max_open_days |
30 |
Age past which an active problem is reported aging |
priority_filter |
empty | Optional max priority value (lower is more urgent) to include |
max_results |
100 |
ServiceNow sysparm_limit for this check |
max_count |
1 |
Matched-problem count that triggers the Slack alert |
{{ outputs.get_aging_problems.results }}: the matched problem records (number,
short_description, priority, state, sys_created_on, assigned_to).{{ outputs.get_aging_problems.size }}: number of matching problems.{{ outputs.evaluate.values.severity }}: OK or PROBLEM_BACKLOG_AGING.active=true to exclude resolved/closed problems assumes this instance's problem
state flow sets active to false on resolution, which is the ServiceNow default but can be
customized away in heavily configured instances. Check your own state model if the count
looks wrong.max_results caps sysparm_limit; a backlog larger than this returns only the first page in
whatever order ServiceNow applies by default (no sysparm_query sort is set here). Add an
ORDERBY clause to query to control which aging problems surface first.priority_filter compares against ServiceNow's numeric priority field, where a lower number
is more urgent (1 = Critical) - priority_filter: 2 means "2 or more urgent", not "2 or
higher".clientId/clientSecret) is available on the same task if your instance requires it
instead.SERVICENOW_USERNAME, SERVICENOW_PASSWORD and SLACK_WEBHOOK_URL secrets.domain to a real ServiceNow instance with at least one active problem record.summary logs a count.max_open_days past every open problem's age to confirm compliant logs instead.daily trigger once the threshold reflects your own problem-management SLA.assignment_group with io.kestra.plugin.core.flow.Loop and a matching query
addition to send each team its own aging count instead of one instance-wide total.ORDERBYDESC=sys_created_on clause to query so the oldest problems are always the
ones in the returned page when the backlog exceeds max_results.outputs.get_aging_problems.results in a downstream task to post the actual problem
numbers and assignees, not just the count.