Trying to use this
{{issue.description.substringBetween("Serial number:"," Issue")}}
to parse this
An issue was closed for the Google Meet hardware 1.11 Uxbridge (abc, 1).
Issue: Missing monitor
Issue type: Peripheral
Issue opened: 2025-03-27T11:07:47+00:00
Issue closed: 2025-03-27T12:08:35+00:00
Annotated location: xyz
Asset id: -
Serial number: ABC12345
Issue id: 5880069409818180584
Google Admin Device Details page: url
This notification is managed in Google Admin > Devices > Google Meet
hardware > Settings and policies
OpsGenie Alert
But it returns an empty string; any ideas or pointers appreciated.
Hi @Myles Boyd
The problem is likely from the newline characters in the Description text causing the search to halt. Many of the text functions have problems when there are newlines in the text.
The solution is to first replace all of the newlines with spaces:
{{issue.description.replace("\n", " ").substringBetween("Serial number:"," Issue").trim()}}
I also added a trim() to the end to remove any stray spaces.
TIP: when you need the newlines for later processing, they could be replaced with some known text, parsed, and then replaced back to newlines. For example, we could use a double-tilde ~~ as that seems unlikely to be used:
{{issue.description.replace("\n", "~~").substringBetween("something", "somethingElse").trim().replace("~~", "\n")}}
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The leading space on Issue in your smart value could be something to check, you can try
{{issue.description.substringBetween("Serial number:", "Issue id:")}}
or possibly just the new line
{{issue.description.substringBetween("Serial number:", "\n")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.