I have successfully set up a flow with HTML to text but I am unable to pull the first name from a line in an email.
Second array reads "Please see the PCA details below for Jane Doe."
replace(trim(split(body('Filter_array')[1], ' ')[5]), '.', '')
The above expression pulls the last name from the array.
Trim(split(body('Filter_array')[1], ' ')[7])
The above expression does not pull Jane from the array though. "cannot be evaluated because array index '7' is outside bounds (0, 6) of array. "
Any help is appreciated.
<<Post deleted, then modified again.>>
After following the steps in the thread, I'm still not getting the values separated from the titles.
For reference, here's my output of the html to text (some info changed to protect the innocent:)
"From: 3Test Grant <email>
--
This email was sent from a contact form on my org name
(https://abc.com)
Application Type: Hosting Grant
Payee Name: 3Test Grant
Address: an address
Tel No: a number
Email: it@ovca.com
---Hosting Grant Information ---
Hosting Requesting Club: ggrrggr
Hosting Grant Type: Development Clinic
Clinic Type: ALTC
Clinic Start Date: 2023-05-23
No. of Attendees: 6 to 10
Hosting Event Name:
Hosting Event Start Date:
Hosting Amt Requested:
This is what I get after the Filter Array:
After testing these with a few hire hires, I ran into an issue. Some new hire emails come through with the middle name included in the Name field.
The expression
trim(slice(body('Parse_JSON')?['Name'], indexOf(body('Parse_JSON')?['Name'], ' ')))
Doesn't seem to separate just the last name from this field.
Best regards,
This has been very informational. Thank you so much for all of the assistance!
Last question that I have, do you recommend any courses or training materials to expand my knowledge on these types or workflows? I will be trying to incorporate these types of flows into our termination process at my company as well very soon.
Best regards,
Extracting the Supervisor First Name and Last Name would be the same expressions used for the other First Name and Last Name but using the Supervisor property instead of the Name property.
That was it! It appears that the flow is now working and I am able to pull the dynamic content needed.
This will be extremely useful in my day to day operations.
Do you have any suggestions for separating the supervisors First and Last name?
Getting there. Can you check your condition in your Filter query? It should be is not equal to.
Hello. Yes, this is the email that I used in and how our new hire personal change authorization emails are received. My select was not set to Text mode. After doing so, I am still not getting the proper out put it appears.
And in your Select, did you set Map to Text mode?
I copy/pasted the email sample you gave me. Is that what you used?
See the email I sent that was the trigger for the flow.