Workflow Soluiton

 View Only
  • 1.  Parsing text from an email

    Posted Jan 18, 2011 06:29 PM

    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.

  • 2.  RE: Parsing text from an email

    Posted Jan 19, 2011 03:41 AM
    Try these components Html to text converter Index of text within text Extract text from text

  • 3.  RE: Parsing text from an email
    Best Answer

    Posted Jan 19, 2011 04:05 PM
      |   view attached

    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


    How To.docx   364 KB 1 version

  • 4.  RE: Parsing text from an email

    Posted Jan 19, 2011 07:15 PM

    Thanks for providing your solution to the public!