Email Parser

Extract data from incoming emails and automate your workflow

MENUMENU

How to correct the email date/time to the required time zone

January 8, 2019

 

Email Parser automatically uses your local time (as set in Windows) to give a value to the fields DateTimeSent and DateTimeProcessed. But you may need to have these times adjusted to UTC+0 time or another time zone. For this you need to use a small script:

read more …


Creating a field with a number to use it as index

August 10, 2018

 

Recently, a user has posted an interesting question in this website forum:

 

I’m writing to a text file.
Here’s my “Text to insert”:
‘1’,'<%customerID%>’,'<%customerID%>’,”,”,”,”,’ADMIN’,'<%shipToID%>’,”,”,”,”,N’

I’d like some way to increment the “1” with each successive line I extract from the e-mail….

I’ve been trying to create a static field above, and increment it.. tried a script & do it in C#…
Help!!!
and Thanks,
Rich

In this case, the user wanted an index value to write to a text file but it may also happen that you need an index value to insert to a database table. If doing so note that database tables can generate their own index when the SQL INSERT command is sent. But you can also provide them your own index value manually if you want to.

 

For example, if we retrieve the following fields from an incoming email:

 

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 …


Parsing attached PDF files

November 24, 2016

 

We have added a new example that shows you how to parse data from an attached PDF file. Any comments are welcome!


Multiple step parsing

November 17, 2016

For some diffucult parsing tasks there is a method called “Multiple step parsing”. A new documentation page has been written to cover this topic.

Only useful for hardcore users! (or those dealing with really difficult emails to parse)

See Multiple step parsing


How to parse emails not meeting a condition

October 3, 2016

Usually, when you want to parse a set of emails that meet a specific condition this condition is like “emails contining the word ‘summary’ in the subject” or the more complex one”emails matching the regular expression ‘\d\d\d-\d\d\d'” in the body text“. But, what happens if you want the contrary? It is not so common, but sometimes you want to get only the emails that do not match a condition.

In these cases, the easiest way is to create an email filter that matches the condition, for example, emails contining the word ‘summary’ in the subject. And then, in the following steps of the program select as the source of emails the emails not matching that filter. The screenshots below show how can be done:

read more …


How to remove existing excel rows

August 11, 2016

By default, the process that inserts new rows in an Excel file keeps the existing rows from previous runs and adds the new captured data in a new row. If you want not to keep the previously captured data an easy way to accomplish that is to create a new process that deletes the Excel file. A empty new Excel file will be automatically created the next time a row needs to be created. For example:

 

 

 

The command is:

del /f "C:\Users\Carlos\Desktop\invoices.xlsx"


Running a PHP script from Email Parser

December 15, 2014

We recently have received a message from an user asking if it is possible to run a PHP script in the program. We will share it here (with the permission of the sender) as we think it is useful for other users:

Can the Email Parser also call a PHP script or run it within it?

And our answer goes here:

You can call any external program (such as PHP) using a kind of process called “Run command under Windows Command Prompt” or “Run external program” and using this command line:
C:\php\php.exe C:\path_to_the script\thescript.php
And if what you want is to run the PHP script in another server, Do this:
C:\wget\wget.exe https://www.theserver.com/thephpscript.php

 

Wget is an external tool (widely used in Unix environments) to perform an HTTP request from the command line. It is also available for Windows.


Processing emails from a Gmail account using POP. Some details you need to know.

February 3, 2014

If you are using Email Parser with Gmail you have probably noticed that Google handles POP in a very particular way. They seem to not delete a given email when requested or the available emails via POP may be different from the emails you see accessing your account via the website.

The most important subject you must pay attention to is the POP settings. They will probably give you some hint on why things are not working as expected:

gmail_POP_settings

Notice also that if a given email has been downloaded once via POP it will not be available the next time you connect to Gmail unless you enable the “recent mode” ! (more info here )

Another drawback is that deleted emails via POP never get deleted. They are still kept in the server. So if you use the “delete email from source” in Email Parser do not expect to have your email deleted the next time you access Gmail via the website. The email will still be there.

If you want to not deal with these problems we recommend using IMAP access. POP is a very old protocol (although widely used)