- 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-21-2024 08:04 AM
@Community Alums apologies for the delay
I have attached a screenshot of how the description is populated from the inbound email
Text as below
I only want the description to pull the 2 lines in bold (or any lines that fall between them if that makes sense (basically after the "OFFICIAL" and before "Adil Nekiwala"
OFFICIAL
See if incident is created with fields
See if email is then sent out to supplier
Adil Nekiwala | Email: Adil.Nekiwala@xxxxxxxk<mailto:Adil.Nekiwala@xxxxxxxx> | Service Designer | Fxxxxxx, xxxxxxxxx & xxxxxxxxxxxx |
[cid:image001.jpg@01DAAB83.1155C4B0]
Follow us online: www.xxxxxxx.com
This email is intended for the addressee(s) only: All messages sent and received by the xxxxxxxxxxx may be monitored in line with relevant xx xxxxxxxx <https://www.xxx.xxxxxxxxx-privacy-notice/fcdo-as-axxxxxxxxx-privacy-notice>
OFFICIAL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 08:56 AM
@Adil N Will OFFICIAL and Adil Nekiwala be present in all the incident descriptions? I mean, will these be consistent across all incidents? Can we use these two texts as identifiers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 12:50 AM - edited 05-22-2024 12:52 AM
@Community Alums No they are not consistence.
Adil Nekiwala is part of my email signature so that can come from anyone.
Official is a classifier so that also may vary depending on who and where it is sent from
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 01:07 AM
@Adil N ,
We need something which can be used as an identifier to build the logic.
Description:
Classifier(official etc)
Email Body
Sender details (Adil Nekiwala | Email: Adil.Nekiwala@xxxxxxxk<mailto:Adil.Nekiwala@xxxxxxxx> | Service Designer | Fxxxxxx, xxxxxxxxx & xxxxxxxxxxxx |)
Signature([cid:image001.jpg@01DAAB83.1155C4B0])
- Description will always be in above format?
- Do you have any fixed classifiers? (official,unofficial like these)
- Classifier is present in all incident descriptions?
- Send details will always be present in same format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2024 01:15 AM
@Community Alums For this particular module the email will always consist of the details below in the same format
Short Description of Issue:
XXXXXXX XXXXX: Sign In Error
Detailed description of issue:
Full Name: Joe Employee
Username: 4000000
Department: Birmingham
Work Email Address: joe.employee@company.co.uk
Grade: XX
Notes: forgot my password, changed my password and received an message saying policy error is preventing me from signing in.
Log in error code: AUTH-6032
before short description there may or may not be a classifier and after Log in error code they may or may not be signatures etc. Hope this will be useful?