# Automations > Close, reassign, tag or notify when a ticket has waited too long. Automations check your open tickets once an hour. Automations are time-based rules for your Helpdesk. Once an hour, each active automation checks the agent's open tickets and acts on the ones that have waited longer than you allow. It can raise the priority of a ticket nobody has answered in four hours, or close a ticket three days after the customer went quiet. You build them like [Triggers](/docs/user-guides/chatbot/help-desk/triggers), with conditions and actions. What differs is what starts them. A trigger runs when a ticket is created or updated. An automation runs on a schedule, so it catches the tickets where nothing happens. You manage them under **Settings › Helpdesk › Automations**, described there as *Automate your Helpdesk with rules that check open tickets once an hour. Automations run in order, top to bottom, and every matching automation fires.* ![The Automations settings page with its description, the New automation button under the pointer, and the empty state No automations yet.](annotated/01-empty.webp "Settings › Helpdesk › Automations, before the first automation.") > [!NOTE] > > Automations act on tickets in QwryAI's own Helpdesk. Tickets that live in another helpdesk, such as Zendesk, are handled there. ## Creating an automation **1. Open Automations** Go to **Settings › Helpdesk › Automations** and select **New automation**. A new automation starts with one time condition, **Time since last update** more than 24 hours. ![The New automation panel with Name and Description, the When section with a Time since last update more than 24 hours condition, Add condition and Add time condition buttons, and the Active switch, the count of open tickets it would act on, Cancel and Create automation at the bottom.](annotated/02-new-automation.webp "A new automation starts with Time since last update more than 24 hours.") **2. Name it** Give it a **Name** that says what it does, such as `Flag tickets waiting on us`, and add a **Description** if it helps your team. **3. Set the wait** Every automation needs at least one time condition under **Match ALL of**. Pick what to measure from, then **more than** or **less than**, an amount, and **hours** or **days**. See [Time conditions](#time-conditions). ![The When section with the time condition's field list open and the pointer on Time since last customer message, next to more than 4 hours.](annotated/03-time.webp "Set what to measure from and how long.") **4. Narrow it down** Select **Add condition** to add ticket conditions, such as a status category or a team, the same way you would on a trigger. Select **Add time condition** for another wait. ![The When section with Time since last customer message more than 4 hours and Agent has replied is False under Match ALL of, and an empty Match ANY of group.](annotated/04-conditions.webp "Narrow it down with ticket conditions.") **5. Add the actions** Pick an **Action type** for the first action, and select **Add action** for more. They run top to bottom. ![The Then section with two actions: Set priority High, and Add internal note with the text Waiting on us for 4 hours. Please pick this up.](annotated/05-actions.webp "Add the actions; they run top to bottom.") **6. Check the count, then save** Leave **Active** on to start straight away, or turn it off to save it paused, then select **Create automation**. An active automation acts on the next hourly check. ![The bottom of the New automation panel with the Active switch off, the number of open tickets the automation would act on right now, Cancel, and the pointer on Create automation.](annotated/06-create.webp "The footer counts the open tickets it would act on.") ### Checking how many tickets it will act on While you edit, the footer counts the open tickets the automation would act on if it ran now, such as *Will act on 3 open tickets*, or *Won't act on any open tickets right now*. Use it to check the conditions catch what you meant before you save. The count looks at up to 1,000 open tickets and shows `1000+` beyond that. On an automation you already saved, it leaves out the tickets the automation has already acted on. ## Time conditions Each time condition counts from a different point on the ticket. | Condition | Counts from | | - | - | | **Time since created** | When the ticket was created. | | **Time since status changed** | The ticket's last status change. A ticket whose status never changed counts from its creation. | | **Time since assigned** | When the ticket was assigned. Tickets with no assignee don't match. | | **Time since last customer message** | The customer's last message. Tickets without one don't match. | | **Time since last agent reply** | A teammate's last reply to the customer. Internal notes don't count. Tickets without a reply don't match. | | **Time since last update** | The last change of any kind to the ticket. | The wait can be from 1 to 8,760 hours or days. Time conditions go in **Match ALL of** only, so when an automation has several, all of them have to pass. Triggers can't use them: *Time conditions are not available in triggers.* ## Other conditions Automations take the ticket, contact and routing conditions from [Triggers](/docs/user-guides/chatbot/help-desk/triggers#conditions), such as **Status category**, **Team**, **Priority**, **Tags**, **Last message** and **Agent has replied**. They compare the ticket as it is when the automation runs. The trigger-only conditions, **Ticket** (Created or Updated), **New message** and the changed operators, aren't available in automations: *Not available in automations.* ## Actions Automations take every action from [Triggers](/docs/user-guides/chatbot/help-desk/triggers#actions): statuses, teams, agents, priority, tags, internal notes, email, Slack and webhooks. A webhook sent by an automation carries the event `helpdesk.automation`. Changes an automation makes don't start your triggers. If you want a notification when an automation closes a ticket, add the notification to the automation itself. ## When an automation acts * **Only open tickets.** Tickets that are closed or cancelled are skipped, and an automation stops on a ticket as soon as an earlier one closes it. * **Once per ticket.** An automation acts on each ticket once. If the ticket matches again later, it isn't acted on again. * **Editing the conditions starts it over.** After you change an automation's conditions, it can act again on tickets it already handled. The panel warns you: *Changing the conditions makes this automation act again on tickets it already handled.* Editing only the name, description or actions keeps its history. * **In list order.** When several automations match the same ticket, they act in order, top to bottom. * **Up to an hour late.** Automations check once an hour, so one can act up to an hour after a ticket's wait ends. Each hourly run checks up to 5,000 open tickets per AI agent. Each time an automation acts on a ticket, the ticket's conversation shows a line such as *Automation Flag tickets waiting on us ran*, and the changes it made appear in the ticket's history. ## Examples ### Flag tickets nobody has answered * **Match ALL of:** Time since last customer message more than 4 hours, and Agent has replied is False * **Then:** Set priority High, then Add internal note "Waiting on us for 4 hours. Please pick this up." ### Close tickets the customer stopped answering * **Match ALL of:** Time since last agent reply more than 3 days, Last message is any of Agent, and Status category is none of On hold * **Then:** Send email to the Requester saying the ticket was closed, then Set status category Closed ## Managing automations ![The Automations page listing Flag tickets waiting on us with the Paused badge, its description, 2 conditions and 2 actions, the reorder handle, and the pointer on its switch, which is off, next to the edit and delete buttons.](annotated/07-list.webp "Use the switch to activate or pause an automation.") * **Reorder:** drag an automation by its handle, or focus the handle and press the up or down arrow. * **Activate or pause:** use the switch on its row. A paused automation shows **Paused**. * **Edit or delete:** use the pencil or the bin. Deleting stops it running; changes it already made to tickets stay. * **Needs attention:** an automation that points at something that no longer exists, such as a deleted team, an archived status or a removed webhook, shows a **Needs attention** badge with the reason. ### Limits | Limit | Value | | - | - | | Automations per AI agent | 100 | | Longest wait in a time condition | 8,760 hours or days | | Open tickets checked per AI agent in one hourly run | 5,000 | | Conditions per group | 30 | | Actions per automation | 20 | | Values per list condition | 100 | ## Frequently asked questions > [accordion] Why didn't my automation act on a ticket straight away? > > Automations check once an hour. A ticket whose wait has just passed is picked up on the next check. > [accordion] Can an automation act on the same ticket twice? > > Not with the same conditions. Change its conditions to let it act again on tickets it already handled. > [accordion] Can an automation act on closed tickets? > > No. Closed and cancelled tickets are always skipped. > [accordion] Why does the count say it won't act on any tickets? > > No open ticket matches all the conditions right now, or the automation has already acted on the ones that do. Try a shorter wait to check the conditions work.