Skip to content

Daily

Get open incidents by priority each morning

A morning email shows how many incidents are open at each priority level.

Runs
Daily
Apps
ServiceNow
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every weekday at 8am, email me the number of open ServiceNow incidents grouped by priority, from Critical down to Planning.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

At 8 am, a service desk manager wants to know how many incidents are open, how many are priority 1 or 2, and whether the backlog grew overnight. In ServiceNow that means opening the incident list, applying filters, and grouping by priority, a routine that takes a few minutes and gets skipped on busy days. Without the daily picture, a backlog of aging P2 incidents builds quietly, and the first time leadership hears about it is when a business unit complains about slow response.

Each morning the automation uses ServiceNow's aggregate API to count open incidents by priority and emails you the totals. You get the numbers without opening the instance, and because the same calculation runs each day the figures are directly comparable. Service desk managers, IT operations leads and CIOs use it to begin the day with a clear view of the backlog.

What you get out of it

  • The backlog is known before stand-up

    The team starts the day knowing how many incidents are open and how severe they are. Staffing decisions, such as moving someone to P1 triage, are made on facts at 8 am, not discovered at noon.

  • Growing queues are caught early

    A rising count of open P2 incidents over several days is a warning sign. A daily figure shows the trend long before service levels are breached or an executive escalates.

  • Same definition every day

    The count uses a fixed query, so Monday's number means exactly what Friday's did. Reports built from manual filters differ by person, which makes trends hard to trust. Monday's count of open P2 incidents means exactly what Friday's did, because nobody rebuilt a filter in between.

  • Leadership gets a simple view

    A short email with totals by priority suits managers who will never open ServiceNow. They stay informed and can ask pointed questions without waiting for a weekly report. A CIO who never opens ServiceNow can still see that P1 incidents rose from two to five.

  • Helps prove improvement

    When a clean-up effort reduces the open count from 240 to 150, the daily history shows it. Evidence of progress supports staffing requests and process decisions in the next planning round.

How it works

What happens, step by step

  1. Every morning, ClickRuntime asks ServiceNow how many incidents are open at each priority level.

  2. You get an email with the total in the subject and a count for each priority, from critical down to planning.

  3. It sends again each morning, so you can see the backlog grow or shrink day to day.

Before it runs live

  • Connect ServiceNow

What you get

RunsDaily
Get open incidents by priority each morningtoday, 9:00Succeeded
Email · 58 open incidentsCritical: 1 High: 7 Moderate: 22 Low: 25 Planning: 3

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other ServiceNow steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
daily_open_incidents_report.pyexample
from clickruntime import on_trigger, credentials, http, notify

INSTANCE = "northwind"
LABELS = {"1": "Critical", "2": "High", "3": "Moderate", "4": "Low", "5": "Planning"}

def snow(method, path, **kw):
    resp = http.request(method, f"https://{INSTANCE}.service-now.com/api/now/{path}",
                        auth=(credentials.secret("SERVICENOW_USER"), credentials.secret("SERVICENOW_PASSWORD")),
                        headers={"Accept": "application/json"}, **kw)
    resp.raise_for_status()
    return resp.json()["result"]

@on_trigger
def run(event):
    rows = snow("GET", "stats/incident", params={"sysparm_query": "active=true", "sysparm_count": "true",
                                                 "sysparm_group_by": "priority"})
    counts = {r["groupby_fields"][0]["value"]: int(r["stats"]["count"]) for r in rows}
    lines = [f"{LABELS[p]}: {counts.get(p, 0)}" for p in sorted(LABELS)]
    notify.email_me(f"{sum(counts.values())} open incidents", "\n".join(lines))
    return counts

FAQ

Common questions

What does 'open' mean in this report?
Incidents whose state is anything other than Resolved, Closed or Canceled. If your instance uses custom states, name them and they will be counted or excluded as you prefer. Counts are split by priority, so a rise in P1 and P2 incidents stands out from routine P4 volume.
Does the aggregate API need special permissions?
The ServiceNow user needs read access to the incident table, and the Aggregate API must be available on your instance; no extra plugin is typically required. If the call fails, the run log shows ServiceNow's response, which usually names the missing role or the disabled API.
Can the report break down incidents by assignment group?
Yes. The aggregate query can group by assignment_group as well as priority, which shows which teams carry the load. The email would list counts for each group, so managers see where help is needed.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get open incidents by priority each morning” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.