Skip to main content

Here is an example of an ticket email we get, can we parse this ticket email description to automatically associate the System Name: ABC123DEF5678 to a Freshservice Asset Tag: ABC123DEF5678
 

~~~
Hi Jason,

We attempted to patch ABC123DEF5678 on 2024-08-19T13:18:52+0000, but ran into some problems and were unable to complete the operation. Here is a summary of what happened:

Patch Time: 2024-08-19T13:18:52+0000

Organization ID: 12345

System Name: ABC123DEF5678

System OS: 10 Enterprise

IP Address: 1.2.3.4

Patches: "Windows 11, version 23H2"

Failure: Failed to apply patches (...)

If you need assistance using the product or would like to discuss how to get the most out of Automox, you can reach the Automox team by email at support@automox.com.
~~~

Hi,

you can extract the name by searching for the strings “System Name” and “System OS”. Everything in between plus minus a few numbers (blank spaces and text as indexOf returns the start of the string) means you get the entire asset name.

Also the second topic to assign the asset to the tickt is possible via API.

Search for System Name with an expression: Returns a number.

 

Do the same for “System OS”. Returns another number. They are used within the third expression that returns the string that you wanted to have.

Build a substring in between and substract blank spaces and the text from “System Name”

 

The API call for assigning an asset to the ticket is not that difficult. Cannot find the API call where we did this within my instance.

Hope that helps.

 

Best regards

Daniel


Reply