- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2017 03:55 PM
Hello,
I know that ServiceNow has a Tiny URL plugin that is supposed to shorten URLs, but I'm wondering if there is a way I can feed it a long URL and have it kick out a shortened URL that I can then pass along to someone.
Our SharePoint team is going to be linking to our Service Catalog. To point to one catalog item in particular, the link is:
That link is over 255 characters long, and therefore too long for SharePoint (according to our SharePoint team). Our SharePoint team got around this by using goo.gl to shorten the URL. But management is afraid that when users hover over the link, they'll see the goo.gl URL and be afraid to click on it because it's not an internal or ServiceNow link.
I'd like to know if there is a way that I can manually create a Tiny URL version of that long URL that starts with the instance url:
https://instance.service-now.com/
Thanks
Rick Seiden
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2017 02:24 PM
I managed to do it with Processors (System Definition > Processors).
I created a new Processor of type Script, and put the shortened URL in the "Path" field. Then I put the following code in the script:
(function process(g_request, g_response, g_processor) {
g_processor.redirect('com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=d38771f4db10c740a47ffb051d961959&sysparm_link_parent=b00565b8dbdc8740a47ffb051d961977&sysparm_catalog=e0d08b13c3330100c8b837659bba8fb4&sysparm_catalog_view=catalog_default');
})(g_request, g_response, g_processor);
It was that "g_processor.redirect(URL)" function that did the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2017 04:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2017 04:09 PM
Hi Rick,
The following thread will also help you with the task to shorten the urls
Short URL's for Linking to KB Articles. <insntance>.service-now.com/KB02955
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2017 02:24 PM
I managed to do it with Processors (System Definition > Processors).
I created a new Processor of type Script, and put the shortened URL in the "Path" field. Then I put the following code in the script:
(function process(g_request, g_response, g_processor) {
g_processor.redirect('com.glideapp.servicecatalog_cat_item_view.do?v=1&sysparm_id=d38771f4db10c740a47ffb051d961959&sysparm_link_parent=b00565b8dbdc8740a47ffb051d961977&sysparm_catalog=e0d08b13c3330100c8b837659bba8fb4&sysparm_catalog_view=catalog_default');
})(g_request, g_response, g_processor);
It was that "g_processor.redirect(URL)" function that did the trick.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 05:24 AM
You have got to love it when your search on Google results in your own post, with your own solution, and it works. Thank you, past self!