Skip to content

Every 5 minutes

Sort new tickets by category and priority

Incoming tickets get a category and priority set from what the requester wrote, before an agent picks them up.

Runs
Every 5 minutes
Apps
Freshservice
AI
Yes, uses the built-in AI allowance
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: when a new Freshservice ticket comes in, read the subject and description, pick a category from Hardware, Software, Access or Network, set the priority, and update the ticket.

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

In a Freshservice help desk, most new tickets arrive with a vague subject like "cannot login" or "printer thing" and a default priority. An IT coordinator then spends the first part of every morning opening tickets just to pick a category and urgency, while a genuine outage sits in the queue marked Low because the requester never changed the dropdown.

Every 5 minutes new tickets are fetched, and ClickRuntime's built-in AI reads the subject and description to suggest a category and a priority. The ticket is then updated with those values, so by the time an agent opens the queue the tickets are already sorted and the urgent ones rise to the top.

It fits small IT teams without a dedicated dispatcher, and managed service providers who want consistent categories across clients so reports mean something.

What you get out of it

  • Outages stop hiding as Low priority

    A message that says the whole office has lost wifi gets a higher priority than the requester chose, so the person watching the queue sees it within minutes instead of after lunch.

  • Categories are applied consistently

    Every ticket is sorted using the same reading of the text, so reports on hardware versus access requests reflect what actually came in rather than whatever each requester happened to pick.

  • Agents skip the sorting step

    Triage that took a coordinator an hour a day is done before they log in, which leaves that time for resolving tickets and brings average first response down. Mornings can then start with actual troubleshooting work.

  • No separate AI account required

    The classification runs on ClickRuntime's built-in AI, so IT does not need to buy an API key, store it somewhere or get it approved by procurement. Rollout needs no vendor sign-up or budget approval.

  • Wrong guesses are easy to spot

    Because the category and priority are written onto the ticket, an agent can see what was suggested and overwrite it, and the change history shows what was updated automatically. That keeps a human in charge of the final call.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime checks Freshservice for new tickets.

  2. AI reads what the requester wrote and picks a category and a priority.

  3. ClickRuntime sets both on the ticket before an agent picks it up.

  4. Each ticket is only sorted once.

Before it runs live

  • Connect Freshservice

What you get

RunsEvery 5 minutes
Sort new tickets by category and prioritytoday, 9:00Succeeded
Freshservice · Ticket #4822Category: Access · Priority: High "Can't log in to Salesforce after password reset"

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

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Freshservice 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.
ai_triage_of_new_tickets_freshservice.pyexample
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched

DOMAIN = "northwind"
SCHEMA = {"type": "object", "required": ["category", "priority"], "properties": {
    "category": {"enum": ["Hardware", "Software", "Access", "Network"]},
    "priority": {"enum": [1, 2, 3, 4]}}}

def fs(method, path, **kw):
    resp = http.request(method, f"https://{DOMAIN}.freshservice.com/api/v2/{path}",
                        auth=(credentials.secret("FRESHSERVICE_API_KEY"), "X"), **kw)
    resp.raise_for_status()
    return resp.json()

@on_trigger
def run(event):
    last_id = state.get("last_id") or 0
    tickets = fs("GET", "tickets", params={"order_type": "desc", "per_page": 30})["tickets"]
    new = [t for t in tickets if t["id"] > last_id]
    report_fetched(len(new))
    if not new:
        return {"summary": "Nothing new"}
    for t in new:
        full = fs("GET", f"tickets/{t['id']}")["ticket"]
        pick = ai.generate(f"Subject: {full['subject']}\n\n{full.get('description_text', '')[:2000]}",
                           system="Pick the IT category and a priority (1 low, 4 urgent).",
                           json_schema=SCHEMA, max_output_tokens=40).json
        fs("PUT", f"tickets/{t['id']}", json={"category": pick["category"], "priority": pick["priority"]})
    state.set("last_id", max(t["id"] for t in new))
    return {"triaged": len(new)}

FAQ

Common questions

Does the AI overwrite a priority the requester already set?
It writes a suggested category and priority onto the ticket, so the new value replaces the default. If you want existing priorities kept and only blank ones filled in, you can request that rule and approve it before it applies.
What Freshservice permission does the connection need?
The API key you use must belong to an agent who can view and update tickets, since the automation reads new tickets and writes category and priority back. Keys are stored as secrets, so they are not exposed in the flow itself.
How does it decide what counts as a new ticket?
It fetches tickets created since the previous check and tracks which ones it has already processed. A ticket that was triaged once is not changed again on later runs, even if a requester replies to it.
What permissions does it need?
read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new 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 “Sort new tickets by category and priority” from your assistant

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