…thoughts on ServiceNow and digital transformation

Post

Find Flows and Subflows that send a notification in Servicenow


So you have a notification that is set to send when triggered but you can’t figure out which flows are triggering it. Here’s a UI action for the Notification table that will help you figure out it.

action.setRedirectURL(current); 
var flows = 'Flows that trigger this notification: <br\>'; 
var flowsGR = new GlideRecord("sys_hub_action_instance"); 
flowsGR.addEncodedQuery('action_type=0d8dd9f10f11101051218e8ebc767e27'); 
flowsGR.query(); 
while(flowsGR.next()){ 
    if(flowsGR.action_inputs.var__m_sys_hub_action_input_0d8dd9f10f11101051218e8ebc767e27.notification == current.getUniqueValue()){ 

        var html = '<a href="$flow-designer.do?sysparm_nostack=true#/flow-designer/' + flowsGR.flow.toString() + '" target="_blank">' + flowsGR.flow.getDisplayValue() + '</a><br/>'; 
        flows += html; 
    } 
} 
gs.addInfoMessage(flows);