Sorry if this has already been posted...
This is my conundrum.
We get emails to managers with the particulars of an event (PTO/Vacation/Sick) and I am looking for a way to extract the information in Flow.
This is the body of the Email message in flow. I can isolate parts of it, but unsure about others.
Time Off Request(s) Approved by sysadmin <-- This is the key that I have if an email comes in with this in the Body
Employee: John Smith <-- I need a script that will isolate name, given that name will be various lengths.
Time-Off Type: Paid Time Off
09-24-2018 at 08:00:00
Everything else I can Pretty much do but its the Employee name that is holding me up.
I can find 'Employee: ' in the message body but I can not find a way to account for something that goes until end of line. I can not isolate the name through the AAD as its going to the manager, not to the employee themselves.
I know someone has done this before as I cant be the only one.
Many thanks in advance.
Could you share a screenshot of your current Flow configuration?
What you mean is that you want to get the name of the Employee in the body of the email, here is the String after "Employee:".
Have you tried using Html to text to convert the body of a message into text?
Could you provide the format of your email body?
I wonder if the format is similar to the following, maybe you could refer to the link below, use the function provided by Expression to extract the string you want from email body text.
Please take a try.
This is what I have done so far and made some good progress on it.
1. Convert to Text based on the condition flow
2. Get the EmployeeName start Index
3. Get the EmployeeName end index based upon the next line in the email which should be 'hours:'. When it finds that string that is the end of the employee name
4. Now I get the employeename based upon the start and end indexes above