Email Parser

Extract data from incoming emails and automate your workflow

MENUMENU

Filter incoming emails, parse data and write to Excel file

This is a basic example that shows how a Parser works with email filters. It also shows how Email Parser can insert captured text fields in an Excel spreadsheet. It downloads all the incoming emails but processes only those with the text “weather alert” in the email body. It also extracts the named fields time_of_event, date_of_event and windspeed using the text capture method “starts with… continues until“. It then writes the values to a new row in an Excel file.    

 

 

Download this example

 

 

 

We receive an email that looks as follows:

 

From: test@example.com
To: 
example@example.com
Subject: 
Weather report
***** WEATHER ALERT ******
———————– 12 kts windspeed was exceeded ! ———————–
Time of event was : 5:55:03 PM
Date of event was : 24/09/10
Current conditions : Windspeed 14.3 kts
Direction SW 225 °
Temperature 27.1 °C
Heat index 27.4 °C
Humidity 48%
Barometer 100.5 kpa
Maximum windspeed 34.5 kts SW at time: 5:16 PM
Maximum speed last hr 34.5 kts SW at time: 5:16PM
Rain today 0 mm
Maximum temperature 28.8°C at time: 3:29 PM
Minimum temperature 15.4 °C at time: 6:06 AM
Rain Rate/min 0.00 mm/min (0.00 mm/hr)
Rain last hour 0 mm
Max Rain Rate 0.0 mm/min (0.0 mm/hr) at time: 00:00 AM

 

We only want to capture the wind speed, the date, and the time when the data was measured. Let’s see how to set up the fields to capture this information from the email body:

 

 

 

 

 

The last step is to save this fields to an Excel file. To do that, we use an action of type Save to an Excel file:

 

 

 

Finally, we process an email to check that everything is working as we expect: