All Apps and Add-ons

Splunk automatically escaping the backslash character when creating/updating a snow ticket

michael3
Explorer

I'm trying to set the Description field of a ServiceNow Incident ticket through Splunk, and the string I'm passing contains a newline (\n).  But when Splunk creates/updates the ticket, either through the snowincident command or an action alert, it will automatically escape the backslash character.   So after Splunk passes the info to snow, the underlying json of the ticket looks like this:

{"description":"this is a \\n new line"}


and my Description field looks like this:

this is a \n new line

Is this something that Splunk is doing, or the ServiceNow Add-On?  Does anyone know of a way to get around this?

Labels (2)
0 Karma

magg
Observer

Also requesting a working way of adding newline to description in a servicenow incident generated by this addon

0 Karma
Get Updates on the Splunk Community!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...