- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 11:01 AM - edited 01-06-2025 12:24 PM
Hi All,
We're looking for a solution using a business rule (or flow?) to identify and parse an email address in a body of text in the Description field of a new case, and then copy that email address to the 'Requested For' field. Has anyone set-up anything similar?
I started on the following business rule that could be an option, but I'm open to any suggestions that others may have. Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 06:36 PM
Hi @JW22
If I understood your requirement clearly, you want to set the Requested For user as per the email ID of the employee received in the email body. I think you can go ahead with a flow with trigger type as Inbound Email with specific filter conditions as per requirement. Inside the flow, you can make use of a flow variable to parse the email body and get the email ID. With the email ID, you can make use of Lookup Record Action to get the user record and use it to set the requested for field while creating the case.
var emailBody = fd_data.trigger.inbound_email.body;
var employeeEmail = emailBody.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
return employeeEmail[0];
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 11:09 AM
Curious to hear how the record is being created. Is this a record producer/catalog item? Also curious to hear the business case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:08 PM
Thanks for the reply, the case record is currently being created through an inbound email action from a generic mailbox. Within this email body (being written to the Description field), we want to isolate an employee's email address, and then copy it to the 'Requested For' field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:14 PM
You should be able to access the sender's email directly without having to write it to description. Try using email.origemail to grab this. Here's a doc from ServiceNow with more info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2025 12:23 PM
Unfortunately the sender and the employee identified in the email body are different.