Skip to content

On a schedule

Close tickets left in Resolved

Tickets resolved more than 3 days ago are closed overnight, and you get the count.

Runs
On a schedule
Apps
Freshdesk
AI
Not needed
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: every night at 2am, close Freshdesk tickets that have been Resolved for more than 3 days and email me how many were closed.

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 Freshdesk, an agent marks a ticket Resolved and waits for the customer to confirm. Many customers never reply, and the ticket stays in Resolved for weeks. Queues look bigger than they are, reports count tickets as unfinished, and any metric based on closed tickets lags reality. Someone then has to go through the list by hand, closing dozens of tickets one at a time, which is a task nobody enjoys.

On the schedule you set, ClickRuntime searches for tickets whose status is Resolved and which have not been updated in a number of days you choose, sets their status to Closed, and emails you how many it closed. Tickets with recent customer replies are left untouched. The count of Closed tickets finally reflects reality.

It suits support teams that want clean queues and trustworthy numbers.

What you get out of it

  • Keep the queue honest

    Closed tickets leave your working views, so the list shows only what needs attention. Agents stop wading through finished work to find open items. Agents can focus on tickets that need a reply.

  • Fix reporting that depends on Closed

    Many dashboards count Closed tickets for resolution time and volume. Closing stale ones on time makes those figures accurate for the period they belong to. Reports become trustworthy again. Late replies still reach an open ticket.

  • Remove a manual cleanup chore

    Closing hundreds of tickets by hand wastes an agent's afternoon. Automatic closure after a quiet period makes the chore disappear. That time is better spent helping customers. Hours saved add up.

  • Respect the customer's reply window

    Waiting a set number of days gives customers time to reopen a ticket. Anyone who replies in that window resets it, so no genuine follow-up is cut off. Customers stay in control of their tickets.

  • See how many tickets were closed

    The count in the email tells you how much of your Resolved list was never confirmed. A big number suggests asking for confirmations differently or resolving less hastily. That number is a useful diagnostic in itself.

How it works

What happens, step by step

  1. Every night at 2am ClickRuntime looks for Freshdesk tickets that have sat in Resolved for more than 3 days.

  2. It changes each of them to Closed.

  3. You get an email with the number closed and each ticket's number and subject. If there were none, no email is sent.

Before it runs live

  • Connect Freshdesk

What you get

RunsOn a schedule
Close tickets left in Resolvedtoday, 9:00Succeeded
Email · Closed 12 resolved Freshdesk tickets#5502 Password reset email delayed #5517 Change billing address

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 Freshdesk 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.
auto_close_stale_resolved_tickets.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

DOMAIN = "acme"
DAYS = 3

@on_trigger
def run(event):
    key = credentials.secret("FRESHDESK_API_KEY")
    base = f"https://{DOMAIN}.freshdesk.com/api/v2"
    cutoff = (date.today() - timedelta(days=DAYS)).isoformat()
    tickets = http.get(f"{base}/search/tickets",
                       params={"query": f"\"status:4 AND updated_at:<'{cutoff}'\""}, auth=(key, "X")).json()["results"]
    for t in tickets:
        http.put(f"{base}/tickets/{t['id']}", json={"status": 5}, auth=(key, "X")).raise_for_status()
    if tickets:
        notify.email_me(f"Closed {len(tickets)} resolved Freshdesk tickets",
                        "\n".join(f"#{t['id']} {t['subject']}" for t in tickets))
    return {"closed": len(tickets)}

FAQ

Common questions

How many days should I wait?
Many teams use three to seven days. Freshdesk itself can close resolved tickets automatically through its automation rules, and this flow lets you set your own period and get a count by email. Start longer and shorten it later.
What happens if the customer replies after closing?
In Freshdesk, a reply to a closed ticket usually reopens it or creates a follow-up ticket, depending on your settings. The customer is not locked out, so the closure does not stop further help. Reopened tickets keep their full history.
Does it close tickets from specific groups only?
It can. Add a filter on group, type or tag and only matching tickets are closed. Others stay in Resolved until an agent handles them, which suits teams with different rules per queue. Different rules per queue are common.
What permissions does it need?
read+write. 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 (on a schedule). 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 “Close tickets left in Resolved” from your assistant

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