Parse Email subject via flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2024 10:26 AM
Is there a way i can use flow designer to parse the email subject?
I have a inbound email triggering a flow based on sender and subject. This flow should submit a catalog item with different values from the subject into different variables. the body of the email does not show the values as its in a image and the only way i cant think of is via the subject.
Currently the subject contains this: Approved: Termination for John Smith, 123456 (2026-07-05)
I have three variables on a catalog item that are the below
User Being Termed: (I would like it to show john smith)
Employee Number: (should be the 123456 above)
Term Date: (Should be date in () (2026-07-05)
is this possible to do via flow designer? if so any pointers in how to would be helpful.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2025 11:10 AM
- Use the Data Pill for the email subject, which is available in the Email object provided by the trigger.
- Add a "Script" Action to process the subject.
// Example: Extract a specific pattern (e.g., numbers) from the subject
var emailSubject = email.subject; // Get the email subject
var match = emailSubject.match(/\d+/); // Extract first numeric sequence
if (match) {
outputs.parsedValue = match[0]; // Output the extracted value
} else {
outputs.parsedValue = "No match found";
}
Add an output variable, e.g., parsedValue, to use the extracted data later in the flow.