Email notification not triggered

abirakundu23
Mega Sage

Hi All / @Ankur Bawiskar / @Anil Lande ,

As per requirement have to send a mail simultaneously when inbound email action is triggered. Inbound email action triggered but event-based notification is not triggered.

//Inbound Email action on table "sys_email".

var h_profile = new GlideRecord('sn_hr_core_profile');
    h_profile.addQuery('personal_email', email.origemail);
    h_profile.query();
    if (h_profile.next()) {
       
        if(h_profile.u_contractual_country == "IN"){
            gs.info("Inside true condition");
            gs.eventQueue('event name', current, email.origemail, '' );
        }
    }

Notification:

akundu23_0-1703571172760.pngakundu23_1-1703571218300.png

 

This event-based notification is not triggered. We received log about "Inside true condition".
Could you please guide me ? 

 

2 ACCEPTED SOLUTIONS

var ga = new GlideRecord('sn_hr_core_case');
if(ga.get('<sys_id of your case record>'))//pass sys_id of your case
{
gs.eventQueue('sn_hr_core.cmt.case.respond', ga, 'xyz.com','xyz.com');
}

 

Also, please make sure that the email you are passing in param1 and 2 should be a valid email.

View solution in original post

@abirakundu23 

//var h_profile = new GlideRecord('sn_hr_core_profile');
    //h_profile.addQuery('personal_email', email.origemail);
    //h_profile.query();
    //if (h_profile.next()) {
       
        //if(h_profile.u_contractual_country == "IN"){
            //gs.info("Inside true condition");
            gs.eventQueue('event name', current, '<put valid email id here>','<put valid email id here>' );
        //}
    //}

 

Replace your inbound script with the above script and replace <put valid email id here> with a valid email id and check if it triggers the notification.

View solution in original post

28 REPLIES 28

Hi @abirakundu23 there is an issue with the event trigger ,Can you please reply with the script you are using for triggering event

abirakundu23
Mega Sage

Hi @Eswar Chappa ,

Now I have tested again, event is fried, we passed the param 1, this also take correctly in Event log. However, notification not triggered. Please refer the above screenshots regarding notification. 

abirakundu23
Mega Sage

Hi @Anil Lande ,

Problem is here, received event log that event executed properly. But notification is not triggered. Could you please guide?

Sandeep Rajput
Tera Patron
Tera Patron

@abirakundu23 Please verify the following.

1. Check if the notification is Active (Active field on the notification is checked)

2. Check if the event.param1 has the email address in correct format

3. Check if the email settings are correct

4. Check outbox and see if there any pending emails

 

If the issue isn't solved even after verifying the above, try triggering the event from a background script and check if the email gets triggered.

abirakundu23
Mega Sage

hi @Sandeep Rajput,

Event is triggered & Param1, Param2 all are correct in event log, but notification not triggered.

All 3 have matched. could you please tell me about point 4 what needs to check?