Ability to search Knowledge Base articles for embedded 'broken links'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 01:43 PM
Is there a script that can be applied that will search through published knowledge base articles to find "broken URLs/ links" ... vs. having to manually review/ test each link within each article? or vs. waiting for someone to report a broken link?
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 03:52 PM
Not that I am aware of, but not sure if anyone has some kind of a hack." There's this idea on the idea portal: https://community.servicenow.com/community?id=view_idea&sysparm_idea_id=7a2ec28fdb079c106621d9d96896194f&sysparm_idea_table=x_snc_com_ideation_idea&sysparm_module_id=enhancement_requests
Last I heard (end of April) it was in consideration for the Utah release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 09:14 PM
I have had some discussions around this topic with some of our areas, but none were really wanting to pursue it. The areas were concerned that it's not just whether the link is valid, but whether the information on the link is valid. This meant to them that they still had to manually review all the links.
That said, what I had proposed to do is rather straight forward. I would write a script that would pull out all the HTML links (using the <a href> tags). I would then call a third party service that deals with notifying us of 404s being returned (these do exist for SEO purposes as dead links hurt their rating). If an article contained a dead link, I would trigger a task to the owner to re-evaluate.
I had done a proof of concept on something similar using email addresses. It was much easier because I could reference our sys_user table and see if the user was active. That worked well, but there was concern again it wasn't a 100% good solution as it missed departmental transfers. Sometimes people want an all or nothing solution, not my preference but I will not implement something that is going to be ignored.
Not all is lost if you cannot find a third party service. You could likely do this with REST and a GET command. A third party service might have some additional value adds, but for the basics I think a simple REST message with a GET command would return the appropriate status.
Hopefully you have a developer on staff to help with this (if you're not one yourself). I don't think this is an overly complicated task, and with the ideas above a proof of concept could be done in short order. What will take some time is developing your workflow for what to do with a dead link (example: you have a workflow that checks every 60 minutes and after 4 hours declares the link dead, and initiates a task to remediate).