How to Send Email Notification from Fix Script or Scheduled Job (GlideEmailOutbound Not Working)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-20-2025 04:18 AM
Hi Community,
Task - Integrate ServiceNow to Greenhouse -
Use case 1 - Create the user weekly base - Person X should get a mail success or fail
Use case 2 - Update the user weekly base -Person X should get a mail success or fail
I'm working on a ServiceNow automation where I update user data in Greenhouse via API from a Fix Script and a Scheduled Job.
After the script runs, I want to send a summary email notification (e.g., success/failure counts, runtime info). I tried using the following approach:
var email = new GlideEmailOutbound();
email.setSubject("Greenhouse Sync Result");
email.setBody("Sync completed.");
email.setFrom("no-reply@mydomain.com");
email.addRecipient("me@example.com");
email.save();
But the email never sends, and I realized GlideEmailOutbound is not supported for this use case.
So now Instead of this How we can get the solution.
Please assist me in this
Ward Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-20-2025 04:39 AM
Hi @raj12345 ,
1. Create a script include in global scope and use it in your fix script
2. create a notification and fire an event to trigger the notification
3. see if flow suits your requirement and use send email action in the flow
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya