Few days ago we started to get thousands of spam tickets thru our Contact support form on Zendesk Help center. Since it took a while to learn how to delete thousands of tickets at once, I decided to share my solution.
Preview of the problem:
As you can see, Zendesk was not able to detect messages as spam, so we had to find a way to:
- stop the spam tickets coming
2. delete about 8 000 open tickets
1. How to stop the spam?
Fortunately this was an easy one. We just had to enable Google reCaptcha from Zendesk. Setting can be found at: Admin > Customers > Require CAPTCHA.
2. How to delete 8 000 open tickets?
So next task was to get rid of the unnecessary 8 000 open tickets. There is 3 ways (as far as I know) to delete tickets after they have been created:
- 1-30 tickets at time from admin panel
- 1-100 tickets at time thru Zendesk API
- 1000 tickets in one hour with Zendesk automations
Since the first method would probably take a day, second few hours (if you know how to code), I decided to try Zendesk Automations what only takes couple of minutes to set it up.
Delete tickets using automations
Since there was over 24 hours when all the spam tickets were created, I could add following conditions to my automation:
- ticket status is open
- ticket is created over 24 hours ago
For those I changed ticket status to closed.
Automations can be created at: Admin > Automations > Create new automation.
But this might also delete real tickets?
True, so I had to make sure that all ongoing tickets that are over 24 hours old have any other status than open (like peding), otherwise they are also deleted in the process.
- It seems that automations run once per hour and process only 1000 tickets at one time. Fortunately you can create multiple automations to get rid of them all in one hour.
- Remember to delete the automations after problem is solved!
Please let me know if you know a better way to do this :)