- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 11:48 PM
Can anyone help ome on this
(1) Create auto email notification
• We would like to create an automated email notification which to be send to the requester (once a new SNOW ticket/requests is created).
• The automated email must be send only for tickets which have been created between 17:00 and 08:00 GMT time. Each email must be send 5 minutes after the ticket has been created in SNOW.
• The following text message should be send to the requester:
Hi *Requestor's name*,
Your request *RITM number* has been received and is under security review. You will be notified in case of questions or when your request has been approved or rejected.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 12:58 AM - edited 05-21-2024 05:29 PM
Hello @PRADEEPREDDY GU ,
You can just create a single Notification record, and open it to advanced view and follow this.
1)First Make sure the table is Requested Item since you mention "RITM Number"
2) *Make sure your view is "Advanced" to see the Script condition or "Advanced Condition". And paste this script :
var gmt = new GlideDateTime(); //Local Current date and time
if (gmt >= 17 || gmt <8) {
//Wait for 5 minutes
var seconds = parseInt(10, 10) * 30000;
var start = parseInt(new Date().getTime()) + seconds;
while(start>parseInt(new Date().getTime())) { // do nothing
}
answer = true; // Send notification
}
answer= false; // Do not send notification
Refer to this pic:
3) Under the "Who will receive" Section, in "User/Groups in fields", Select "Requested for".
4) Under the "What it will contain" Section, paste this in your html "Message HTML" field :
Hi ${requested_for.name},
Your request ${number} has been received and is under security review. You will be notified in case of questions or when your request has been approved or rejected.
Please mark as solution and helpful. In order to help others with the same requirement as you. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:17 AM
Hello,
1) This is when you trigger your email notification, in this case after you have requested or there is a (RITM) record inserted relative to the items you added in the conditions. You may check if the email has been created by navigating here:
You will see a list of email logs that has been created here. But remember you have a condition where it will send only after "5 minutes" right? So don't expect that it will show up here after you have Triggered it. (Wait for 5 minutes upon trigger then check again)
[I Forgot: You might want to put a Subject on the "What to send" tab, so that you can easily identify your email logs]
1.1) If you have seen the right email that has been triggered, open the record, and in the form you can check, scroll down then click "Preview email".
2) NO, you're using the AND logic for your conditions. You must use the "OR" so that it will trigger either of the items you provided. Like this:
If this helps again please mark as helpful or solutions. Thanks!
Regards,
Zack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 12:01 AM
Hello @PRADEEPREDDY GU
This can be done with Flow Designer with Wait Relative Duration.
Please mark this answer as helpful and correct if helped.
Kind Regards,
Ravi Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 12:58 AM - edited 05-21-2024 05:29 PM
Hello @PRADEEPREDDY GU ,
You can just create a single Notification record, and open it to advanced view and follow this.
1)First Make sure the table is Requested Item since you mention "RITM Number"
2) *Make sure your view is "Advanced" to see the Script condition or "Advanced Condition". And paste this script :
var gmt = new GlideDateTime(); //Local Current date and time
if (gmt >= 17 || gmt <8) {
//Wait for 5 minutes
var seconds = parseInt(10, 10) * 30000;
var start = parseInt(new Date().getTime()) + seconds;
while(start>parseInt(new Date().getTime())) { // do nothing
}
answer = true; // Send notification
}
answer= false; // Do not send notification
Refer to this pic:
3) Under the "Who will receive" Section, in "User/Groups in fields", Select "Requested for".
4) Under the "What it will contain" Section, paste this in your html "Message HTML" field :
Hi ${requested_for.name},
Your request ${number} has been received and is under security review. You will be notified in case of questions or when your request has been approved or rejected.
Please mark as solution and helpful. In order to help others with the same requirement as you. Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 04:01 AM
Hi ZACK,
PFA...
1.How to know (testing)if it's working or not.
2.I mentioned conditions(once that catalog item )created is this correct or not.
tq's in advacne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:17 AM
Hello,
1) This is when you trigger your email notification, in this case after you have requested or there is a (RITM) record inserted relative to the items you added in the conditions. You may check if the email has been created by navigating here:
You will see a list of email logs that has been created here. But remember you have a condition where it will send only after "5 minutes" right? So don't expect that it will show up here after you have Triggered it. (Wait for 5 minutes upon trigger then check again)
[I Forgot: You might want to put a Subject on the "What to send" tab, so that you can easily identify your email logs]
1.1) If you have seen the right email that has been triggered, open the record, and in the form you can check, scroll down then click "Preview email".
2) NO, you're using the AND logic for your conditions. You must use the "OR" so that it will trigger either of the items you provided. Like this:
If this helps again please mark as helpful or solutions. Thanks!
Regards,
Zack