If you want to create a TinyURL in ServiceNow, all you need is one line of code. new GlideTinyURL().createTinyURL(url); Note: glide.tiny_url_min_length controls the min length of URL to turn it as tinyURL.