Send email once record producer is submitted?

Community Alums
Not applicable

Hi All,

I have created a record producer to allow users to submit a change request.

What I am wondering is how can I send an email to a specific group once the record producer has been submitted?  Along with the change details.

Can this simply be done in the 'Generated record date' script by using an event and link it to a notification?

Any guidance/assistance would be much appreciated.

Thanks!
Alex

16 REPLIES 16

ccajohnson
Kilo Sage

You can always create a notification that is either triggered when the record is first inserted, or if you want to use the event path, triggered from an event.

When I use events, I typically check to see if there is an event that exists and is not being used by notifications. If I cannot find one I create one. When creating an event, be sure to have the event configured on the table you want the notification to be triggered from. You can use a naming syntax of: table_name.purpose

Let us know if you need further assistance, or if this is an acceptable solution.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can simply create normal notification on that table Inserted - True

But ensure this one sends only when record is created from record producer

To check this you can use advanced notification script condition; use the advanced view

Check if the record was submitted because of some record producer; this ensures this notification sends email only when record got submitted from record producer

sc_item_produced_record table holds if record was created from record producer

var gr = new GlideRecord("sc_item_produced_record");
gr.addQuery("task", current.sys_id);
gr.setLimit(1);
gr.query();
answer = gr.hasNext();

find_real_file.png

Regards
Ankur

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

Community Alums
Not applicable

Hi Ankur,

Thanks for your response!

This is what I have but unfortunately no email is triggered - 

find_real_file.png

find_real_file.png

Does the notification need to be on a different table or should that not matter?  Or do I need a condition?

Anything you can see I'm doing wrong?

Thanks again,
Alex

Hi,

notification should be on change_request i.e. record producer target table

How is the recipient set? if recipient set is not correct email won't trigger

1) user should be active, not locked out and has valid email address

2) user has notification preference enabled

Regards
Ankur

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