Email Parser

Extract data from incoming emails and automate your workflow

Renaming attachments

September 25, 2017

The settings file of this example is available here

 

In Email Parser there is an action that automatically saves all the email attached files to a folder on your computer. If a file with the same name already exists in that folder, it will be replaced and this is something that many people love as they know they will have the latest file version in a known place on their computers. Think, for example, a clerk that receives weekly by email the updated list of prices in an Excel file. He/She does not have to care where to look for that file or search for the latest email, just open a folder in the computer, and the most recent list price will be there.

But for other users, this is a problem. They want to keep track the multiple file versions they receive and having that file replaced everytime an email is received is a problem. They cannot check, for example, how much the prices have changed.

This blog post shows a workaround to the Email Parser default behavior which is replacing the existing files. In this example, we will add to the attachment filename the date and time it was sent. The result looks like this:

attached files saved by date

 

read more …

Tags


Email Parser 4.6

September 4, 2017

This release comes with many changes, but most notable tweaks are in the user interface (easier to use) and also Gmail accounts are now supported directly via the Gmail API. The detailed list of the changes is the following:

  • “Automated processes” are now called “Actions”.
  • Email Parser fields can now be tested “on the fly”. No longer needed to switch to the testing tab.
  • Wildcard expressions have been deprecated. 99% percent of the users do not actually use it.
  • Much better high-DPI screen support
  • Support of the Gmail API directly. No longer needed to enable IMAP access to parse emails in your Gmail account
  • Attachment content is now automatically included as a field called “AttachmentContent”. Setting this up in the email source settings is no longer needed.
  • A shortcut link in the output window that says “More details” opens the processed email with all its data.
  • Many changes on how the Actions are chained. Mostly UI based. Now it is easier to understand their run conditions and how they are chained together.
  • Email Parser running as a Windows Service is now included by default in the installer. There is no need to download an “add-on” package. However, the Windows Service is not actually installed until the user chooses to run Email Parser this way.
  • A faster response of the left panel. If you have many email sources, email parsers and actions you will notice the difference.
  • Many other “under-the-hood” minor changes and bug fixes.
  • Many UI tweaks for making the interface easy to use.

Tags


How to perform an action at a given time, not when emails arrive

May 30, 2017

 

Email Parser usually performs all the actions when an incoming email is received but sometimes you may need to trigger other actions wether or not new emails arrive.

In these cases, the way to go is to use the run conditionbefore any email is processed” or “after any email is processed“. They mean that everytime the Run button is clicked that action will be executed before checking the inboxes or after processing all the email. Regardless the amount of emails received, that action will be run once.

A customer recently asked in the forums how to send an email at 9:00pm and we have written an small example for him. Let’s take a look at the left panel items:

 

 

read more …

Tags


A more complete explanation of Regular Expressions in Email Parser

April 19, 2017

The topic that explains the use of Regular Expressions was very brief and just pointed to other useful resources on the net. Since questions regarding Regular Expressions are frequent this topic has been completed with more examples, a step-by-step tutorial that covers the basics and also how capture groups are used in the context of Email Parser.

I would like to also point here to a very interesting question that the user “logo11” has posted. If you are curious about how Regular Expressions are implemented in Email Parser it is worth a look.

 

Tags


Where does Email Parser store the settings?

January 18, 2017

If Email Parser is running as a standalone application (see the running modes) settings are stored per user. This means that all the items you see in the left panel and all the emails in the email history are linked to your Windows user account. If you open Email Parser from another Windows account in the same computer you will see everything empty, like you have just installed the program.

When Email Parser is run as a Windows Service, the email processing will take place in the background. A Windows Service running under the SYSTEM user account is actually processing your emails and the settings are stored under this path: C:\WINDOWS\system32\config\systemprofile\AppData\Roaming\EmailParser\.

In both cases and as most Windows apps, configuration files are stored in a hidden folder called “Application Data”. As the path to this folder changes between Windows versions and configurations the best way to reach it is to simply type %APPDATA% in the file explorer, then hit enter:

 

 

read more …


How to fill the HTML_body field of an outgoing email

December 29, 2016

Email Parser can send emails with the Send email action but the email editor you will find in this element is far from being friendly. It gives you just a plain HTML text box with no fancy buttons to insert images, set bold text etc. After all, Email Parser is not a traditional email client and is focused most on receiving emails and analysing them but how can you send nice emails easily with it? how to deal with that ugly HTML text box? The answer is simple: You can use another email client to compose your email, save it to a file and copy the HTML code back to Email Parser.

 

We will use the latest version of Microsoft Outlook to compose a sample email but any email cient will work. The idea is, once we get the email written, we have to save it to .eml or .html. Then open the resulting file with the Notepad and copy and paste the HTML code to Email Parser. The detailed step by step process is the following:

read more …


Deleting unwanted emails from the inbox

December 13, 2016

Email filtering allows you to select which emails are processed by Email Parser and which ones are ignored. It is also possible to use different email filters to drive different email types to different email parsers (think of emails with different formatting or contents, for example).

But what happen with emails not matching any criteria? You may want, for instance, delete them from your inbox. They take disk space and if you use the email address only to process emails they are not very useful. It is better to keep only those emails that are meant to be processed for reference (you also have the email history window in this case).

To implement this in Email Parser you have to use a feature called filter combination. Let’s see an example:

 

John receives at emailparsertest@yahoo.com two kinds of emails. He differentiates each type by the subject. They have the text [A] or [B] in the subject depending the type of the email. Accordingly, he has set up the following filters:

email filters

 

Each one only has one rule:

filter email by subject

read more …


Email Parser 4.5

December 5, 2016

This new release mostly contains bug fixes and gives us back the Windows Service feature to parse emails completely in the background. It also have some performance improvements:

  • Much faster email processing when database has many emails
  • Fixed email parser testing full parser. The testing shown empty results on some installs.
  • Fixed the double click in an email parser field list. Edit window now appears.
  • Email filter table now has more space between items. Better readability.
  • The email parser list that shows all the fields available now enables the remove button again when a field is selected
  • The email editor button “Save email as .eml file” works again
  • Fixed the email history list item text colour when an item is selected. Better readability.
  • Fixed some email wrongly typed words here and there.
  • Slightly bigger email viewer and now centred in the email history screen.
  • Added a “…” button in the email history to show the useful but unknown context menu
  • Windows Service is back to work again
  • When that max amount of emails are reached in the email history oldest emails are removed and database file is compacted

Tags


Removing tags from HTML prior to parsing

December 4, 2016
Ideally, the emails needed to be parsed come in plain text or using a very simple HTML formatting. This helps setting up Email Parser a lot but the most common scenario is that the emails you need to be parsed have many HTML tags, complex formatting, fancy fonts etc. This makes text capturing like digging for data. A very useful way to prepare the HTML body of an email to be parsed is to remove all the HTML tags first. We can do this creating the following field (called test here) in an email parser item:

 

We entered the regular expression:

<.*?>
Which basically means:
Take anything that starts with '<' and ends with a '>'
And we replaced here the matching text with a ‘-‘. You can put here anything, even nothing at all if you want the HTML tags to be removed. We used ‘-‘ to show you that the HTML tags have been actually removed.

read more …


Parsing attached PDF files

November 24, 2016

 

Email parser is commonly used to parse the text contained in the email body or subject but it can also parse the contents of an attached PDF, TXT,CSV,XLSX or DOCX file. When Email Parser receives an attached file it automatically converts its contents to a plain text format and saves this to a default field called AttachmentsContent:

parsing a PDF file

PDF file converted to plain text

 

 

As you will notice, text formatting, tables, paragraphs tabulation etc are lost in the process. Plain text version cannot handle these features but it is enough in most cases for the parsing purposes. In the end, all you need is text to capture and do some operations with it.

The original PDF looks like this:

 

 

 

Some tips to parse PDFs:

  • PDF files must keep the same format. Otherwise the text you need to parse may be on another position and the parsing will fail (you will get an empty field value). The same happens with DOC or DOCX (Microsoft Word) files.
  • PDF files must have a text layer. This means that even if you are able to read the document, some PDF software just produces an image of the actual text and pastes it in the PDF file. This does not work. If you want to make these files parseable you need to use OCR software before (optical recognition of characters). This is beyond the purpose of Email Parser.
  • Beware of the spaces and tabulations. Rely on them as less as possible to locate the text you need to parse. Slight differences between one PDF and other can create additional spaces, tabulations that were not there previously etc. Use the parsing method “Text filtering and replacing” as a first step of the email body parsing to remove not useful lines, empty spaces etc. See also multiple-step parsing.
  • Some PDF software produces really complex table structures and produce weird results when converted to plain text. Note that even if you think that Email Parser has turned your PDF file in a mess, the information is still there. All you need to do is find it between all the “garbage”.
  • It is recommended that you get a bunch of PDF or DOC files for testing. Pay attention to the characters and lines that remain constant to guide you parsing method.