How to add knowledge article link in RITM notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2023 10:28 PM
Hi Team,
We have one RITM notification and we are sending to requested for.
We have one knowledge article "KB0025410" and we want include that link in our notification.
How can we add link on that knowledge article in our notification,
Please help me here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2023 10:56 PM
Hi @lucky24 ,
Hope you are doing well
In the notification just add below html
<a href = "/sp?id=kb_article&sys_id=sys_id" target = "_blank">KB0025410</a>
replace sys_id with the sys_id of the KB record
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2023 11:18 PM
Hi Harshal,
can I use above solution in flow designer? I am triggering notification from flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2023 11:56 PM
HI @lucky24 ,
I trust you are doing great.
- Retrieve the URL of the knowledge article "KB0025410" in ServiceNow.
- Craft the notification message that includes the link to the knowledge article.
Here's an example of how you can achieve this in ServiceNow using GlideRecord queries and HTML formatting:
// Step 1: Retrieve the URL of the knowledge article
var kbArticleSysId = 'KB0025410'; // Replace with the actual sys_id of the knowledge article
// Query the knowledge_base table to retrieve the URL
var kbArticleGR = new GlideRecord('knowledge_base');
if (kbArticleGR.get('sys_id', kbArticleSysId)) {
var kbArticleURL = kbArticleGR.getValue('url');
}
// Step 2: Craft the notification message with the knowledge article link
var notification = 'Dear [Requested For],\n\n';
notification += 'We have received your request. For more information, please refer to the knowledge article: ';
notification += '<a href="' + kbArticleURL + '">' + kbArticleSysId + '</a>.';
notification += '\n\nBest regards,\n[Your Company Name]';
// Send the notification using the appropriate method (e.g., email, SMS, etc.)
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi