The moment it happens
Look up an incident from a Slack command
Typing an incident number into a slash command replies with its state, priority and assignee.
- Runs
- The moment it happens
- Apps
- ServiceNow
- AI
- Not needed
- Access
- read incident
Send this to your assistant
Create a ClickRuntime automation: give me a link for a Slack slash command. When someone types /incident INC0012345, reply with that ServiceNow incident's state, priority and assigned person.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
During an outage, someone in chat says 'what's the status of INC0012345?' and the conversation stops while a person finds the right browser tab, logs into ServiceNow, searches for the number and pastes the answer back. Multiply that by every question about a ticket, from managers, support staff and other teams that do not have ServiceNow access, and the service desk becomes a lookup service. Context gets lost between the question and the answer, and people who do not use ServiceNow never get one.
When someone types the slash command with an incident number, the automation parses the number, queries the ServiceNow incident table, and replies to the response URL in the same conversation with its details: short description, state, priority, assignee and last update. It answers within seconds of the command. IT teams use it so anyone in the channel can get an incident status without leaving chat.
What you get out of it
Answers appear where the question was asked
The status is posted straight into the conversation. Nobody has to switch tools, and the outage discussion continues without waiting for a person to look something up. During an outage call, typing the command beats opening a browser tab, logging in and searching.
Non-ServiceNow users stay informed
Sales, support and executives can check an incident without a license. That cuts the number of requests landing on the service desk and gives them accurate information rather than rumors.
The service desk is interrupted less
Technicians who used to field every 'what is happening with this?' message can stay focused on resolving incidents. The most common question is answered without them. The technician who used to answer 'any update on INC0012345?' ten times a day gets that time back.
Everyone sees the same facts
The reply shows current state, priority and assignee, so a channel of twenty people works from one answer. Contradictory status updates relayed by different people become less common. Twenty people in a channel read one answer instead of three conflicting relays of last night's update.
Faster handoffs during incidents
On-call staff can pull up an incident's last update in seconds when joining a call. Less time spent finding information means quicker decisions in the first minutes of an incident.
How it works
What happens, step by step
When someone types the slash command in Slack with an incident number, Slack sends it to ClickRuntime.
ClickRuntime looks the incident up in ServiceNow.
It replies in Slack with the incident's title, state, priority and who it is assigned to.
Before it runs live
- Connect ServiceNow
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
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
- Act only on the items that match your own rules, and skip the rest
- 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
from urllib.parse import parse_qs
from clickruntime import on_event, credentials, http
INSTANCE = "northwind"
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_event
def handle(event):
form = {k: v[0] for k, v in parse_qs(event.body).items()}
number = form.get("text", "").strip().upper()
rows = snow("GET", "table/incident", params={"sysparm_query": f"number={number}", "sysparm_display_value": "true",
"sysparm_fields": "number,state,priority,assigned_to,short_description",
"sysparm_limit": 1})
if rows:
i = rows[0]
text = (f"*{i['number']}* {i['short_description']}\nState: {i['state']} · Priority: {i['priority']} · "
f"Assigned to: {(i['assigned_to'] or {}).get('display_value', 'nobody')}")
else:
text = f"No incident found for {number or '(empty)'}."
http.post(form["response_url"], json={"response_type": "ephemeral", "text": text})
return {"found": bool(rows)}FAQ
Common questions
What format does the incident number need to be in?
Will it show private details to everyone in the channel?
Can it look up other records such as changes or requests?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Turn bug reports into ServiceNow incidents
Each report your bug tool sends becomes an incident with the description, page URL and browser details.
See how it worksPost P1 and P2 incidents to Slack
High-priority incidents show up in your chat channel within minutes of being logged.
See how it worksHear when your incidents change
You get an email when an incident assigned to you is updated, with what changed.
See how it worksKeep exploring
Set up “Look up an incident from a Slack command” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.
