- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 05:01 AM
Hi All,
I have created a flow which should be doing the following
When a new record is created and assigned to assignment group "A" OR an existing incident is assigned to assignment group "A" an email should be sent to assignment group "A"
I would expect to see the e-mail once sent to be viable in the activity log (as you can see in screenshot for incident creation to end user)
Any assistance on what is incorrect here?
Would it be better to have 2 flows one for new incidents (would this be new as in just created or first time assigned to RG) and one for updates?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:19 AM
Even with the code "Send email" action is throwing an error. Instead use "Send Notification" action.
- Create a notification
-Add your user email id & click add email address
-Add ${mail_script:email_script_name} in body & save the record
- Create "Email Script" & add the below code
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var desc = current.description;
var start = desc.indexOf("Short Description of Issue:");
var end = desc.indexOf("AUTH-4063");
var extractedText = desc.substring(start, end).trim();;
template.print(extractedText);
})(current, template, email, email_action, event);
- Add notification in flow
Result:
If my answer helped you in any way, please mark it as helpful or correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 07:54 AM
@Community Alums this is how the incident record is produced, just need to extract everything between "Short Description" & "AUTH-4063"
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 08:10 AM
Check the below. Is this the text to be extracted?
Short Description of Issue:
EXTERNAL LEARN: Sign In Error
Detailed description of issue:
Full Name: Joe Employee
Username: 400000
Department: Birmingham
Work Email Address: joe.employee@company.co.uk<mailto:joe.employee@company.co.uk>
Grade: TH
Notes: forgot my password, changed my password and received an message saying policy error is preventing me from signing in.
Log in error code:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:30 AM
@Community Alums thats exactly it!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 06:19 AM
Even with the code "Send email" action is throwing an error. Instead use "Send Notification" action.
- Create a notification
-Add your user email id & click add email address
-Add ${mail_script:email_script_name} in body & save the record
- Create "Email Script" & add the below code
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var desc = current.description;
var start = desc.indexOf("Short Description of Issue:");
var end = desc.indexOf("AUTH-4063");
var extractedText = desc.substring(start, end).trim();;
template.print(extractedText);
})(current, template, email, email_action, event);
- Add notification in flow
Result:
If my answer helped you in any way, please mark it as helpful or correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 06:25 AM
If your supplier is off tool (no user record in SN) then in notification-under who will receive section you can add your supplier email in "enter email address".
I am unable to identify root cause of the issue from the image. I suggest instead of trying to identify the issue, it's better if you create notification & use send notification action in flow.