
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 11:42 AM
Hey SN Comm Team,
We are noticing that it seems the notification is not being sent to the author, when it is not the original author.
We have the notification KM: Article Expiry Warning using the event kb.article.expiry.warning.
We have the scheduled job Notification for Article Expiry Warning running monthly on the first day, with the correct encoded query. Run this script is using new KBKnowledge().notifyForExpiringArticles();
The notification is using the mail script km_article_expiry_warning (here is the script):
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
if(event.parm1 && event.parm2){
var recepient = event.parm1;
var inputParams = JSON.parse(event.parm2);
var date = new GlideDate();
date.addMonths(1);
var monthName = date.getByFormat("MMMM");
var articleIDs = inputParams.articleList;
if(articleIDs){
var emailContent = new KBKnowledge().getArticleExpiryContent(recepient,inputParams);
template.print(emailContent.templateContent);
email.setSubject("Knowledge articles expiring in "+monthName);
}
}
})(current, template, email, email_action, event);
We have some HR Reps stating that they are not getting the email notification they should be getting when they are an author of an article that should have been triggered through the entire process shown above.
I have tested as myself being the author, execute the scheduled job and one of my articles (that I changed the valid to date) is getting hit perfectly. I changed myself as the author to someone else. Executed the scheduled job again and they did not get the email. I adjusted the notification within the Who will receive tab a few times to add the Author, parent author, parm 1 (already checked OOTB), and added Parm 2. Send to event creator is also checked. They still did not get the email through many tests. I then changed it back to myself as the author, and I did get the notification.
Seems as though the system is ignoring when the author is changed (not the original). Is this normal, as expected? Or, can someone help me figure out why the NEW author would be ignored?
Cheers,
-Rob
Solved! Go to Solution.
- Labels:
-
Case and Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 06:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 07:03 PM
I do this a little differently and have never had an issue. Rather than running a notification script, I have a report setup that ultimately does the exact same thing. Show all knowledge articles that will expire within x amount of time.
Then I've just got a scheduled job that runs regularly and sends the report to those I've added to the recipient list.
Doesn't specifically answer why what you've done isn't working sorry, but might give you another option to get the result.
Hope this helps

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2022 05:54 AM
Thanks for your reply - I have also done that exact process as you in my previous company. Currently, this process I am looking for help with is mostly OOTB. The scheduled job is the only thing custom, which calls the OOTB process.
There seems to be a disconnect however, when the author changes to someone else. As stated above, when the author is changed back to the original, the process works as expected.
Something here must be working incorrectly and/ or broken. I would like to have that issue figured out to keep the current process.
Thank you again for your suggestion as I have done that before. But we are looking to keep our current. Just need to see what is causing this problem when author is not original.
Thanks,
-Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2023 12:18 AM
Hi @Moedeb , we also have a similar requirement. Can you please share more details and script that you have written to trigger the notification for the articles that would expire in x days. We want to send the notification before 30 and 60 days of expiry.
Regards,
Chandan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 06:17 AM
Closing this post to open a new one with new information.
-Rob