Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

schedule job - servicenow

Venkumahant
Tera Contributor

hi Everyone,

i have a schedule job which triggers mail notification when the outbound queue reaches its limit . But this notification alert should be sent to teams , is that possible ? please help me 

 

schedule job script , FYI :-

(function executeRule() {
    var threshold = 20;  
    var gr = new GlideRecord('ecc_queue');
    gr.addEncodedQuery("agent=ESM Integration^state!=processed");
    gr.query();

    var count = gr.getRowCount();

    if (count > threshold) {
       
        gs.eventQueue('ecc_queue.threshold.exceeded-pavan', null, count);
        gs.info("ECC Queue Alert: Outbound Queue Threshold Exceeded. Current count: " + count);
    }
})();
6 REPLIES 6

Ankur Bawiskar
Tera Patron

@Venkumahant 

you will have to integrate between MS Teams and ServiceNow

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader