Hudu – Autotask / Datto PSA – Open Tickets Magic Dash

I wanted to start getting my head around the Autotask API so I thought I would make a simple Magic Dash in Hudu for open tickets in Autotask per company, and also highlighting any overdue tickets. In playing with the Autotask API I learned the Autotask API is horrible! In the return for a ticket you have a handful of text fields and then everything else is just IDs which you have to lookup from somewhere else. This makes it rather frustrating to get useful information out of it! I have also included an option to generate an article with a list of all overdue tickets across all customers.

The most annoying issue was that to get the lookup values for things like Queues and Ticket types there is not a way to do it in PowerShell module so I had to make a request direct to the API to get them.

Setup

The first thing to do is add some custom CSS to Hudu. I have added another colour for the Magic Dash to have an optional warning colour rather than just success and danger. To add his go to -> Admin -> Design -> Custom CSS and add:

.custom-fast-fact.custom-fast-fact--warning {
    background: #f5c086;
}

Next you will need to create an API User in Autotask. Use the custom integrator option and make a note of the ID for this as well as the user and secret for the API.

Get your Hudu base URL and API Key as well. Your will also need to get the Folder ID of where you want the global report to be generated in your Global Knowledge base. You can get this from the URL when browsing into the folder.

You will need to lookup the number of your Autotask instance. You can see this in your address bar. It will be XX in https://wwXX.autotask.net

Edit these details into the script replacing the number in $AutotaskRoot and $AutoTaskAPIBase.

The first time you run the script it will output a table of IDs for your ticket Statuses edit $ExcludeStatus with all your complete statuses and any others you wish to exclude in the format of = ‘[1,5,7,9]’

Run the script again and this time it will prompt for Types to exclude. Repeat the process setting $ExcludeType

Finally run it one more time and it will prompt for queues to exclude. Repeat the process setting $ExcludeQueue

Once these have been set you can run the script and it should update the Magic dashes for you and generate the global report if requested.

You can find the script here: https://github.com/lwhitelock/HuduAutomation/blob/main/Hudu-Autotask-Magic-Dash.ps1

You may also like...