Automation #4 - Auto Delete Tickets based on Rules

Automation #4 - Auto Delete Tickets based on Rules



This is a monthly series in which we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk.
 
Unwanted tickets spamming your inbox and messing with your help desk reports? There is a way you can automatically delete such tickets, based on their subject lines or email IDs or a combination of both. The rules totally depend on your use case, but we have a simple script that can help you achieve this easily. Initiate this automation today and clear unwanted tickets easily and keep your reports accurate. 
 
Let's begin by establishing two components: a connection and a workflow rule linked to a custom function. Initially, we'll create the connection, followed by configuring the workflow rules to trigger the custom function.

Create a connection

To create connection, perform the following steps:
  1. Go to Setup > Connections under Developer Space
  2. Click "Create Connection"
  3. Select "Zoho Desk" under "Default Services"
  4. Give the connection name as "autodeletetickets"
  5. Under Scope below values
    Desk.tickets.READ
    Desk.tickets.DELETE
  6. Click "Create and Connect"
  7. Click "Connect" and click "Accept"
Connection is created successfully.


To create workflow rule and associate custom function, perform the following steps:
  1. Go to Setup, and under Automation, click Workflows.
  2. On the left panel, under Workflows, click Rules > Create Rule,
    In the 
    Basic Information section, carry out the following steps:
  3. In the Module drop-down menu, select Tickets.
  4. Enter a name and description for the rule.
  5. If you want to activate the rule right away, select the Active checkbox. Else, you can just create the rule now and activate it later, on the Rules page.
  6. Click Next.
    In the 
    Execute on section, perform the following steps:
  7. Select the Create checkbox to execute this rule every time a new ticket is created. 
  8. In the Criteria section, perform the following steps:
  9. If you want to delete tickets based on the content in the Subject field, add this criteria:
    Subject contains <keywords separated by commas.
  10. If you want to delete tickets based on the content in the Subject field and the email ID of the contact, add this criteria:
    Subject contains <keywords separated by commas>
    AND/OR
    Email contains <email ids separated by commas>
  11. If you want to delete all tickets except the ones that have a specific content in the Subject field and/or were sent by a particular sender, add this criteria:
    Subject doesn't contain <keywords separated by commas>
    AND
    Email doesn't contain <email ids separated by commas>
  12. Click "Next".
  13. In the Actions section, carry out the following steps:
  14. Click the + icon under "Action" and select "New" next to Custom Functions
  15. Enter a name and description for the custom function. Choose Tickets under Module.
  16. Under Argument Mapping, give a desired Method Name. Map the arguments as below:
     16.1 
    In the Argument Name field type ticketID, and from the Value drop-down list select Ticket Id under Tickets Section. 
  17. In the script window, input the Custom Function you find below:

    1. deskDomain = "https://desk.zoho.com";
    2. //Replace your zoho desk URL accordingly
    3. jsonString = {"ticketIds":{ticketID}};
    4. deleteTicket = invokeurl
    5. [
    6. url :deskDomain + "/api/v1/tickets/moveToTrash"
    7. type :POST
    8. parameters:jsonString.toString()
    9. connection: "autodeletetickets"
    10. ];
  18. Click "Save" to save the custom function
  19. Click "Save" again to save the workflow.

Important Note: Please make sure to add the accurate criteria, based on which the custom function must be executed. If you do not add any criteria, the rule will execute and delete all tickets in the department. 


    Access your files securely from anywhere


            Zoho FSM Video Tutorials


                  All-in-one knowledge management and training platform for your employees and customers.






                                        Zoho Developer Community




                                                              • Desk Community Learning Series


                                                              • Digest


                                                              • Functions


                                                              • Meetups


                                                              • Kbase


                                                              • Resources


                                                              • Glossary


                                                              • Desk Marketplace


                                                              • MVP Corner


                                                              • Word of the Day


                                                              • Ask the Experts



                                                                        • Sticky Posts

                                                                        • Register for Zoho Desk Beta Community

                                                                          With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
                                                                        • Share your Zoho Desk story with us!

                                                                          Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
                                                                        • Tip #1: Learn to pick the right channels

                                                                          Mail, live chat, telephony, social media, web forms—there are so many support channels out there. Trying to pick the right channels to offer your customers can get pretty confusing. Emails are most useful when the customer wants to put things on record. However, escalated or complicated issues should not be resolved over email because it's slow and impersonal.  When you need immediate responses, live chat is more suitable. It's also quick and convenient, so it's the go-to channel for small issues. 
                                                                        • Welcome to Zoho Desk Community - Say hello here!

                                                                          Hello everyone! Though we have been here for a while, it’s time to formally establish the Zoho Desk Community; we’re really happy to have you all here! This can be the place where you take a moment to introduce yourself to the rest of the community. We’d love to hear all about you, what you do, what company or industry you work for, how you use Zoho Desk and anything else that you will like to share! Here’s a little about me. I am Chinmayee. I have been associated with Zoho since 2014. I joined here
                                                                        • Webinar 1: Blueprint for Customer Service

                                                                          With the launch of a host of new features in Zoho Desk, we thought it’ll be great to have a few webinars to help our customers make the most of them. We’re starting off with our most talked about feature, Blueprint in Zoho Desk. You can register for the Blueprint webinar here: The webinar will be delivered by our in-house product experts. This is a good opportunity to ask questions to our experts and understand how Blueprint can help you automate your service processes. We look forward to seeing


                                                                        Manage your brands on social media



                                                                              Zoho TeamInbox Resources



                                                                                  Zoho CRM Plus Resources

                                                                                    Zoho Books Resources


                                                                                      Zoho Billing Resources

                                                                                        Zoho Projects Resources


                                                                                          Zoho Sprints Resources


                                                                                            Qntrl Resources


                                                                                              Zoho Creator Resources



                                                                                                  Zoho CRM Resources

                                                                                                  • CRM Community Learning Series

                                                                                                    CRM Community Learning Series


                                                                                                  • Kaizen

                                                                                                    Kaizen

                                                                                                  • Functions

                                                                                                    Functions

                                                                                                  • Meetups

                                                                                                    Meetups

                                                                                                  • Kbase

                                                                                                    Kbase

                                                                                                  • Resources

                                                                                                    Resources

                                                                                                  • Digest

                                                                                                    Digest

                                                                                                  • CRM Marketplace

                                                                                                    CRM Marketplace

                                                                                                  • MVP Corner

                                                                                                    MVP Corner






                                                                                                      Design. Discuss. Deliver.

                                                                                                      Create visually engaging stories with Zoho Show.

                                                                                                      Get Started Now


                                                                                                        Zoho Show Resources

                                                                                                          Zoho Writer

                                                                                                          Get Started. Write Away!

                                                                                                          Writer is a powerful online word processor, designed for collaborative work.

                                                                                                            Zoho CRM コンテンツ


                                                                                                              Nederlandse Hulpbronnen


                                                                                                                  ご検討中の方




                                                                                                                            • Recent Topics

                                                                                                                            • Zoho Mail Android app not receiving push notifications on multiple devices

                                                                                                                              I'm using the latest version of the official Zoho Mail app on two different Android devices: Samsung Galaxy S25 running One UI 9.0 Motorola G41 running Android 12 Unfortunately, I'm not receiving any push notifications on either device. I've already followed
                                                                                                                            • ZohoのAIエージェント、作り方から使いどころまで。デモとユーザー事例で学ぶ|12/8東京・無料

                                                                                                                              ユーザーの皆さま、こんにちは。 ゾーホージャパンの中野です。 12月8日(火)、Zohoコミュニティで初めてとなる「Zoho コミュニティ ユーザー総会 2026」を開催します。 年に一度、ユーザーとZoho社員が集まる総会として、今回は100名規模での開催を予定しています。 ユーザー企業の実践事例、AIエージェント / Zoho MCP のデモ、CRM・Campaignsの活用セッションなど、 日頃の交流会よりも幅広いプログラムをご用意しました。 以前のご案内から新たに予定している内容も含め、当日の見どころをご紹介します。
                                                                                                                            • How to sync Organisation Contacts to Android / AES

                                                                                                                              After migration form Exchange compatible server, I got Org Contacts: I've turned on EAS Organisation contacts sync. But on my phone they don't appear and there is no contacts folder to select for these contacts. Only personal contacts. They do appear
                                                                                                                            • Zoho Inventory | Can't uncheck/turn off Advance Tracking

                                                                                                                              Hi, I wanted to know if there's a way to turn off Advanced Tracking (such as Serial Number or Batch Tracking) for an item in Zoho Inventory. I’ve read that you might need to delete associated transactions and clear the opening stock to disable these features.
                                                                                                                            • How to Disable this Pop-up

                                                                                                                              We believe this has been added recently, correct? How to disable this? we receive lot of complaints from our team from SG & MY
                                                                                                                            • Categorize Items with Item Headers

                                                                                                                              Hello customers, Did you ever want to classify items based on specific categories to help your customers understand your invoice better? With the new Item Header feature, you can easily categorize items in your invoices and estimates and give them a common title.  Item Headers are available in the Invoices, the Recurring Invoices and the Estimates module. It can be carried forward from estimates to invoices at the time of converting the estimates.  To add an item header: Go to the Estimates, Invoices
                                                                                                                            • A way to report on all leads for a given month

                                                                                                                              Is there a way to report on ALL leads created in one month by source.  I need to include both open, closed lost and converted leads.   Right now I can only see source of non converted lead and cannot find a way to add the converted leads to the same report.   I'm trying to do this to gain insight into my sources of leads, volume in and disposition of each lead.
                                                                                                                            • Unable to delete domains from Zoho Campaigns

                                                                                                                              This error occurs while deleting a domain "This domain cannot be deleted because we've found $1sender addresses associated to it." But I have no more sender addresses of this domain anymore. I can't delete the domain.
                                                                                                                            • Ability to translate Zoho CRM Kiosks

                                                                                                                              Hi team, Is support for translating kiosk text and screen names in the Zoho CRM translation tool planned on the roadmap? Thanks,
                                                                                                                            • [Critical] Massive delays with e-mail

                                                                                                                              It takes half an hour or longer for emails to arrive or replies to go out! Another thing I have noticed with outgoing e-mails is that I see an error message when I click on "Show original" (tab "HEADER"). If I click on the "CONTENT" tab, the mail body
                                                                                                                            • WorkDrive Desktop Sync Is Being Deprecated: Move to WorkDrive TrueSync for a Smarter Experience

                                                                                                                              Hi everyone, We are excited to share a better, smarter way to access and manage your files directly from your computer! We’re transitioning from our legacy Desktop Sync app to WorkDrive TrueSync, designed to give you faster performance,greater flexibility,
                                                                                                                            • Automating CRM backup storage?

                                                                                                                              Hi there, We've recently set up automatic backups for our Zoho CRM account. We were hoping that the backup functionality would not require any manual work on our end, but it seems that we are always required to download the backups ourselves, store them,
                                                                                                                            • Account for Cryptocurrency Holdings in Zoho Books/Custom Currencies?

                                                                                                                              Hello, I've recently started using Zoho to run my small business and I've really been enjoying all of its features. However, I've been struggling to find a way to account for cryptocurrencies in Zoho Books. My company mines a Cryptocurrency token called
                                                                                                                            • CNIL - Suivi de Pixel

                                                                                                                              Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
                                                                                                                            • #21 The Customer Sent Part of It Back

                                                                                                                              Ravi delivered 200 trays to a customer and raised an invoice for the full order. Two days later, the customer returned 60 trays. The customer had also paid an advance against the invoice. Ravi now needs to account for the returned items, adjust the amount
                                                                                                                            • Zoho Assist Feature Update: November 2026

                                                                                                                              Screen Analyzer Zoho Assist’s Screen Analyzer, part of Answer Bot, helps technicians troubleshoot faster during live sessions. Capture the full remote screen or a specific portion, and it instantly analyzes the snapshot to detect errors and issues. It
                                                                                                                            • Zoho Assist Feature Update: October 2026

                                                                                                                              H.265 support for Native Viewer and Mobile Viewer H.265 (HEVC) delivers sharper screen sharing at lower bandwidth than H.264. Already live in the Web Viewer, the codec is now available for the Windows Native Viewer and Mobile Viewers too. Support is in
                                                                                                                            • Trident Missing

                                                                                                                              No way you guys get so close to having trident complete for over a year then just kill it off. Wow just wow
                                                                                                                            • Sheet co-edit: no live presence — also on Collaborate demo?

                                                                                                                              Two Sheet co-edit sessions open OK (same document_id, document.edit: true), but there’s no real-time collaboration: no cell highlights, Group Chat → Users stays empty. Writer co-edit works on the same Office Integrator setup. We see the same on the official
                                                                                                                            • Feature Request: Fully customizable record layouts in Zoho FSM (movable sections and custom subform tables)

                                                                                                                              Hi Zoho FSM Team and Community, We’d like to suggest a feature that we think would help many FSM users: full control over the layout of record detail pages, starting with the Work Order view. Current situation When you open a Work Order, its sections
                                                                                                                            • KB Articles from Zoho Learn - Import as .md

                                                                                                                              I love the concept of being able to use articles from Zoho Learn as knowledge base articles for Zia Agents. This will absolutely help with proper documentation and organization of company processes and SOPs. This was a great concept. However, even when
                                                                                                                            • Why don't Zia agents support file uploads?

                                                                                                                              I am trying to build a Zia Agent that allows uploading of a PDF file and uses the GLM5 model to process it and extract information. But agents.zoho.com has no way to enable file uploads on the agent. Additionally, GLM5 based agents keep outputting their
                                                                                                                            • Building Toppings #10 - Using signals to build real-time notifications between Bigin and Zoho Desk

                                                                                                                              Hello Biginners! In our previous post, we covered Bigin Variables and Widgets. In this post, we'll explore another component: Signals. To show how Signals work, we will build a real-time use case integrating Bigin and Zoho Desk. It connects Zoho Desk
                                                                                                                            • Cliq iOS can't see shared screen

                                                                                                                              Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
                                                                                                                            • ¡Gracias por acompañarnos en los Workshops de Zoho España!

                                                                                                                              Los pasados 3 y 4 de noviembre celebramos una nueva edición de los Workshops de Zoho España en el Hotel NH Las Ventas de Madrid. Dos jornadas de formación práctica, demostraciones en directo y encuentros con expertos de Zoho en las que compartimos conocimientos,
                                                                                                                            • Mass Update Option for Changing Work Order Owner

                                                                                                                              Hello FSM Team/Mr. Abid, We would like to inquire if there is an option to mass update or bulk change the Owner of Work Orders in Zoho FSM. Current Situation: At the moment, the Owner of a Work Order can only be changed individually, which becomes time-consuming
                                                                                                                            • Never miss a follow-up with personal reminder agent | Zoho Cliq AI Use Case #03

                                                                                                                              A task mentioned mid-conversation rarely survives the conversation. Someone asks you to follow up, you say you will, and by the time you remember, the message is three hundred lines back, buried under two meetings and a dozen other threads. Personal Task
                                                                                                                            • Calendar won't load

                                                                                                                              I run into this problem about once a week, where I try to open my Zoho calendar in a web browser, and it just gets stuck, waiting forever to load (see attached screenshot). I'm usually using Edge or Duck-Duck-Go browser. Sometimes it loads just fine,
                                                                                                                            • Change 'default' project dashboard

                                                                                                                              Is it possible to change the default project dashboard for all projects? Both in layout and in what widgets are shown? We have a lot of (short-running) projects and I want to quickly see the tasks and milestones when I open a Project, but I don't want to change the layout for all my projects manually. Thanks, Menno
                                                                                                                            • Multiple subscription plan line items in Zoho Billing quotes

                                                                                                                              I run an IT company and sell a lot of licences. A client might have multiple subscription plans including software licences in different categories. A client might have Microsoft licences, antivirus licences, web hosting and maintenance package services.
                                                                                                                            • [ZohoDesk] Improve Status View with a new editeble kanban view

                                                                                                                              A kanban view with more information about the ticket and the contact who created the ticket would be valueble. I would like to edit the fields with the ones i like to see at one glance. Like in CRM where you can edit the canvas view, i would like to edit
                                                                                                                            • Live connection to DS files in Zoho Creator / ChatGPT

                                                                                                                              As an idea, we are using ChatGPT to build with Zoho Creator (outside of Zia), which is works brilliantly to assist write deluge, provide test suggesitons etc. Currently we are uploading the DS files which are very point in time, it would be great to have
                                                                                                                            • Unable to integrate Whatsapp Messaging into Zoho CRM - Business Messaging

                                                                                                                              Hello, I want to set up Business Messaging in our Zoho CRM and am struggling to set it up. I have logged into the account and our facebook business page, our business shows in the dropdown for WhatsApp Business Account but does not for WhatsApp Business
                                                                                                                            • Files in Teamspaces: keep your team's documents where the work happens

                                                                                                                              Release Note: This feature is available for all accounts across all DCs Hello Everyone, A Teamspace is built around a specific team and a shared objective, and it holds the modules and projects that team works with every day. The document that team depends
                                                                                                                            • Script to access a CBPX file from zoho crm

                                                                                                                              Hello everyone, I'm planning to write a script in Python or Java in Zoho CRM functions, to access a CBPX file. Is it possible to write this script in the dev console of Zoho? What are the best practices to do this ? Would you have references in the Zoho
                                                                                                                            • Calculate hours

                                                                                                                              Is there any chance that the the "formula" will have the ability to do calculation using the "time" field in the future? Our company has a form set up for tracking hours worked and we use 2 time fields currently. One for the clock-in time, and one for the clock-out time. It's great for keeping that record, but if there were a way to calculate the hours to show on the report would be awesome. Previously we had used JotForm and their calculator had that ability, but it seems that Zoho doesn't accept
                                                                                                                            • Introducing parent-child ticketing in Zoho Desk [Early access]

                                                                                                                              Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
                                                                                                                            • Zoho Books | Product Updates | November 2026

                                                                                                                              Hello users, As the year winds down, we've introduced several enhancements to make compliance, inventory management, and everyday bookkeeping easier in Zoho Books. This month's updates include an improved TDS experience, a new way to exchange transactions
                                                                                                                            • Zoho Writer workflows now support custom stages, parallel reviews, and external approvers

                                                                                                                              Hello everyone, Zoho Writer now lets you build your own approval chains. The pre-built workflows also get new review modes, completion criteria, and external approver support. What’s new Custom workflows: Design review and approval processes from scratch,
                                                                                                                            • Expanding sales, marketing, and support capabilities in Zoho CRM Plus 3.0

                                                                                                                              Hey everyone, It's been more than 10 years since we launched Zoho CRM Plus back in 2014. This is quite a milestone, and we've come a long way in empowering you with everything you need to offer an exceptional customer experience. On that note, we expanded
                                                                                                                            • Next Page