Knowledge articles created using template cannot trigger custom flows from kb_knowledge table

symonflores_23
Tera Guru

Context: Knowledge Articles Created with Templates cannot trigger custom flow that triggers on records created in kb_knowledge table. When articles are created using templates other than the standard one, they are stored in different tables. As a result, if you use a custom flow in Flow Designer that triggers on records created in the kb_knowledge table, it won't work for articles created through these templates. 

 

Question: How can you still trigger the flow without creating separate flows for each table, especially since we have many templates?

 

This won't work for me.

Reference: support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0823204

1 ACCEPTED SOLUTION

symonflores_23
Tera Guru

Found the fix:

This is only for flow designer. Change your flow to 'Run on current and extended tables'

image.png

View solution in original post

3 REPLIES 3

Mark Manders
Mega Patron

Why doesn't the support article work for you? It triggers the flow from the child table. 

You could of course duplicate the flow, but triggering it through a BR sounds like the best option, just not clear why the solution doesn't work, since your question is almost literally what the support article says.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Hi, I'm using Flow from flow designer and not the legacy workflows. So the table is in sys_hub_flow.


Business Rule Table: kb_knowledge

Advance Script:

(function executeRule(current, previous /*null when async*/) {
    var flowAPI = new sn_fd.FlowAPI();
    flowAPI.startFlow('automation_flow', current);

})(current, previous);

This does not trigger the business rule. I have the same condition for my flow and business rule. That's when kb article record from kb_knowledge table went 'published' or 'retired'

symonflores_23
Tera Guru

Found the fix:

This is only for flow designer. Change your flow to 'Run on current and extended tables'

image.png