Hello,
I have an email integration that create alerts within my project in JSM. The data is sent in a table type format and in value pairs within the body of the email. I can successfully filter on text within the body by doing the below within the Create Alert.
Create Alert
IF message RegEx-contains .*(Critical|Error|Down).*
THEN create alert
This works... Yeah!
Now, I would like to parse the same email to modify the Alert Message (subject) to include information that is within the body of the message. Here is an example....
Consolidated Alarms
Report Creation Date/Time: 2024-11-06 T0 4:16:00-07:00 immediate
Total Alarms/Events: 16
I would like to add to the number from the value pair - Total Alarms/Events.
In alert properties, I would like to add something to Alert Message like
{{subject}} + message.extract(/Total Alarms/Events: ([1-9]\d?)/, 1))
I figured this out too.... sorry no help needed.
{{ message.extract(/.*Events Count: (\d+)/) }}
This worked and it pulled the number 16 from body of email for my subject... worked.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.