The CreatorCon Call for Content is officially open! Get started here.

How can ServiceNow send reminder emails to end users for survey submission?

nameisnani
Mega Sage

Hi ServiceNow Team,

 

How to send reminder emails to users for survey submission . How to achieve this requirement please provide me steps and snips to fulfill this requirement .  

 

Thanks In advance .

 

 

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @nameisnani ,

Go to your assessment table and filter them like this

SandeepDutta_0-1687231886911.png

 

 

Then create a event on your assessment table

Write a scheduled job which triggers daily and query the assessment table with the above encoded query.

And trigger the event.

Create a notification which listen to this event and select the recipient as assigned_to

 

Steps below

  1. Create a new Event (Event > Registry) on Assessment Instance table
  2. Create a new Email > Notification for the assessment instance table) and associate the above event
  3. Ensure your notification has

    • Send to event Creator true
    • Event parm1 contains recipient as true
  4. Create schedule job which runs daily and checks the records and sends notification to the user

Script:

sendNotification();

function sendNotification(){

try{
var gr = new GlideRecord('asmt_assessment_instance');
gr.addEncodedQuery('stateINready,wip^userISNOTEMPTY');
gr.query();
while (gr.next()) {
	gs.eventQueue('event_name', gr, gr.user, '');
}
}
catch(ex){
gs.info(ex);
}

}

SandeepDutta_1-1687231908688.png

 

SandeepDutta_2-1687231908709.png

 

 

View solution in original post

2 REPLIES 2

Community Alums
Not applicable

Hi @nameisnani ,

Go to your assessment table and filter them like this

SandeepDutta_0-1687231886911.png

 

 

Then create a event on your assessment table

Write a scheduled job which triggers daily and query the assessment table with the above encoded query.

And trigger the event.

Create a notification which listen to this event and select the recipient as assigned_to

 

Steps below

  1. Create a new Event (Event > Registry) on Assessment Instance table
  2. Create a new Email > Notification for the assessment instance table) and associate the above event
  3. Ensure your notification has

    • Send to event Creator true
    • Event parm1 contains recipient as true
  4. Create schedule job which runs daily and checks the records and sends notification to the user

Script:

sendNotification();

function sendNotification(){

try{
var gr = new GlideRecord('asmt_assessment_instance');
gr.addEncodedQuery('stateINready,wip^userISNOTEMPTY');
gr.query();
while (gr.next()) {
	gs.eventQueue('event_name', gr, gr.user, '');
}
}
catch(ex){
gs.info(ex);
}

}

SandeepDutta_1-1687231908688.png

 

SandeepDutta_2-1687231908709.png

 

 

Hi @Community Alums 

 

Thanks for your quick response let me try your steps .