Tagging Ticket based on content of email/subject

Looking to implement Autotask’s version of ticket tagging to replicate what the current email processor does. If any words are found in either the subject or body of an email, that match any of the tags in the library - they are added as tags on creation.

How could this be done?

Marek

Hey @marek_itguys ! Thanks for posting here in the community.

Overall, here is the process I would recommend:

1. Query Autotask for all tags in your library and store the result as custom.tags:

2. Iterate over each tag:

3. For each tag, test if the subject (and/or body) of the email contains the text of the tag. If it does, add the tag to the ticket.

You may want to enable the checkbox to Suppress exceptions generated from Autotask API to prevent exceptions if you try to add a tag that already exists on a particular ticket.

Note that the TagID field and the TicketID field are unlocked (the padlock icon). This allows you to type in the {{custom... value directly.

Using {{custom.ticket.id}} assumes that custom.ticket was populated in an earlier step and contains the ticket to which you want the tags added.

When creating the expression for the third step, we’d like it to be like this but we need the operator pull-down to say “contains”. The MSPintegrations UI doesn’t make “contains” available when the field on the right is locked (it was not supported until recently):

The system now supports “contains” when the field on the right is locked, but the UI doesn’t expose it. You can get around it by holding SHIFT when clicking the button to add a new stanza and then typing the expression by hand, like this:

Let me know how it works!

Hi Travis

I set up the steps provided to the top of a cloned “Create new ticket” flow, is this how it’s meant to be implemented?

Having reduced my tags to around 20 or 30 active in Autotask I see in the History section that it is reading the correct amount of tags, but does not write the tags into the ticket.

Any advice would be appreciated

Hi Michael,

Can you provide the URL to the email in your history that didn’t write the tags? I’d like to see the logs to identify the issue.

Thanks!

Hi @michael ,

Thanks for DMing me the link to your history.

I looked at the history, and I see a few issues:

  1. Step 4 is querying for the ticket, but you don’t need to do that since Step 3 already returns the ticket.
  2. The step to add the tag to the ticket isn’t using the correct variable for TicketID.

If you make these changes, I expect it to work:

  1. Navigate to your rule: MSPintegrations
  2. Delete Step 4

  1. Save the rule and then open it again (to make sure the correct values are populated in the auto-complete menu)

  2. Within the iterate step, change TicketID to {{custom.ticket.Ticket.id}}

Let me know how that works!

Perfect, now working

Are we able to have it compare only the tags in one AT tag group? I would like to keep all tagging groups active in AT but realize this is not possible for MSP ticket tagging

Thanks

Not easily, no. I have documented this as a feature and we’ll review this to see how to best handle this.