Truncate Incident title from email subject

Hello! We have a number of alerts that come through from different email systems that we cannot modify. The subject lines of the emails start with lots of useless information and then end with something helpful and identifiable. What I would really like to do is strip the garbage text off the front and then start the Incident title with the helpful text. I’ve taken a look through the PD docs but cannot find anything that describes how to do that. Is it possible?

If you are looking to have the subject of your email changed, your best bet is to use global event routing. If you haven’t used it before, you can get started by navigating to Configuration > Event Rules and clicking the ◄ Incoming Event Source at the top to see the ways in which events and emails can be sent to this endpoint.

Global event routing allows you to send events and emails to a single endpoint and configure rules to determine which service they should be routed to. It also provides some additional features that are not available in standard email integrations, such as field extraction.

Field extraction allows you to copy important data from one event field (or email subject/body/address) to another using regex. For example, let’s say you have a 6-digit ticket number (e.g. Ticket# 234544) in your email body that you would like to set as the incident description. To do this, you could set your global event rule to Extract one field into description, and then set it as follows:

(Ticket)# [0-9]{1,6} from body to description

Then as long as your regex matches, the triggered incident will have a description (title) of Ticket# 234544. You can use a site such as Regex101 to test out your regex. It’s always a good idea to send test events/emails in as well to make sure your rules are behaving as you expect.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.