- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 06:59 AM
Hello,
We are trying to get Kb article authors to update publication every 90 days.
We did not see anything OOB that would allows to do send notification 90 days after Kb article is 'published', but we found Scheduled Script Execution: Notification for Article Expiry Warning.
Is it possible to modify the script below to lookup the 'published date' instead of 'expired date'? I am new to this, i will greatly appreciate any help. thanks.
Condition:
answer = false;
if (gs.getProperty("glide.knowman.enable_article_expiry_notification", "false")==="true") {
var gr = new GlideRecord('kb_knowledge');
gr.addEncodedQuery('workflow_stateINpublished^valid_toONNext month@javascript:gs.beginningOfNextMonth()@javascript:gs.endOfNextMonth()');
gr.query();
answer = gr.next();
}
Run this script:
new KBKnowledge().notifyForExpiringArticles();
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 07:31 AM
Hi,
like this
Remember to Save and Activate the Flow
Final Flow
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2021 12:51 PM
Is it possible to modify this flow so that notification is sent
If
Workflow = Published
Updated < Published [Updated date is less than or equal to Published date]
Updated < Current date
- Sending an email might not be enough to confirm the author has received their article.
I am not quite certain if this is the best practice: we were going to require the authors to checkout the articles for review, because that way new updated date will be generated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2021 05:41 AM
Please test it once.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2021 03:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2021 12:34 AM
So did you run the flow and check what happens?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 06:44 PM
Hi
In the body of the email KB number is included - Do you know how I can turn from text into a hyperlinked number?
I created Action below, and it is working fine for other modules. However, i could not get to work for kb_knowledge. You have any suggestion what i could do to modify it?
Script from Actions
(function execute(inputs, outputs) {
var gr = new GlideRecord('sysapproval_approver');
gr.get(inputs.approval);
var instance_name = gs.getProperty('instance_name')
outputs.url1 = '<a href = "https://' + instance_name + '.service-now.com/sp?id=approval&table=sysapproval_approver&sys_id=' + gr.sys_id + '">' + gr.sysapproval.number + '</a>';
})(inputs, outputs);