San Francisco Bay Area Endpoint Management User Group

 View Only
  • 1.  Need Help troubleshooting a Parse email workflow

    Posted Nov 30, 2011 01:12 AM
      |   view attached

    Need help troubleshooting a Parse email workflow

    I went off the steps in https://www-secure.symantec.com/connect/forums/parsing-text-email

    however I keep getting errors that get value is null. Which means that it is not parsing the body of the email correctly. I am trying to grab the email address.

    I am using "Email:" as my beginning text identifer and then .com as my ending. With get text between. I think it is picking up the garbage between the two and need to find a way to only pick up the real email id

    The email body looks like the following

    Title : Database issue

    Details:
    Can't use the checkbox to approve timesheet under Manager tab...have to open each on individually to approve



    Created By:Domain\FLast

    Name: First Last
    Office: SJC
    Email: FLast@test.com

    As Text it looks like

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><strong>Title : first Last needs help setting up his new computer - </strong><br><br>
    <strong>Details:</strong><div>Needs access to on line training.</div><br>
    <div>&nbsp;</div><br><br>
    <br>
    <strong>Created By:</strong>Domain\FLast<br><br>
    <b>Name:</b> First Last<br>
    <b>Office:</b> SJC<br>
    <b>Email:</b> FLast@test.com<br>
    <br>
    <br>
    Thanks<br>
    IT HelpDesk

     

    I get the following error message

    Application Name : SD.Email.Monitor
    Process ID : 1960
    Date :11/29/2011 9:45:03 PM
    Log Level :Error
    Log Category :LogicBase.Components.Default.Logging.CreateLogEntryComponent

    Message :
    Process Name: Email Monitoring  Model: Process Message Embedded Model  Component Name: Add Values  Component Class Name: LogicBase.Components.Default.Process.AddValues  Component ID: db8e68cf-ed90-4ab4-bbb4-46ec587b4c1d  Exception Class Name: System.Exception  Message: Value is null  Stack Trace: System.Exception: Value is null at LogicBase.Components.Default.Process.AddValues.Run(IData data) in c:\build\projects\WF71MR2\components\LogicBase.Components.Default\Process\Math.cs:line 301 at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context) at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)

    Attachment(s)

    docx
    How To parse email.docx   277 KB 1 version


  • 2.  RE: Need Help troubleshooting a Parse email workflow

    Posted Dec 02, 2011 12:02 AM

    anybody? need to get this one knocked out



  • 3.  RE: Need Help troubleshooting a Parse email workflow

    Posted Dec 02, 2011 08:11 AM

    Have you tried running your text through a "HTML To Text Converter" component to sanitize the HTML tags out?



  • 4.  RE: Need Help troubleshooting a Parse email workflow

    Posted Dec 06, 2011 12:12 PM

    yep its in the document - I will walk through this later today. I think after it is converted to text that I am grabing the wrong spot. Thats what I need help with 



  • 5.  RE: Need Help troubleshooting a Parse email workflow

    Posted Dec 14, 2011 12:08 PM
      |   view attached

    Just remove the .ZIP, it a Workflow Package,

     

    Basicaly, HTML to text on the mail body.

    Find the Email: line and extract everything after that, assign to var EmailLine

    Strip value Email: from EmailLine

    Find the .COM position in the EmailLine var.

    Extract from the begining to the .COM position plus 4

    Trim the EmailLine var to remove any spaces.

     

    Rob

     

     

     

    Attachment(s)

    ZIP
    Extract Text.package.ZIP   1.04 MB 1 version


  • 6.  RE: Need Help troubleshooting a Parse email workflow

    Posted Jan 05, 2012 02:12 AM

    just looked at this as I finally had some time - you add a few more things to what I did. I will try it out and see if it works. 

     

    I have been trying using xml tags also 

    html to text convertor

    extract text by pattern-- start pattern <email> , Use Patter for End checked, End Pattern </email>

    create log entry 

    search user by email address

     

    I am getting a null value after extract text by pattern. I can extract the email to note book and do a find on <email> and it is found. 

    however, the extract text by patter is not working in real life. it works in a static test. 

     

     



  • 7.  RE: Need Help troubleshooting a Parse email workflow

    Posted Jan 05, 2012 02:50 AM

    ok tried out your method - when it passes the email address over to the get user function it does not match up. 

    possiblly stripping more out than it is supposed to. cant test it as it is throwing a error and saying it will not match 

    getting tired and will plug at it tomorrow



  • 8.  RE: Need Help troubleshooting a Parse email workflow

    Posted Jan 05, 2012 08:27 AM

    You have some mistakes in your project or just only in your DOCX document.
    Screenshot on page 4: the output variable name ("postion") of the Add Values Component does not match the begin location variable ("position") of the Extract Text component from screenshot on page 5 (on page 7 again is a "postion").

    Screenshot on page 8: wrong way of extracting the text. You cannot use as a beginning position the value of "postion" variable because it was calculated relatively to "EmailBodyText" string not to "text" string. Also a "postion3" cannot be used as a "length" because it was calculated as position inside the "EmailBodyText" string too.

    EmailBodyText = "BlaBla Email: user@server.com blabla" (there is a space after ":")
    1) Index Of Text "Email:": EmailMessage.EmailId = 8
    2) Add Values: postion = 14
    3) Extract Text: text = " user@server.com blabla" (space remains at the beginning)
    4) Index Of Text ".com": postion2 = 26  (relatively to EmailBodyText)
    5) Add Values: postion3 = 31         (it points at "blabla" - without the leading space)
    6) Extract Text: !!! cuts the postion3=31 characters from string starting at postion=14 from text=" user@server.com blabla" (14th character points to "c" and the whole string is only 24 characters length) !!!
     

    Rob's method is OK, but you must be sure you have only single phrases "Email:" and ".com" inside e-mail body.