Need to send notification to knowledge owner if knowledge article is 6 months old
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 08:41 PM
Hi,
I have a requirement to trigger notifications to the knowledge owner if a knowledge article is 6 months old. I am looking for a solution to achieve this. Can you please suggest how I can set up this notification system?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 09:20 PM
HI @girishbabuk99 ,
You can create flow for notification for article table which can run in specified duration of time.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 09:44 PM
Hi @girishbabuk99 ,
Please follow the steps mentioned in this Article :
Note: this article considers the Valid field, you will have to work with Published field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 09:47 PM - edited 05-30-2024 09:48 PM
Hello,
- Create the Script:
- In the script section, you need to write a script that finds knowledge articles that are exactly 6 months old and sends a notification to the knowledge owner.
Here's a sample script to get you started:
(function() {
// Get the date 6 months ago from today
var sixMonthsAgo = new GlideDateTime();
sixMonthsAgo.addMonthsUTC(-6);
// Create a GlideRecord to query knowledge articles
var gr = new GlideRecord('kb_knowledge');
gr.addEncodedQuery('sys_created_onON' + sixMonthsAgo.getDate());
gr.query();
// Iterate through the results
while (gr.next()) {
// Get the knowledge owner's user record
var owner = new GlideRecord('sys_user');
if (owner.get(gr.owner)) {
// Send an email notification to the owner
gs.eventQueue('knowledge.article.six_months_old', gr, owner.sys_id, '');
}
}
})();
2. Create the Email Notification
-
Navigate to Notifications:
- In the application navigator, type "Notifications" and click on "Email Notifications".
-
Create a New Notification:
- Click on the "New" button to create a new email notification.
-
Configure the Notification:
- Name: Give your notification a descriptive name (e.g., "Knowledge Article 6 Months Old").
- Table: Select "Knowledge [kb_knowledge]".
- When to send: Select "Event is fired" and choose the event you specified in the script (e.g.,
knowledge.article.six_months_old
). - Recipients: Add the
Knowledge owner
as the recipient. - Subject: Provide an appropriate subject for the email (e.g., "Your Knowledge Article is 6 Months Old").
- Message: Craft the message body to include relevant information. You can use variables to include dynamic content from the knowledge article.
Regards,
Vaishnavi Lathkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 10:33 PM
Thanks for suggesting the solution, i have tried this and ran the scheduled script but it is not generating the event