Currently, multiple clients from Zendesk get inundated with Spam Mail
with titles like nQnHq用你IP帮我打綵漂每天3OO伽qun927553967
As it always concerns other users, marking the user as a spammer or blocking the user will not help you. Therefore, you might want to autoclose these tickets.
Option 1 > autoclose the spam tickets
Option 2 > autodelete the spam tickets
Option 1 > autoclose the spam tickets
you can create a trigger that changes the status of the tickets directly to closed
condition in the trigger should be as follows
- If the ticket is created
- and it contains in the subject any of the following stings (list starting from qun0 ->to qun9)
- Action is > status category = closed + add tag like "spam_qun" - this way you can easily find them back and delete them afterwards
Option 2 > autodelete the spam tickets
In this case you will need to create a webhook first
Create Webhook
First, we create the webhook in Admin Center > Apps and integrations > Webhooks. Use the details below to configure it.
- Create an API token and save it somewhere so you can copy/paste it at later stage
- in the admin panel > create a webhook
- Select Trigger or automation
Name: Delete spam
Endpoint URL: https://client.zendesk.com/api/v2/tickets/{{ticket.id}} (replace here client with the domain name of your zendesk instance)
Username: emailaddress/token (needs to be the email address of an admin and don't forget the /token at the end)
Request Method: DELETE
Request Format: Basic Authentification
Password: API token you copy paste (see step 1)
Trigger/automation actions
Now that we have our webhook, we can invoke it from trigger or automation actions:
create a trigger that says
- If the ticket is created
- and the subject contains string: qun0, qun1, qun2,...
- Action is > webhook > Delete Spam
do note that if a new badge of spam comes in with a different subject, you need to add it as a new criterion for the trigger to work