I am trying to grab a users name from an email generated from sharepoint. The email is from an unmonitored account so i would like to grab the name of the person from the body of the email and make them the affected users and not the sharepoint email address. I am not familiar with regular expressions so not sure how to use extract text by pattern.
The body of the email looks like this
RRI\jvenuto (Jeff Venuto) is requesting access to:
there is some HTML in there so workflow sees this:
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html"></HEAD><BODY>RRI\JVenuto (Jeff Venuto) is requesting access to:
I would like to either grab the domain name or full name and retrieve the email address from one of those.
Any help is appreciated.
Thanks for the input AngelD. Using your input this is what I did to get it working.
Also This uses the First and Last name of the user to get the email. if anyone knows how to use the loginID to get the email that would be best. In other words use jvenuto instead of Jeff Venuto.
1. Grab body of email variable and pass to HTML to Text Converter component.
2. Pass HTML2Text variable to Index Of Text Within Text component and populating text to find with a "("
3. Passing the index variable name from step 2 to an Add Value component and adding 1 position to remove the "("
4. Passing the results from the Add Value variable to a Extract Text From Text with the begin location from step 2 to convert the variable of step 2 from int32 to string.
5. Passing the Extract Text From Text variable to another Index Of Text Within Text component and setting the text to find to ")"
6. Add another Extract Text From Text component and setting the Begin Location to the variable of the Index Of Text Within Text in step 2 and the length to the Index Of Text Within Text variable in step 5
I have attached a word doc for anyone else that gets stuck that contains screenshots of how how the components are configured and how i passed the first and last name to get the email address.
Hopefully this will help someone else
Thanks for providing your solution to the public!