Returning a Ticket URL When Creating a ServiceNow Ticket
Automating the creation of IT service tickets is quite normal as it will reduce the amount of human intervention that is required when logging tickets. ServiceNow will return the ticket number as part of the payload that is returned when creating a ticket. But, what if we would like to provide the user with a direct link to the ticket itself?
There is no direct way that we can retrieve a URL, but we can put one together by concatenating our ServiceNow Instance URL with /incident.do?sysparm_query=number%3D and our Ticket Number.
We can subsequently use this Compose value in downstream actions such as Microsoft Teams. We will add the Compose Action that we just created and wrap it around Markdown that will allow us to format it as a link.
When we run our flow, we will be able to click our URL and open the ticket directly in ServiceNow.
In this post we discussed how we can do more than just return a Ticket Number when someone creates a ServiceNow Incident. Instead, we can construct a URL that allows a user to directly open the ticket in the ServiceNow web application.