Stethoscope on a laptop keyboard

Automatically send Maintenance emails from Zendesk

Disclaimer: USE AT YOUR OWN RISK! If setup incorrectly this could lead to a loop which constantly emails your client from Zendesk. This is NOT condoned or sponsored by Watchman Monitoring in anyway, it is an option but not necessarily the best one. Monge IT Consulting, Inc. (Mac IT Pros) will not be responsible for any issues, problems, omissions, or provide any support for use of the method outlined below.

If you use Watchman Monitoring and Gruntwork, this was written for you.  Have clients that never log out so maintenance can run? You could even take these directions and modify them for Time Machine (never connects the drive), or customers that always have full drives.

I’ve done limited testing, but so far it works as expected, your results may vary. Be forewarned, if something goes wrong, your customer could end up getting a LOT of automated Zendesk notification emails that look like they are coming from you. Use at your own risk and test, test, test!

Prerequisites

  • Replace [subdomain] with your subdomain.
  • Zendesk API token: https://[subdomain].zendesk.com/agent/admin/api/settings
  • Watchman Monitoring Reference Email is setup under a computer record

Steps

1. In Zendesk add the following customer tag to the “repeat offenders” in Zendesk: never_runs_maintenance

2. In Zendesk create an Extension Target (https://[subdomain].zendesk.com/agent/admin/extensions) with the following settings:

HTTP target
Title: Add Public Comment to WM Ticket
URL: https://[subdomain].zendesk.com/api/v2/tickets/{{ticket.id}}.json
Method: PUT
Content type: JSON
Basic Authentication: Check Enabled
User Name: [email protected]/token (your email)
Password: Zendesk API token

3. In Zendesk create a Trigger with the following settings:

Meet ALL of the following conditions
Tags Contains at least one of the following: never_runs_maintenance
Subject text Contains the following string Maintenance activity log
Ticket Is Created

Actions
Add tags: logoutrequired (optional if you want to use additional automations)
Priority: Normal
Assignee: John Doe (pick an Assignee)
Status: Pending
Notify target: Add Public Comment to WM Ticket
JSON body (feel free to update as you please):
{"ticket": {"comment": {"body": "Hi {{ticket.requester.first_name}},\n\nMaintenance on your Mac has NOT been able to run. At your earliest convenience, please log out so all maintenance routines may run. You can log out by going to the Apple menu and selecting Log Out … (your name)\n\nIt is best to Log Out daily, but weekly will work (end of day on Friday is always a good time) to maintain your computer, run system updates and apply security patches. After you log out just leave your Mac on, open, and plugged in (if it is a laptop) and all maintenance will complete.\n\nIf you have any questions or concerns please reply to this ticket. Once maintenance has completed I'll close this ticket. Thank you.", "public": "true"}}}

If setup properly, the next time you received a ticket regarding maintenance from Watchman Monitoring, on the client you placed the never_runs_maintenance tag, they will get an email automatically that looks similar to this:

Similar Posts