Returning a Ticket URL When Creating a ServiceNow Ticket
  • 14 Oct 2020
  • 1 Minute To Read
  • Contributors
  • Print
  • Comments
  • Share
  • Dark
    Light

Returning a Ticket URL When Creating a ServiceNow Ticket

  • Print
  • Comments
  • Share
  • Dark
    Light

#ServerlessTips - Power Automate
Author: Kent Weare Integration MVP

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?

1-Number

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.

https://.service-now.com/incident.do?sysparm_query=number%3D

Note: Replace and with your values, these are only placeholders. We can createf this URL inside of a Compose action and add it to our flow after our Create Record (Incident) action.

2-compose(1)

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.

3-teams

When we run our flow, we will be able to click our URL and open the ticket directly in ServiceNow.

4-Test

Conclusion

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.

Was This Article Helpful?