Email Parsers

Email Parsing allows you to scan the contents of an email, or text-based attachments of the email and look for, and extract text according to "parsing" rules that you configure.  Extracted text can then be used to update different parts of the job (details, priority, job type etc), update a job, run scripts, or even create a new client.  You can create multiple parsers per Email Manager profile.  A parser is simply a set of text processing rules that you define to extract text from a bigger block of text.  Once a parser runs, any extracted text can be transferred into a HelpMaster job, or stored in a variable for additional parser processing.

Example parser

Suppose you get an email that includes an SQL Server version string that looks like this:

Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )

 

As part of the email processing, you want to extract the following 3 things from it:

  1. The SQL Server version (Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) )
  2. The Windows version (Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) )
  3. The build number (Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64) Apr 2 2010 15:48:46 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: ) )

To do this, you would create 3 parsers - each one targeting a specific area of the original text. 

Use

  1. From the Email Manage profile's Email Parsing step, click Add to create a new parser item and then from the the Content Source tab, where you wish to extract the text from. In this example it's the Email Body,

Content Source : The parser will scan whatever you select here.  Refers to one of the following source fields:

  1. On the "Email Parser Item" tab, define the parser details (see below for an explanation of each setting),

 

Parser Name : A unique name that identifies this parser

Description : A short description of what the parser does

Destination : When the parser successfully extracts text from the source, the destination will store the extracted text.

 

Find Start :  Define how to find the start of the text you wish to extract

Find End : Define how to find the end of the text you wish to extract

  1. Test your email parser with some sample text

Notes

Targetting the job summary, or job details will replace all of the information in these fields.  Use with care.

See also

Attachment parsing

String Builder Email Parser

Script based Email Parser